|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.swinglib.layout.CompactGridLayout
public class CompactGridLayout
A layout manager designed for building input forms. It provides the following features:
Constructor Summary | |
---|---|
CompactGridLayout(int cols)
Basic constructor, which allows user to specify the number of columns and nothing else. |
|
CompactGridLayout(int cols,
int hGap,
int vGap)
Constructor that allows specification of horizontal and vertical gaps between components. |
|
CompactGridLayout(int cols,
int hGap,
int vGap,
float hAlign,
float vAlign)
Constructor that allows specification of horizontal and vertical gaps between components, as well as component alignment within cells. |
Method Summary | |
---|---|
void |
addLayoutComponent(Component comp,
Object cons)
Adds a component to the layout, associating it with the specified constraints object. |
void |
addLayoutComponent(String name,
Component comp)
Deprecated. use addLayoutComponent(Component,Object) |
float |
getLayoutAlignmentX(Container target)
Returns a default horizontal alignment value for this container. |
float |
getLayoutAlignmentY(Container target)
Returns a default vertical alignment value for this container. |
void |
invalidateLayout(Container target)
Invalidates the current cached information for this layout, and recalculates the row heights and column widths. |
void |
layoutContainer(Container target)
Lays out the container. |
Dimension |
maximumLayoutSize(Container target)
Returns the maximum size of this layout, which is the same as its preferred size. |
Dimension |
minimumLayoutSize(Container target)
Returns the minimum size of this layout, based on its components. |
Dimension |
preferredLayoutSize(Container target)
Returns the preferred size of this layout, based on its components. |
void |
removeLayoutComponent(Component comp)
Removes a component from the layout. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompactGridLayout(int cols)
cols
- Number of columns in the layout.public CompactGridLayout(int cols, int hGap, int vGap)
cols
- Number of columns in the layout.hGap
- Horizontal gap between components, in pixels.vGap
- Vertical gap between components, in pixels.public CompactGridLayout(int cols, int hGap, int vGap, float hAlign, float vAlign)
cols
- Number of columns in the layout.hGap
- Horizontal gap between components, in pixels.vGap
- Vertical gap between components, in pixels.hAlign
- Horizontal alignment of components within cell.vAlign
- Vertical alignment of components within cell.Method Detail |
---|
public void addLayoutComponent(Component comp, Object cons)
addLayoutComponent
in interface LayoutManager2
comp
- The component to add.cons
- A constraints object to go with this component. Since
this layout manager does not use constraints, this
parameter is ignored, and may be null
public void addLayoutComponent(String name, Component comp)
addLayoutComponent(Component,Object)
addLayoutComponent
in interface LayoutManager
comp
- The component to add.cons
- A constraints object to go with this component. Since
this layout manager does not use constraints, this
parameter is ignored, and may be null
public void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
public void invalidateLayout(Container target)
invalidateLayout
in interface LayoutManager2
public Dimension preferredLayoutSize(Container target)
preferredLayoutSize
in interface LayoutManager
public Dimension minimumLayoutSize(Container target)
minimumLayoutSize
in interface LayoutManager
public Dimension maximumLayoutSize(Container target)
maximumLayoutSize
in interface LayoutManager2
public void layoutContainer(Container target)
layoutContainer
in interface LayoutManager
public float getLayoutAlignmentX(Container target)
getLayoutAlignmentX
in interface LayoutManager2
public float getLayoutAlignmentY(Container target)
getLayoutAlignmentY
in interface LayoutManager2
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |