|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.swing.layout.UnitLayout
public class UnitLayout
Layout manager for a container that contains a single object. The object may be vertically and/or horizontally aligned/centered.
| Field Summary | |
|---|---|
static int |
BOTTOM
Align with bottom of container |
static int |
CENTER
Center in container |
static int |
LEFT
Align with left edge of container |
static int |
RIGHT
Align with right edge of container |
static int |
TOP
Align with top of container |
protected int |
xpos
Horizontal alignment |
protected int |
ypos
Vertical alignment |
| Constructor Summary | |
|---|---|
UnitLayout()
Default constructor. |
|
UnitLayout(int xpos,
int ypos)
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
Add the specified component from the layout. |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Deprecated. replaced by addLayoutComponent(Component, Object) |
float |
getLayoutAlignmentX(java.awt.Container parent)
Returns the alignment along the x axis. |
float |
getLayoutAlignmentY(java.awt.Container parent)
Returns the alignment along the y axis. |
void |
invalidateLayout(java.awt.Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded. |
void |
layoutContainer(java.awt.Container container)
Lays out the specified container using this layout. |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target)
Returns the maximum dimensions for this layout given the component in the specified target container. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container container)
Calculates the minimum size for the specified page. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container container)
Calculates the preferred size for the specified container. |
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TOP
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int BOTTOM
protected int xpos
protected int ypos
| Constructor Detail |
|---|
public UnitLayout()
public UnitLayout(int xpos,
int ypos)
xpos - Horizontal alignment of the component (LEFT/CENTER/RIGHT)ypos - Vertical alignment of the component (TOP/CENTER/BOTTOM)| Method Detail |
|---|
public void addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
addLayoutComponent in interface java.awt.LayoutManager2comp - The component to be addedconstraints - The constraints to apply when laying out
public void addLayoutComponent(java.lang.String name,
java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManagerpublic void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent in interface java.awt.LayoutManagercomp - the component to be removedpublic java.awt.Dimension minimumLayoutSize(java.awt.Container container)
minimumLayoutSize in interface java.awt.LayoutManagercontainer - The name of the parent container
public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize in interface java.awt.LayoutManager2target - The component which needs to be laid outpublic java.awt.Dimension preferredLayoutSize(java.awt.Container container)
preferredLayoutSize in interface java.awt.LayoutManagercontainer - The name of the parent container
public void layoutContainer(java.awt.Container container)
layoutContainer in interface java.awt.LayoutManagercontainer - Container that owns the layoutpublic float getLayoutAlignmentX(java.awt.Container parent)
getLayoutAlignmentX in interface java.awt.LayoutManager2parent - Container that owns the layout
public float getLayoutAlignmentY(java.awt.Container parent)
getLayoutAlignmentY in interface java.awt.LayoutManager2parent - Container that owns the layout
public void invalidateLayout(java.awt.Container target)
invalidateLayout in interface java.awt.LayoutManager2target - Container that owns the layout
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||