|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.merlotxml.awt.PercentLayout
A LayoutManager that allows you to set the component's sizes as a percentage of the total layout size. Based somewhat on StrutLayout by Matthew Phillips
Nested Class Summary | |
class |
PercentLayout.ComponentInfo
|
static class |
PercentLayout.Constraints
|
Field Summary | |
protected java.util.ArrayList |
_components
|
protected int |
_defaultSpace
|
protected boolean |
_invalid
|
protected int |
_orient
|
protected java.awt.Dimension |
_preferredSize
|
static int |
BOTH
|
boolean |
DEBUG
|
static int |
HORIZONTAL
|
static int |
NONE
|
static int |
VERTICAL
|
Constructor Summary | |
PercentLayout()
|
|
PercentLayout(int orientation)
|
|
PercentLayout(int orientation,
int space)
|
Method Summary | |
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
Adds the specified component to the layout, using the specified constraint object. |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Adds the specified component with the specified name to the layout. |
protected void |
assignPreferredSizes(java.awt.Container c)
|
float |
getLayoutAlignmentX(java.awt.Container target)
Returns the alignment along the x axis. |
float |
getLayoutAlignmentY(java.awt.Container target)
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 parent)
Lays out the container in the specified panel. |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target)
Returns the maximum size of this component. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Calculates the minimum size dimensions for the specified panel given the components in the specified parent container. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container. |
protected void |
recalculateLayout(java.awt.Container container)
|
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout. |
void |
setDefaultSpacing(int space)
|
void |
setOrientation(int orient)
|
protected void |
translateComponents(int xdelta,
int ydelta)
Translate all component locations by xdelta, ydelta. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NONE
public static final int HORIZONTAL
public static final int VERTICAL
public static final int BOTH
public boolean DEBUG
protected java.util.ArrayList _components
protected int _orient
protected int _defaultSpace
protected boolean _invalid
protected java.awt.Dimension _preferredSize
Constructor Detail |
public PercentLayout()
public PercentLayout(int orientation)
public PercentLayout(int orientation, int space)
Method Detail |
public void setDefaultSpacing(int space)
public void setOrientation(int orient)
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
This form adds the component with default constraints which just uses the components preferred size.
addLayoutComponent
in interface java.awt.LayoutManager
public void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
addLayoutComponent
in interface java.awt.LayoutManager2
public void layoutContainer(java.awt.Container parent)
layoutContainer
in interface java.awt.LayoutManager
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize
in interface java.awt.LayoutManager
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize
in interface java.awt.LayoutManager
public void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent
in interface java.awt.LayoutManager
public float getLayoutAlignmentX(java.awt.Container target)
getLayoutAlignmentX
in interface java.awt.LayoutManager2
public float getLayoutAlignmentY(java.awt.Container target)
getLayoutAlignmentY
in interface java.awt.LayoutManager2
public void invalidateLayout(java.awt.Container target)
invalidateLayout
in interface java.awt.LayoutManager2
public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize
in interface java.awt.LayoutManager2
protected void recalculateLayout(java.awt.Container container)
protected void assignPreferredSizes(java.awt.Container c)
protected void translateComponents(int xdelta, int ydelta)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |