Class GridLayout.Area

This class defines an area on a grid. An Area is defined by the coordinates of its upper left corner (x1,y1) and lower right corner (x2,y2)

Synopsis

Since

3.0

Inheritance Path.  java.lang.Object-> com.itmill.toolkit.ui.GridLayout.Area

GridLayout.Area(Component, int, int, int, int)

Parameters

x1

The X-coordinate of the upper left corner of the area c is supposed to occupy

y1

The Y-coordinate of the upper left corner of the area c is supposed to occupy

x2

The X-coordinate of the lower right corner of the area c is supposed to occupy

y2

The Y-coordinate of the lower right corner of the area c is supposed to occupy

Exceptions

OverlapsException

if the new component overlaps with any of the components already in the grid

Construct a new area on a grid.

getComponent()

Parameters

return

Component

Returns the component connected to the area.

getX1()

Parameters

return

int

Returns the top-left corner x-coordinate.

getX2()

Parameters

return

int

Returns the bottom-right corner x-coordinate.

getY1()

Parameters

return

int

Returns the top-left corner y-coordinate.

getY2()

Parameters

return

int

Returns the bottom-right corner y-coordinate.

overlaps(GridLayout.Area)

Parameters

other

Another Area that's to be tested for overlap with this area

return

true if other overlaps with this area, false if it doesn't

Tests if the given Area overlaps with an another Area.