|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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
Inner 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.
public void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
public void layoutContainer(java.awt.Container parent)
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
public void removeLayoutComponent(java.awt.Component comp)
public float getLayoutAlignmentX(java.awt.Container target)
public float getLayoutAlignmentY(java.awt.Container target)
public void invalidateLayout(java.awt.Container target)
public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |