|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.gui.util.SimpleGridLayout
This class is a layout manager which places it's components in a grid layout. The difference from the standard grid layout is that this one adjusts the sizes of the rows/columns according to the dimensions of the components, therefore not restricting a colummn or row to a specific width/height. It also takes into account the alignment of the components when placing them into the cells
| Field Summary | |
static int |
Expand
|
| Constructor Summary | |
SimpleGridLayout(int nRows,
int nCols)
|
|
SimpleGridLayout(int nRows,
int nCols,
int hGap,
int vGap)
|
|
| Method Summary | |
void |
addLayoutComponent(Component comp,
Object constraints)
Add a new component to the layout manager. |
void |
addLayoutComponent(String title,
Component comp)
|
float |
getLayoutAlignmentX(Container c)
|
float |
getLayoutAlignmentY(Container c)
|
void |
invalidateLayout(Container c)
|
void |
layoutContainer(Container container)
set the container of this layout manager |
Dimension |
maximumLayoutSize(Container container)
|
Dimension |
minimumLayoutSize(Container container)
get the minimum layout size for the specified container |
Dimension |
preferredLayoutSize(Container container)
|
Dimension |
preferredLayoutSize1(Container container)
get the preferred layout size for the specified container |
void |
removeLayoutComponent(Component component)
remove the specified component from this layout manager |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int Expand
| Constructor Detail |
public SimpleGridLayout(int nRows,
int nCols)
public SimpleGridLayout(int nRows,
int nCols,
int hGap,
int vGap)
| Method Detail |
public void addLayoutComponent(Component comp,
Object constraints)
addLayoutComponent in interface LayoutManager2comp - The feature to be added to the LayoutComponent attributeconstraints - The feature to be added to the LayoutComponent attribute
public void addLayoutComponent(String title,
Component comp)
addLayoutComponent in interface LayoutManagerpublic void layoutContainer(Container container)
layoutContainer in interface LayoutManagercontainer - the container of this layout managerpublic Dimension minimumLayoutSize(Container container)
minimumLayoutSize in interface LayoutManagercontainer - the container to be checked for it's minimum layout size
public Dimension preferredLayoutSize(Container container)
preferredLayoutSize in interface LayoutManagerpublic Dimension preferredLayoutSize1(Container container)
container - the container to be checked for it's preferred layout size
public Dimension maximumLayoutSize(Container container)
maximumLayoutSize in interface LayoutManager2public float getLayoutAlignmentX(Container c)
getLayoutAlignmentX in interface LayoutManager2public float getLayoutAlignmentY(Container c)
getLayoutAlignmentY in interface LayoutManager2public void removeLayoutComponent(Component component)
removeLayoutComponent in interface LayoutManagercomponent - the component to be removedpublic void invalidateLayout(Container c)
invalidateLayout in interface LayoutManager2
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||