|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itmill.toolkit.ui.GridLayout.Area
public 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).
| 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()
Gets the component connected to the area. |
int |
getX1()
Gets the top-left corner x-coordinate. |
int |
getX2()
Gets the bottom-right corner x-coordinate. |
int |
getY1()
Gets 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.
component - the component connected to the area.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.
GridLayout.OverlapsException - if the new component overlaps with any of the components
already in the grid| Method Detail |
|---|
public boolean overlaps(GridLayout.Area other)
other - the Another Area that's to be tested for overlap with this
area.
true if other overlaps with
this area, false if it doesn't.public 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 one.public 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 | |||||||||