public class Dimension extends Object
| Constructor and Description |
|---|
Dimension(double width,
double height)
Creates a new instance of this class with specified width and height.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getHeight()
Returns height of the page.
|
double |
getWidth()
Returns width of the page.
|
void |
setDimension(Dimension dimension)
Sets specified dimensions to the page.
|
void |
setHeight(double height)
Sets specified height for the page.
|
void |
setWidth(double width)
Sets specified width for the page.
|
String |
toString() |
public Dimension(double width,
double height)
width - width of the pageheight - height of the pagepublic double getWidth()
public void setWidth(double width)
width - width for the pagepublic double getHeight()
public void setHeight(double height)
height - height for the pagepublic void setDimension(Dimension dimension)
dimension - dimensions that need to be set