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

Variable Index

 o 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.
 o VERTICAL_SPACING
A resource <name>.verticalSpacing is an integer that gives the vertical space (in points) to put between the label-value pairs.

Constructor Index

 o TwoColumnPanel(ResourceStack)
A constructor that takes a ResourceStack.
 o TwoColumnPanel(ResourceStack, String)
A constructor that takes a ResourceStack and a name.

Method Index

 o addComponent(Component)
Adds a component without a label to the panel
 o addComponent(Component, Component)
Adds a component and a label to the panel.
 o addComponent(Component, String)
Adds a component and a label to the panel
 o addSpanningComponent(Component)
Adds a component that spans both the left and right columns.
 o removeComponent(Component)
Removes a component and any label associated with it.

Variables

 o 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.

 o 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.

Constructors

 o 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
 o 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

Methods

 o addComponent
 public void addComponent(Component component)
Adds a component without a label to the panel

Parameters:
component - The component to add
 o 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
 o 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
 o 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
 o 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