org.eclipse.graphiti.datatypes

## Interface IRectangle

All Superinterfaces:
  IDimension, ILocation

All Known Implementing Classes:
  RectangleImpl

    public interface IRectangle
    extends IDimension, ILocation

An interface for the rectangle data type.

### Method Summary

All Methods Instance Methods Abstract Methods
`boolean` `contains(ILocation location)` Checks whether the point with the given location is inside the rectangle.
`boolean` `contains(int x, int y)` Checks whether the point with (x,y) is inside the rectangle.
`IRectangle` `getRectangleCopy()`
`void` `setRectangle(int x, int y, int width, int height)` Sets the location and dimension of the rectangle.
`void` `setRectangle(IRectangle rectangle)` Sets the location and dimension of the rectangle to the values of the given rectangle.

### Methods inherited from interface org.eclipse.graphiti.datatypes.IDimension

`getHeight, getWidth, setHeight, setWidth`

### Methods inherited from interface org.eclipse.graphiti.datatypes.ILocation

`getX, getY, setX, setY`

### Method Detail

#### getRectangleCopy

    IRectangle getRectangleCopy()

Returns:
  An exact copy of the current rectangle instance.

#### setRectangle

    void setRectangle(int x,
                      int y,
                      int width,
                      int height)

Sets the location and dimension of the rectangle.

Parameters:
  `x` - the x coordinate of the rectangle
  `y` - the y coordinate of the rectangle
  `width` - the width of the rectangle
  `height` - the height of the rectangle

#### setRectangle

    void setRectangle(IRectangle rectangle)

Sets the location and dimension of the rectangle to the values of the given rectangle.

Parameters:
  `rectangle` - The rectangle which contains new location and dimension.

#### contains

    boolean contains(int x,
                     int y)

Checks whether the point with (x,y) is inside the rectangle.

Parameters:
  `x` - the x coordinate of the point to be tested
  `y` - the y coordinate of the point to be tested
Returns:
  TRUE, if the point with (x,y) is inside the rectangle; FALSE otherwise

#### contains

    boolean contains(ILocation location)

Checks whether the point with the given location is inside the rectangle.

Parameters:
  `location` - the location of the point to be tested
Returns:
  TRUE, if the location is inside the rectangle; FALSE otherwise