|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.common.CGrid
public class CGrid
A CGrid
is a mechanism to layout a set of CDockable
on
a SplitDockStation
like the one used in the center of the
CContentArea
or on the CWorkingArea
. CGrid
s
also can register new CDockable
s to a CControl
.
A CGrid
is a rectangle containing several CDockable
s. All
these dockables have boundaries, within the rectangle of the grid.
A grid can be deployed on CWorkingArea
s or CContentArea
s.
As soon as a grid is deployed, all its dockables get visible.
Constructor Summary | |
---|---|
CGrid()
Creates a new grid. |
|
CGrid(CControl control)
Creates a new grid. |
Method Summary | |
---|---|
void |
add(double x,
double y,
double width,
double height,
CDockable... dockables)
Adds a new set of CDockable s to this grid. |
void |
addHorizontalDivider(double x1,
double x2,
double y)
Informs this grid about a horizontal divider that should be inserted into the layout. |
void |
addVerticalDivider(double x,
double y1,
double y2)
Informs this grid about a vertical divider that should be inserted into the layout. |
void |
select(double x,
double y,
double width,
double height,
CDockable dockable)
Marks dockable as beeing selected in the stack that
has the boundaries of x, y, width, height . |
SplitDockTree |
toTree()
Creates and returns a tree which contains the CommonDockable s
of this CGrid . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CGrid()
public CGrid(CControl control)
CDockable
s will be registered at
control
.
control
- the control where this grid should register new
CDockable
s.Method Detail |
---|
public SplitDockTree toTree()
CommonDockable
s
of this CGrid
. The branches of the tree are put in a way, that
this boundaries of the CommonDockable
s are respected as good
as possible.
public void add(double x, double y, double width, double height, CDockable... dockables)
CDockable
s to this grid. The CDockable
s
are also added to the CControl
of this CGrid
.
x
- the x-coordinate of the dockablesy
- the y-coordinate of the dockableswidth
- the width of the dockablesheight
- the height of the dockablesdockables
- a list of SingleCDockable
s and MultipleCDockable
s.public void select(double x, double y, double width, double height, CDockable dockable)
dockable
as beeing selected in the stack that
has the boundaries of x, y, width, height
.
x
- the x coordinate of the stacky
- the y coordinate of the stackwidth
- the width of the stackheight
- the height of the stackdockable
- the element to select, not null
public void addHorizontalDivider(double x1, double x2, double y)
x1
- the first x coordinate of the dividerx2
- the second x coordinate of the dividery
- the y coordinate of the dividerpublic void addVerticalDivider(double x, double y1, double y2)
x
- the x coordinate of the dividery1
- the first y coordinate of the dividery2
- the second y coordinate of the divider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |