All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.ui.LabelComponentConstraints
java.lang.Object
|
+----com.sgi.sysadm.ui.LabelComponentConstraints
- public class LabelComponentConstraints
- extends Object
- implements Cloneable
An object that represents the constraints that determine how a
component is laid out in the LabelComponentLayoutManager
-
ALWAYS
- Always attach the component the the right hand side
-
attachBottom
- The bottommost Component in the layout will be attached to the
bottom of the Container if attachBottom is set to true for that
component.
-
bottomGap
- The number of pixels to put below each component in the layout
and the label or component directly below it.
-
DEFAULT
- If the component implements DynamicSize, then attach the
the right, else, just give the component its preferred width.
-
group
-
The group that identifies this component.
-
hgap
- The numner of pixels to put between the label and the component
when the layoutType is HORIZONTAL.
-
HORIZONTAL
- Use a hoizontal alignment
-
label
- The label to attach to the component.
-
LABEL
- Pass this as the constraints object when you're adding a label.
-
labelJustification
- The type of justification to use for the label.
-
layoutType
- The type of layout to use.
-
LEFT
- Give the label left justification.
-
NEVER
- Always give the component its preferred width
-
RIGHT
- Give the label right justification.
-
rightAttachment
- How the component should be attached to the right hand side.
-
VERTICAL
- Use a vertical alignment
-
vgap
- The number of pixels to put between a label and the component
when the layoutType is VERTICAL.
-
LabelComponentConstraints()
-
-
clone()
- Make a copy of this object.
-
toString()
- Returns a string version of the constraints for debugging
purposes.
-
validate()
- Validates that this object contains legal values.
LABEL
public static LabelComponentConstraints LABEL
- Pass this as the constraints object when you're adding a label.
label
public Component label
- The label to attach to the component. The label must have been
previously added to the container. The default is null
layoutType
public byte layoutType
- The type of layout to use. Can be set to HORIZONTAL or
VERTICAL. The default is HORIZONTAL.
HORIZONTAL
public static final byte HORIZONTAL
- Use a hoizontal alignment
VERTICAL
public static final byte VERTICAL
- Use a vertical alignment
vgap
public int vgap
- The number of pixels to put between a label and the component
when the layoutType is VERTICAL. The default is 0.
hgap
public int hgap
- The numner of pixels to put between the label and the component
when the layoutType is HORIZONTAL. The default is 0.
bottomGap
public int bottomGap
- The number of pixels to put below each component in the layout
and the label or component directly below it. This is ignored
for the bottommost component in the layout. The default is 0.
rightAttachment
public byte rightAttachment
- How the component should be attached to the right hand side.
The choices are:
- DEFAULT
- If the component implements DynamicSize, then attach to
the right, else, just give the component its preferred width,
even if that means that it will be clipped.
- ALWAYS
- Always attach the component the the right hand side
- NEVER
- Always give the component its preferred width
The default is DEFAULT.
DEFAULT
public static final byte DEFAULT
- If the component implements DynamicSize, then attach the
the right, else, just give the component its preferred width.
ALWAYS
public static final byte ALWAYS
- Always attach the component the the right hand side
NEVER
public static final byte NEVER
- Always give the component its preferred width
group
public String group
- The group that identifies this component. This is only used
for components with HORIZONTAL layoutType. All the components
of a single group will be laid out so that the left edges of
the components are aligned. The default is "".
labelJustification
public byte labelJustification
- The type of justification to use for the label. The options
are LEFT or RIGHT. The default is RIGHT.
RIGHT
public static final byte RIGHT
- Give the label right justification.
LEFT
public static final byte LEFT
- Give the label left justification.
attachBottom
public boolean attachBottom
- The bottommost Component in the layout will be attached to the
bottom of the Container if attachBottom is set to true for that
component. The default is false.
LabelComponentConstraints
public LabelComponentConstraints()
validate
public boolean validate()
- Validates that this object contains legal values.
- Returns:
- true if legal, false if not.
clone
public Object clone()
- Make a copy of this object.
- Returns:
- An exact copy of the object.
- Overrides:
- clone in class Object
toString
public String toString()
- Returns a string version of the constraints for debugging
purposes.
- Returns:
- A string representing the object.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index