Class DimensionImpl
java.lang.Object
org.eclipse.graphiti.internal.datatypes.impl.DimensionImpl
- All Implemented Interfaces:
IAdvancedDimension
,IDimension
The Class DimensionImpl.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
expand
(int dw, int dh) Expands the current dimensionint
Gets the height.int
getWidth()
Gets the width.int
hashCode()
void
scale
(double amount) Changes the current dimensionsetDimension
(int width, int height) Sets the width and height of the dimension.setDimension
(IDimension dimension) Sets the width and height of the dimension.void
setHeight
(int height) Sets the height.void
setWidth
(int width) Sets the width.toString()
-
Constructor Details
-
DimensionImpl
public DimensionImpl(int width, int height) -
DimensionImpl
-
-
Method Details
-
getHeight
public int getHeight()Description copied from interface:IDimension
Gets the height.- Specified by:
getHeight
in interfaceIDimension
- Returns:
- the height of this dimension
-
getWidth
public int getWidth()Description copied from interface:IDimension
Gets the width.- Specified by:
getWidth
in interfaceIDimension
- Returns:
- the width of this dimension
-
setHeight
public void setHeight(int height) Description copied from interface:IDimension
Sets the height.- Specified by:
setHeight
in interfaceIDimension
- Parameters:
height
- the new height of this dimension
-
setWidth
public void setWidth(int width) Description copied from interface:IDimension
Sets the width.- Specified by:
setWidth
in interfaceIDimension
- Parameters:
width
- the new width of this dimension
-
equals
-
hashCode
public int hashCode() -
toString
-
getDimensionCopy
- Specified by:
getDimensionCopy
in interfaceIAdvancedDimension
- Returns:
- An exact copy of the current advanced dimension instance.
-
setDimension
Description copied from interface:IAdvancedDimension
Sets the width and height of the dimension.- Specified by:
setDimension
in interfaceIAdvancedDimension
- Parameters:
width
- the new width of the dimensionheight
- the new height of the dimension- Returns:
- the current instance
-
setDimension
Description copied from interface:IAdvancedDimension
Sets the width and height of the dimension.- Specified by:
setDimension
in 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:IAdvancedDimension
Changes the current dimension- Specified by:
scale
in interfaceIAdvancedDimension
- Parameters:
amount
- width and height of the dimension will be multiplied with this amount
-
expand
Description copied from interface:IAdvancedDimension
Expands the current dimension- Specified by:
expand
in interfaceIAdvancedDimension
- Parameters:
dw
- this value will be added to the widthdh
- this value will be added to the height- Returns:
- the current instance
-