All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.ui.TwoColumnPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----javax.swing.JComponent
|
+----javax.swing.JPanel
|
+----com.sgi.sysadm.ui.RPanel
|
+----com.sgi.sysadm.ui.TwoColumnPanel
- public class TwoColumnPanel
- extends RPanel
A Panel for laying out labels and components in two columns, the
labels in the left column, and the components in the right column.
The layout for this panel is identical to the layout one would get
by using a LabelComponentPanel and laying out all the components in
the horizontal direction.
- See Also:
- LabelComponentPanel
-
SPLIT_SPACING
- A resource <name>.splitSpacing is an
integer that gives the width (in points) of the space to be put
between the labels and their values.
-
VERTICAL_SPACING
- A resource <name>.verticalSpacing is an
integer that gives the vertical space (in points) to put
between the label-value pairs.
-
TwoColumnPanel(ResourceStack)
- A constructor that takes a ResourceStack.
-
TwoColumnPanel(ResourceStack, String)
- A constructor that takes a ResourceStack and a name.
-
addComponent(Component)
- Adds a component without a label to the panel
-
addComponent(Component, Component)
- Adds a component and a label to the panel.
-
addComponent(Component, String)
- Adds a component and a label to the panel
-
addSpanningComponent(Component)
- Adds a component that spans both the left and right columns.
-
removeComponent(Component)
- Removes a component and any label associated with it.
SPLIT_SPACING
public static final String SPLIT_SPACING
- A resource <name>.splitSpacing is an
integer that gives the width (in points) of the space to be put
between the labels and their values. <name> is the name
passed to the constructor. If name is not set, or if
<name>.splitSpacing is not found,
TwoColumnPanel.splitSpacing will be used.
VERTICAL_SPACING
public static final String VERTICAL_SPACING
- A resource <name>.verticalSpacing is an
integer that gives the vertical space (in points) to put
between the label-value pairs. <name> is the name
passed to the constructor. If name is not set, or if
<name>.verticalSpacing is not found,
TwoColumnPanel.verticalSpacing will be used.
TwoColumnPanel
public TwoColumnPanel(ResourceStack rs)
- A constructor that takes a ResourceStack.
Since no name is provided, all resource lookups will be
prepended with "TwoColumnPanel"
- Parameters:
- rs - The ResourceStack to use for lookups
TwoColumnPanel
public TwoColumnPanel(ResourceStack rs,
String name)
- A constructor that takes a ResourceStack and a name.
Since a name is provided, all resource lookups will be
prepended with the name that is passed in. If that lookup
fails, the class will try again, this time prepending
"TwoColumnPanel".
- Parameters:
- rs - The ResourceStack to use for lookups
- name - The name of this TwoColumnPanel
addComponent
public void addComponent(Component component)
- Adds a component without a label to the panel
- Parameters:
- component - The component to add
addSpanningComponent
public void addSpanningComponent(Component component)
- Adds a component that spans both the left and right columns.
No label will be shown for the component.
- Parameters:
- component - The component to add
addComponent
public void addComponent(Component component,
String label)
- Adds a component and a label to the panel
- Parameters:
- component - The component to add
- label - The label that describes this component. A JLabel
will be created with the label, and that JLabel
will be added to the panel as the label for
component
addComponent
public void addComponent(Component component,
Component label)
- Adds a component and a label to the panel.
- Parameters:
- component - The component to add
- label - The label that describes this component
removeComponent
public void removeComponent(Component component)
- Removes a component and any label associated with it.
- Parameters:
- component - The component to remove
All Packages Class Hierarchy This Package Previous Next Index