|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.common.util.ColumnLayout
This LayoutManager arranges the components into a column. Components are always given their preferred size. When you create a ColumnLayout, you may specify four values: margin_height -- how much space to leave on top and bottom margin_width -- how much space to leave on left and right spacing -- how much vertical space to leave between items alignment -- the horizontal position of the components: ColumnLayout.LEFT -- left-justify the components ColumnLayout.CENTER -- horizontally center the components ColumnLayout.RIGHT -- right-justify the components You never call the methods of a ColumnLayout object. Just create one and make it the layout manager for your container by passing it to the addLayout() method of the Container object.
Field Summary | |
protected int |
alignment
|
static int |
CENTER
|
static int |
LEFT
|
protected int |
margin_height
|
protected int |
margin_width
|
static int |
RIGHT
|
protected int |
spacing
|
Constructor Summary | |
ColumnLayout()
A default constructor that creates a ColumnLayout using 5-pixel margin width and height, 5-pixel spacing, and left alignment |
|
ColumnLayout(int margin_height,
int margin_width,
int spacing,
int alignment)
The constructor. |
Method Summary | |
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraint)
|
void |
addLayoutComponent(java.lang.String constraint,
java.awt.Component comp)
|
float |
getLayoutAlignmentX(java.awt.Container parent)
|
float |
getLayoutAlignmentY(java.awt.Container parent)
|
void |
invalidateLayout(java.awt.Container parent)
|
void |
layoutContainer(java.awt.Container parent)
The method that actually performs the layout. |
protected java.awt.Dimension |
layoutSize(java.awt.Container parent,
int sizetype)
|
java.awt.Dimension |
maximumLayoutSize(java.awt.Container parent)
The Container calls this to find out how big the layout can be |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
The Container calls this to find out how big the layout must be |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
The Container calls this to find out how big the layout should to be |
void |
removeLayoutComponent(java.awt.Component comp)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int margin_height
protected int margin_width
protected int spacing
protected int alignment
public static final int LEFT
public static final int CENTER
public static final int RIGHT
Constructor Detail |
public ColumnLayout(int margin_height, int margin_width, int spacing, int alignment)
public ColumnLayout()
Method Detail |
public void layoutContainer(java.awt.Container parent)
layoutContainer
in interface java.awt.LayoutManager
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize
in interface java.awt.LayoutManager
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize
in interface java.awt.LayoutManager
public java.awt.Dimension maximumLayoutSize(java.awt.Container parent)
maximumLayoutSize
in interface java.awt.LayoutManager2
protected java.awt.Dimension layoutSize(java.awt.Container parent, int sizetype)
public void addLayoutComponent(java.lang.String constraint, java.awt.Component comp)
addLayoutComponent
in interface java.awt.LayoutManager
public void addLayoutComponent(java.awt.Component comp, java.lang.Object constraint)
addLayoutComponent
in interface java.awt.LayoutManager2
public void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent
in interface java.awt.LayoutManager
public void invalidateLayout(java.awt.Container parent)
invalidateLayout
in interface java.awt.LayoutManager2
public float getLayoutAlignmentX(java.awt.Container parent)
getLayoutAlignmentX
in interface java.awt.LayoutManager2
public float getLayoutAlignmentY(java.awt.Container parent)
getLayoutAlignmentY
in interface java.awt.LayoutManager2
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |