public class DimensionImpl extends Object implements IAdvancedDimension
| Constructor and Description |
|---|
DimensionImpl(IDimension dimension) |
DimensionImpl(int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
IDimension |
expand(int dw,
int dh)
Expands the current dimension
|
IDimension |
getDimensionCopy() |
int |
getHeight()
Gets the height.
|
int |
getWidth()
Gets the width.
|
int |
hashCode() |
void |
scale(double amount)
Changes the current dimension
|
IDimension |
setDimension(IDimension dimension)
Sets the width and height of the dimension.
|
IDimension |
setDimension(int width,
int height)
Sets the width and height of the dimension.
|
void |
setHeight(int height)
Sets the height.
|
void |
setWidth(int width)
Sets the width.
|
String |
toString() |
public DimensionImpl(int width,
int height)
public DimensionImpl(IDimension dimension)
public int getHeight()
IDimensiongetHeight in interface IDimensionpublic int getWidth()
IDimensiongetWidth in interface IDimensionpublic void setHeight(int height)
IDimensionsetHeight in interface IDimensionheight - the new height of this dimensionpublic void setWidth(int width)
IDimensionsetWidth in interface IDimensionwidth - the new width of this dimensionpublic IDimension getDimensionCopy()
getDimensionCopy in interface IAdvancedDimensionpublic IDimension setDimension(int width, int height)
IAdvancedDimensionsetDimension in interface IAdvancedDimensionwidth - the new width of the dimensionheight - the new height of the dimensionpublic IDimension setDimension(IDimension dimension)
IAdvancedDimensionsetDimension in interface IAdvancedDimensiondimension - the dimension which contains the new width and heightpublic void scale(double amount)
IAdvancedDimensionscale in interface IAdvancedDimensionamount - width and height of the dimension will be multiplied with this
amountpublic IDimension expand(int dw, int dh)
IAdvancedDimensionexpand in interface IAdvancedDimensiondw - this value will be added to the widthdh - this value will be added to the height