public class DimensionImpl extends java.lang.Object implements IAdvancedDimension
| Constructor and Description |
|---|
DimensionImpl(IDimension dimension) |
DimensionImpl(int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.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.
|
java.lang.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 boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic 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