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