Class DimensionImpl
- java.lang.Object
-
- org.eclipse.graphiti.internal.datatypes.impl.DimensionImpl
-
- All Implemented Interfaces:
IAdvancedDimension,IDimension
public class DimensionImpl extends java.lang.Object implements IAdvancedDimension
The Class DimensionImpl.
-
-
Constructor Summary
Constructors Constructor Description DimensionImpl(int width, int height)DimensionImpl(IDimension dimension)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)IDimensionexpand(int dw, int dh)Expands the current dimensionIDimensiongetDimensionCopy()intgetHeight()Gets the height.intgetWidth()Gets the width.inthashCode()voidscale(double amount)Changes the current dimensionIDimensionsetDimension(int width, int height)Sets the width and height of the dimension.IDimensionsetDimension(IDimension dimension)Sets the width and height of the dimension.voidsetHeight(int height)Sets the height.voidsetWidth(int width)Sets the width.java.lang.StringtoString()
-
-
-
Constructor Detail
-
DimensionImpl
public DimensionImpl(int width, int height)
-
DimensionImpl
public DimensionImpl(IDimension dimension)
-
-
Method Detail
-
getHeight
public int getHeight()
Description copied from interface:IDimensionGets the height.- Specified by:
getHeightin interfaceIDimension- Returns:
- the height of this dimension
-
getWidth
public int getWidth()
Description copied from interface:IDimensionGets the width.- Specified by:
getWidthin interfaceIDimension- Returns:
- the width of this dimension
-
setHeight
public void setHeight(int height)
Description copied from interface:IDimensionSets the height.- Specified by:
setHeightin interfaceIDimension- Parameters:
height- the new height of this dimension
-
setWidth
public void setWidth(int width)
Description copied from interface:IDimensionSets the width.- Specified by:
setWidthin interfaceIDimension- Parameters:
width- the new width of this dimension
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDimensionCopy
public IDimension getDimensionCopy()
- Specified by:
getDimensionCopyin interfaceIAdvancedDimension- Returns:
- An exact copy of the current advanced dimension instance.
-
setDimension
public IDimension setDimension(int width, int height)
Description copied from interface:IAdvancedDimensionSets the width and height of the dimension.- Specified by:
setDimensionin interfaceIAdvancedDimension- Parameters:
width- the new width of the dimensionheight- the new height of the dimension- Returns:
- the current instance
-
setDimension
public IDimension setDimension(IDimension dimension)
Description copied from interface:IAdvancedDimensionSets the width and height of the dimension.- Specified by:
setDimensionin interfaceIAdvancedDimension- Parameters:
dimension- the dimension which contains the new width and height- Returns:
- the current instance
-
scale
public void scale(double amount)
Description copied from interface:IAdvancedDimensionChanges the current dimension- Specified by:
scalein interfaceIAdvancedDimension- Parameters:
amount- width and height of the dimension will be multiplied with this amount
-
expand
public IDimension expand(int dw, int dh)
Description copied from interface:IAdvancedDimensionExpands the current dimension- Specified by:
expandin interfaceIAdvancedDimension- Parameters:
dw- this value will be added to the widthdh- this value will be added to the height- Returns:
- the current instance
-
-