public class Dimension extends AbstractDimension implements Serializable
| Modifier and Type | Field and Description |
|---|---|
float |
height
The magnitude in the y-dimension.
|
float |
width
The magnitude in the x-dimension.
|
| Constructor and Description |
|---|
Dimension()
Creates a dimension with magnitude (0, 0).
|
Dimension(float width,
float height)
Creates a dimension with the specified width and height.
|
Dimension(IDimension d)
Creates a dimension with width and height equal to the supplied dimension.
|
| Modifier and Type | Method and Description |
|---|---|
float |
height()
Returns the magnitude in the y-dimension.
|
void |
setSize(float width,
float height)
Sets the magnitudes of this dimension to the specified width and height.
|
void |
setSize(IDimension d)
Sets the magnitudes of this dimension to be equal to the supplied dimension.
|
float |
width()
Returns the magnitude in the x-dimension.
|
clone, equals, hashCode, toStringpublic float width
public float height
public Dimension()
public Dimension(float width,
float height)
public Dimension(IDimension d)
public void setSize(float width,
float height)
public void setSize(IDimension d)
public float width()
IDimensionwidth in interface IDimensionpublic float height()
IDimensionheight in interface IDimensionCopyright © 2017. All rights reserved.