|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cookxml.cookswing.helper.SpringConstraintHelper
Helper class for constructing a spring constraint. A spring constraint can be very tricky to set up.
Given a dimension (x or y), there three types of constraint. the top/left constraint, the width/height constraints, and the bottom/right constraints. Only two constraints can be active for a given component in one dimension, since the third can be inferred from the other two. Thus, if you want to set the constraint for both sides of a component, width and height constraints, which are present by default, must be cleared.
SpringLayout
,
SpringLayout.Constraints
,
SpringLayoutAdder
Field Summary | |
boolean |
clearHeight
this flag is used to clear the height spring of the component. |
boolean |
clearWidth
this flag is used to clear the width spring of the component. |
Component |
comp1
the component to be aligned. |
Component |
comp2
the component to comparing to. |
String |
edge1
the edge of this component. |
String |
edge2
the edge of the component to be aligned. |
Spring |
height
|
boolean |
maxHeight
get and set the height spring of the component to be its maximum height. |
boolean |
maxWidth
get and set the width spring of the component to be its maximum width. |
boolean |
minHeight
get and set the height spring of the component to be its minimum height. |
boolean |
minWidth
get and set the width spring of the component to be its minimum width. |
int |
pad
the padding distance between the two edges |
boolean |
preferredHeight
get and set the height spring of the component to be its preferred height. |
boolean |
preferredWidth
get and set the width spring of the component to be its preferred width. |
Spring |
width
|
Integer |
xpad
|
Integer |
ypad
|
Constructor Summary | |
SpringConstraintHelper()
|
Method Summary | |
void |
add(Component c)
|
static String |
getConstraint(String constraint)
|
void |
putConstraint(SpringLayout layout)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Integer xpad
public Integer ypad
public Spring width
public Spring height
public boolean clearWidth
public boolean clearHeight
public boolean preferredWidth
public boolean preferredHeight
public boolean maxWidth
public boolean maxHeight
public boolean minWidth
public boolean minHeight
public int pad
public String edge1
public String edge2
public Component comp1
public Component comp2
Constructor Detail |
public SpringConstraintHelper()
Method Detail |
public void add(Component c)
public void putConstraint(SpringLayout layout)
public static String getConstraint(String constraint)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |