|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.millstone.base.ui.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)
Constructor Summary | |
GridLayout.Area(Component component,
int x1,
int y1,
int x2,
int y2)
Construct a new area on a grid. |
Method Summary | |
Component |
getComponent()
Returns the component connected to the area. |
int |
getX1()
Returns the top-left corner x-coordinate. |
int |
getX2()
Returns the bottom-right corner x-coordinate. |
int |
getY1()
Returns the top-left corner y-coordinate. |
int |
getY2()
Returns the bottom-right corner y-coordinate. |
boolean |
overlaps(GridLayout.Area other)
Tests if the given Area overlaps with an another Area. |
protected void |
setComponent(Component newComponent)
Sets the component connected to the area. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GridLayout.Area(Component component, int x1, int y1, int x2, int y2)
Construct a new area on a grid.
x1
- The X-coordinate of the upper left corner of the area
c
is supposed to occupyy1
- The Y-coordinate of the upper left corner of the area
c
is supposed to occupyx2
- The X-coordinate of the lower right corner of the area
c
is supposed to occupyy2
- The Y-coordinate of the lower right corner of the area
c
is supposed to occupy
OverlapsException
- if the new component overlaps with any
of the components already in the gridMethod Detail |
public boolean overlaps(GridLayout.Area other)
other
- Another Area that's to be tested for overlap with
this area
true
if other
overlaps with
this area, false
if it doesn'tpublic Component getComponent()
protected void setComponent(Component newComponent)
This function only sets the value in the datastructure and does not send any events or set parents
newComponent
- The new connected overriding the existing onepublic int getX1()
public int getX2()
public int getY1()
public int getY2()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |