|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.apputils.EdgeLayout
EdgeLayout allows the developer a simpler mechanism for layout of components than the GridBagLayout without sacrificing powerful layout capability. The developer simply defines the behavior of motion for the component with respect to its parent and how the component grows. The motion is specified by struts between the edges of the the component and the corresponding edges of the parent container. For example, if you use a RIGHT strut, the component is bound to its parent's right edge according to the initial placement of the component. That is, the gap between the right edges of the parent and its container is preserved. If the component is bound left and right to its parent and the component is constrained to grow horizontally, the component will maintain the left and right gaps with its parent container and grow accordingly.
| Field Summary | |
static int |
ALL_SIDES
|
static int |
BOTTOM
|
static int |
BOTTOM_RIGHT
|
protected java.util.Map |
constraintTable
|
static int |
GROW_BOTH
|
static int |
GROW_HORIZONTAL
|
static int |
GROW_VERTICAL
|
static int |
LEFT
|
static int |
LEFT_BOTTOM
|
static int |
LEFT_BOTTOM_RIGHT
|
static int |
LEFT_RIGHT
|
static int |
NO_GROWTH
|
static int |
NO_STRUTS
|
static int |
RIGHT
|
static int |
TOP
|
static int |
TOP_BOTTOM
|
static int |
TOP_BOTTOM_RIGHT
|
static int |
TOP_LEFT
|
static int |
TOP_LEFT_BOTTOM
|
static int |
TOP_LEFT_RIGHT
|
static int |
TOP_RIGHT
|
| Constructor Summary | |
EdgeLayout()
Creates a new instance of SimpleLayout |
|
| Method Summary | |
void |
add(java.awt.Component component,
java.awt.Container parent,
int x,
int y,
int strutBehavior)
Add the component to the parent at the specified coordinates with the specified strut behavior. |
void |
add(java.awt.Component component,
java.awt.Container parent,
int x,
int y,
int strutBehavior,
int growBehavior)
Add the component to the parent at the specified coordinates with the specified strut and growth behaviors. |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component component)
Implement LayoutManager interface |
protected void |
layoutComponent(java.awt.Component component,
java.awt.Container parent)
Layout the component in the parent |
void |
layoutContainer(java.awt.Container parent)
Implement LayoutManager interface |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Implement LayoutManager interface |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Implement LayoutManager interface |
void |
removeLayoutComponent(java.awt.Component component)
Implement LayoutManager interface |
void |
setConstraints(java.awt.Component component,
java.awt.Dimension containerSize,
int x,
int y,
int strutBehavior)
Add the component to the layout at the specified coordinates with the specified strut and growth behaviors. |
void |
setConstraints(java.awt.Component component,
java.awt.Dimension containerSize,
int x,
int y,
int strutBehavior,
int growBehavior)
Add the component to the layout at the specified coordinates with the specified strut and growth behaviors. |
void |
setConstraints(java.awt.Component component,
int topStrut,
int leftStrut,
int bottomStrut,
int rightStrut,
int strutBehavior)
Add the component to the layout at the specified coordinates with the specified struts and strut and no growth. |
void |
setConstraints(java.awt.Component component,
int topStrut,
int leftStrut,
int bottomStrut,
int rightStrut,
int strutBehavior,
int growBehavior)
Add the component to the layout at the specified coordinates with the specified struts and strut and growth behaviors. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NO_STRUTS
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
public static final int TOP_LEFT
public static final int TOP_BOTTOM
public static final int TOP_RIGHT
public static final int LEFT_BOTTOM
public static final int LEFT_RIGHT
public static final int BOTTOM_RIGHT
public static final int TOP_LEFT_BOTTOM
public static final int TOP_BOTTOM_RIGHT
public static final int LEFT_BOTTOM_RIGHT
public static final int TOP_LEFT_RIGHT
public static final int ALL_SIDES
public static final int NO_GROWTH
public static final int GROW_HORIZONTAL
public static final int GROW_VERTICAL
public static final int GROW_BOTH
protected java.util.Map constraintTable
| Constructor Detail |
public EdgeLayout()
| Method Detail |
public void setConstraints(java.awt.Component component,
int topStrut,
int leftStrut,
int bottomStrut,
int rightStrut,
int strutBehavior,
int growBehavior)
public void setConstraints(java.awt.Component component,
int topStrut,
int leftStrut,
int bottomStrut,
int rightStrut,
int strutBehavior)
public void setConstraints(java.awt.Component component,
java.awt.Dimension containerSize,
int x,
int y,
int strutBehavior,
int growBehavior)
public void setConstraints(java.awt.Component component,
java.awt.Dimension containerSize,
int x,
int y,
int strutBehavior)
public void add(java.awt.Component component,
java.awt.Container parent,
int x,
int y,
int strutBehavior,
int growBehavior)
public void add(java.awt.Component component,
java.awt.Container parent,
int x,
int y,
int strutBehavior)
public void addLayoutComponent(java.lang.String name,
java.awt.Component component)
addLayoutComponent in interface java.awt.LayoutManagerpublic void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManager
protected void layoutComponent(java.awt.Component component,
java.awt.Container parent)
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManagerpublic void removeLayoutComponent(java.awt.Component component)
removeLayoutComponent in interface java.awt.LayoutManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||