Package org.eclipse.graphiti.internal.datatypes.impl

## 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
`DimensionImpl​(int width, int height)`
`DimensionImpl​(IDimension dimension)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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​(int width, int height)` Sets the width and height of the dimension.
`IDimension` `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.
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### DimensionImpl

    public DimensionImpl​(int width,
                         int height)

#### DimensionImpl

    public DimensionImpl​(IDimension dimension)

### Method Detail

#### getHeight

    public int getHeight()

Description copied from interface: `IDimension`
Gets the height.

Specified by:
  `getHeight` in interface `IDimension`
Returns:
  the height of this dimension

#### getWidth

    public int getWidth()

Description copied from interface: `IDimension`
Gets the width.

Specified by:
  `getWidth` in interface `IDimension`
Returns:
  the width of this dimension

#### setHeight

    public void setHeight​(int height)

Description copied from interface: `IDimension`
Sets the height.

Specified by:
  `setHeight` in interface `IDimension`
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 interface `IDimension`
Parameters:
  `width` - the new width of this dimension

#### equals

    public boolean equals​(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### getDimensionCopy

    public IDimension getDimensionCopy()

Specified by:
  `getDimensionCopy` in interface `IAdvancedDimension`
Returns:
  An exact copy of the current advanced dimension instance.

#### setDimension

    public IDimension setDimension​(int width,
                                   int height)

Description copied from interface: `IAdvancedDimension`
Sets the width and height of the dimension.

Specified by:
  `setDimension` in interface `IAdvancedDimension`
Parameters:
  `width` - the new width of the dimension
  `height` - the new height of the dimension
Returns:
  the current instance

#### setDimension

    public IDimension setDimension​(IDimension dimension)

Description copied from interface: `IAdvancedDimension`
Sets the width and height of the dimension.

Specified by:
  `setDimension` in interface `IAdvancedDimension`
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 interface `IAdvancedDimension`
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: `IAdvancedDimension`
Expands the current dimension

Specified by:
  `expand` in interface `IAdvancedDimension`
Parameters:
  `dw` - this value will be added to the width
  `dh` - this value will be added to the height
Returns:
  the current instance