edu.utk.cs.icl.rest.swing
Class JSectionPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byedu.utk.cs.icl.rest.swing.JSectionPanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class JSectionPanel
extends JPanel

Panel providing methods for sectioning it and handeling the oppropriate events.

Since:
1.0
Version:
$Revision: 1.18 $ $Date: 2005/01/31 19:14:55 $
Author:
Eric Meek
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int LBL_IDX
          Label index in the Object arrays
static int PNL_IDX
          Index of the Panel in the Object arrays
static int ROW_IDX
          Index of the GridBagLayout row for the section panel
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JSectionPanel()
          Creates new form JSectionPanel not using the section padding
JSectionPanel(boolean padSections)
          Creates new form JSectionPanel
 
Method Summary
 Component add(JComponent c)
          Add an JComponent to the last created section
 JCheckBox addCheckBox(JPanel sectionPanel, String label, boolean value, String tooltip)
          Adds a checkbox of value with the given label to the specified section.
 JCheckBox addCheckBox(String label)
          Adds an unchecked checkbox with the given label to the last created section.
 JCheckBox addCheckBox(String label, boolean value)
          Adds a checkbox of value with the given label to the last created section.
 JCheckBox addCheckBox(String label, boolean value, String tooltip)
          Adds a checkbox of value with the given label to the last created section.
 JCheckBox addCheckBox(String sectionName, String label, boolean value, String tooltip)
          Adds a checkbox of value with the given label to the specified section.
 JComboBox addComboBox(JPanel sectionPanel, String label, Object[] values, String tooltip, boolean editable)
          Adds a JComboBox of the values with the given label to the specified section.
 JComboBox addComboBox(String label, Object[] values, boolean editable)
          Adds a JComboBox of the values with the given label to the last created section.
 JComboBox addComboBox(String label, Object[] values, String tooltip, boolean editable)
          Adds a JComboBox of the values with the given label to the last created section.
 JComboBox addComboBox(String sectionName, String label, Object[] values, String tooltip, boolean editable)
          Adds a JComboBox of the values with the given label to the specified section.
 JComponent addComponent(JComponent value)
          Adds a text JComponent to the specified section.
 JComponent addComponent(JPanel sectionPanel, JComponent value)
          Adds a text JComponent to the specified section.
 JComponent addComponent(String sectionName, JComponent value)
          Adds a text JComponent to the specified section.
 JList addList(JPanel jpSection, String label, Object[] value, boolean differentRows, ListSelectionListener lsl)
          Add a JList to the specified section.
 JList addList(JPanel sectionPanel, String label, Object[] value, int visibleRows, boolean differentRows, ListSelectionListener lsl)
          Add a JList to the specified section.
 JList addList(Object[] value, int visibleRows, ListSelectionListener lsl)
          Add a JList to the last created section.
 JList addList(Object[] value, ListSelectionListener lsl)
          Add a JList to the last created section.
 JList addList(String label, Object[] value)
          Add a JList to the last created section.
 JList addList(String label, Object[] value, boolean differentRows)
          Add a JList to the last created section.
 JList addList(String label, Object[] value, boolean differentRows, ListSelectionListener lsl)
          Add a JList to the last created section.
 JList addList(String label, Object[] value, int visibleRows)
          Add a JList to the last created section.
 JList addList(String label, Object[] value, int visibleRows, boolean differentRows)
          Add a JList to the last created section.
 JList addList(String label, Object[] value, int visibleRows, boolean differentRows, ListSelectionListener lsl)
          Add a JList to the last created section.
 JList addList(String label, Object[] value, int visibleRows, ListSelectionListener lsl)
          Add a JList to the last created section.
 JList addList(String label, Object[] value, ListSelectionListener lsl)
          Add a JList to the last created section.
 JList addList(String sectionName, String label, Object[] value, boolean differentRows, ListSelectionListener lsl)
          Add a JList to the specified section.
 JList addList(String sectionName, String label, Object[] value, int visibleRows, boolean differentRows, ListSelectionListener lsl)
          Add a JList to the specified section.
 JTextArea addTextArea(JPanel sectionPanel, String label, String value, boolean isDescription)
          Add a text area to the specified section.
 JTextArea addTextArea(JPanel sectionPanel, String label, String value, String tooltip, boolean isDescription)
          Add a text area to the specified section.
 JTextArea addTextArea(String value)
          Add a text area to the to last created section.
 JTextArea addTextArea(String value, boolean isDescription)
          Add a text area to the to last created section.
 JTextArea addTextArea(String label, String value, boolean isDescription)
          Add a text area to the to last created section.
 JTextArea addTextArea(String label, String value, String tooltip)
          Add a text area to the to last created section.
 JTextArea addTextArea(String sectionName, String label, String value, boolean isDescription)
          Add a text area to the specified section.
 JTextArea addTextArea(String sectionName, String label, String value, String tooltip)
          Add a text area to the specified section.
 JTextField addTextField(JPanel sectionPanel, String label, String value, String tooltip)
          Adds a text field with the given value to the specified section.
 JTextField addTextField(String label, String tooltip)
          Adds a text field without a the text value to the last created section.
 JTextField addTextField(String label, String value, String tooltip)
          Adds a text field with the given value to the last created section.
 JTextField addTextField(String sectionName, String label, String value, String tooltip)
          Adds a text field with the given value to the specified section.
 JLabel addTextLbl(JPanel sectionPanel, String label, String value)
          Adds a text label and the text value to the specified section.
 JLabel addTextLbl(String value)
          Adds a text label and the text value to the last created section.
 JLabel addTextLbl(String label, String value)
          Adds a text label and the text value to the last created section.
 JLabel addTextLbl(String sectionName, String label, String value)
          Adds a text label and the text value to the specified section.
 void changeSectionPanel(String name, JPanel newPanel)
          Change the section panel for the named section
 JPanel createSection(String name, String text, String tooltiptext)
          Creates a new drop-down section in the getInfo window
 JPanel createSection(String name, String text, String tooltiptext, Color background)
          Creates a new drop-down section in the getInfo window
 JPanel createSection(String name, String text, String tooltiptext, Color background, JPanel contentPanel)
          Creates a new drop-down section in the getInfo window
 JTextArea getJtaDescription()
          Getter for property jtaDescription.
 JPanel getSectionPnl(String name)
          Get the section with the specified name
 boolean isSectionPaddingUsed()
          Discover if Section Padding is being used to move all the section to the top of the panel.
 void setBackground(Color color)
          Set the background color of the SectionPanel
 void setJtaDescription(JTextArea jtaDescription)
          Setter for property jtaDescription.
 void setOpaque(boolean isOpaque)
          Set the opacity of the panel
 void setParentFrame(JFrame elFrame)
          Setter for property parentFrame.
 void setPrevName(String name)
          Sets the name of the last component created
 void setSectionPnl(String name, JPanel panel)
          Set the section with the specified name
 void setVisible(boolean visibility)
          Set frame visibility
 void toggleSectionVisible()
          Toggle the visibility of the last section created
 void useSectionPadding(boolean b)
          If set to true, all the sections are forced to the top of the panel.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LBL_IDX

public static final int LBL_IDX
Label index in the Object arrays

See Also:
Constant Field Values

PNL_IDX

public static final int PNL_IDX
Index of the Panel in the Object arrays

See Also:
Constant Field Values

ROW_IDX

public static final int ROW_IDX
Index of the GridBagLayout row for the section panel

See Also:
Constant Field Values
Constructor Detail

JSectionPanel

public JSectionPanel()
Creates new form JSectionPanel not using the section padding


JSectionPanel

public JSectionPanel(boolean padSections)
Creates new form JSectionPanel

Parameters:
padSections - If the sections should be auto pushed to the top of the panel.
Method Detail

add

public Component add(JComponent c)
Add an JComponent to the last created section

Parameters:
c - Component to add
Returns:
Added component

createSection

public JPanel createSection(String name,
                            String text,
                            String tooltiptext)
Creates a new drop-down section in the getInfo window

Parameters:
name - Name of the section
text - Text to display to the user
tooltiptext - Mouse over text
Returns:
returns the JPanel representation of this item

createSection

public JPanel createSection(String name,
                            String text,
                            String tooltiptext,
                            Color background)
Creates a new drop-down section in the getInfo window

Parameters:
name - Name of the section
text - Text to display to the user
tooltiptext - Mouse over text
background - Background color of the panels
Returns:
returns the JPanel representation of this item

createSection

public JPanel createSection(String name,
                            String text,
                            String tooltiptext,
                            Color background,
                            JPanel contentPanel)
Creates a new drop-down section in the getInfo window

Parameters:
contentPanel - Panel to show and hide
name - Name of the section
text - Text to display to the user
tooltiptext - Mouse over text
background - Background color of the panels
Returns:
returns the JPanel representation of this item

addComponent

public JComponent addComponent(JComponent value)
Adds a text JComponent to the specified section. If the section panel is left null, then the item is added to the last created section.

Parameters:
value - JComponent to add to the section
Returns:
JComponent of the value

addComponent

public JComponent addComponent(String sectionName,
                               JComponent value)
Adds a text JComponent to the specified section. If the section panel is left null, then the item is added to the last created section.

Parameters:
sectionName - The section panel to add the components
value - JComponent to add to the section
Returns:
JComponent of the value

addComponent

public JComponent addComponent(JPanel sectionPanel,
                               JComponent value)
Adds a text JComponent to the specified section. If the section panel is left null, then the item is added to the last created section.

Parameters:
sectionPanel - The section panel to add the components
value - JComponent to add to the section
Returns:
JComponent of the value

addTextLbl

public JLabel addTextLbl(String value)
Adds a text label and the text value to the last created section.

Parameters:
value - String containing the value for the Label
Returns:
JLabel of the value

addTextLbl

public JLabel addTextLbl(String label,
                         String value)
Adds a text label and the text value to the last created section.

Parameters:
label - String containing the label name
value - String containing the value for the label
Returns:
JLabel of the value

addTextLbl

public JLabel addTextLbl(String sectionName,
                         String label,
                         String value)
Adds a text label and the text value to the specified section. If the section is left null, then the item is added to the last created section.

Parameters:
sectionName - The section to add the components
label - String containing the label name
value - String containing the value for the label
Returns:
JLabel of the value

addTextLbl

public JLabel addTextLbl(JPanel sectionPanel,
                         String label,
                         String value)
Adds a text label and the text value to the specified section. If the section panel is left null, then the item is added to the last created section.

Parameters:
sectionPanel - The section panel to add the components
label - String containing the label name
value - String containing the value for the label
Returns:
JLabel of the value

addTextField

public JTextField addTextField(String label,
                               String tooltip)
Adds a text field without a the text value to the last created section.

Parameters:
label - String containing the value for the Label
tooltip - String value for the checkbox's tooltip
Returns:
JTextField of the value

addTextField

public JTextField addTextField(String label,
                               String value,
                               String tooltip)
Adds a text field with the given value to the last created section.

Parameters:
label - String containing the label name
value - String containing the value for the label
tooltip - String value for the checkbox's tooltip
Returns:
JTextField of the value

addTextField

public JTextField addTextField(String sectionName,
                               String label,
                               String value,
                               String tooltip)
Adds a text field with the given value to the specified section. If the section is left null, then the item is added to the last created section.

Parameters:
sectionName - The section to add the components
label - String containing the label name
value - String containing the value for the label
tooltip - String value for the checkbox's tooltip
Returns:
JTextField of the value

addTextField

public JTextField addTextField(JPanel sectionPanel,
                               String label,
                               String value,
                               String tooltip)
Adds a text field with the given value to the specified section. If the section is left null, then the item is added to the last created section.

Parameters:
sectionPanel - The section panel to add the components
label - String containing the label name
value - String containing the value for the label
tooltip - String value for the checkbox's tooltip
Returns:
JTextField of the value

addCheckBox

public JCheckBox addCheckBox(String label)
Adds an unchecked checkbox with the given label to the last created section.

Parameters:
label - String containing the value for the Label
Returns:
JCheckBox Created JCheckBox

addCheckBox

public JCheckBox addCheckBox(String label,
                             boolean value)
Adds a checkbox of value with the given label to the last created section.

Parameters:
label - String containing the label name
value - Boolean value for the checkbox
Returns:
JCheckBox Created JCheckBox

addCheckBox

public JCheckBox addCheckBox(String label,
                             boolean value,
                             String tooltip)
Adds a checkbox of value with the given label to the last created section.

Parameters:
label - String containing the label name
value - Boolean value for the checkbox
tooltip - String value for the checkbox's tooltip
Returns:
JCheckBox Created JCheckBox

addCheckBox

public JCheckBox addCheckBox(String sectionName,
                             String label,
                             boolean value,
                             String tooltip)
Adds a checkbox of value with the given label to the specified section. If the section is left null, then the item is added to the last created section.

Parameters:
sectionName - The section to add the components
label - String containing the label name
value - Boolean value for the checkbox
tooltip - String value for the checkbox's tooltip
Returns:
JCheckBox Created JCheckBox

addCheckBox

public JCheckBox addCheckBox(JPanel sectionPanel,
                             String label,
                             boolean value,
                             String tooltip)
Adds a checkbox of value with the given label to the specified section. If the section is left null, then the item is added to the last created section.

Parameters:
sectionPanel - The section panel to add the components
label - String containing the label name
value - Boolean value for the checkbox
tooltip - String value for the checkbox's tooltip
Returns:
JCheckBox Created JCheckBox

addComboBox

public JComboBox addComboBox(String label,
                             Object[] values,
                             boolean editable)
Adds a JComboBox of the values with the given label to the last created section.

Parameters:
values - Values to fill the JComboBox
editable - Should the combobox be editable
label - String containing the label name
Returns:
The created JComboBox

addComboBox

public JComboBox addComboBox(String label,
                             Object[] values,
                             String tooltip,
                             boolean editable)
Adds a JComboBox of the values with the given label to the last created section.

Parameters:
values - Values to fill the JComboBox
editable - Should the combobox be editable
label - String containing the label name
tooltip - String value for the checkbox's tooltip
Returns:
The created JComboBox

addComboBox

public JComboBox addComboBox(String sectionName,
                             String label,
                             Object[] values,
                             String tooltip,
                             boolean editable)
Adds a JComboBox of the values with the given label to the specified section. If the section is left null, then the item is added to the last created section.

Parameters:
sectionName - The section to add the components
values - Values to fill the JComboBox
editable - Should the combobox be editable
label - String containing the label name
tooltip - String value for the checkbox's tooltip
Returns:
The created JComboBox

addComboBox

public JComboBox addComboBox(JPanel sectionPanel,
                             String label,
                             Object[] values,
                             String tooltip,
                             boolean editable)
Adds a JComboBox of the values with the given label to the specified section. If the section is left null, then the item is added to the last created section.

Parameters:
sectionPanel - The section to add the components
values - Values to fill the JComboBox
editable - Should the combobox be editable
label - String containing the label name
tooltip - String value for the checkbox's tooltip
Returns:
The created JComboBox

addTextArea

public JTextArea addTextArea(String value,
                             boolean isDescription)
Add a text area to the to last created section. If the label is null, no label is created.

Parameters:
value - Initial value of the text area
isDescription - Set if this is the description component, currently not used
Returns:
JTextArea created

addTextArea

public JTextArea addTextArea(String value)
Add a text area to the to last created section. If the label is null, no label is created.

Parameters:
value - Initial value of the text area
Returns:
JTextArea created

addTextArea

public JTextArea addTextArea(String label,
                             String value,
                             String tooltip)
Add a text area to the to last created section. If the label is null, no label is created.

Parameters:
tooltip - Tooltip Text
label - Label of the text area, if null then no label
value - Initial value of the text area
Returns:
JTextArea created

addTextArea

public JTextArea addTextArea(String label,
                             String value,
                             boolean isDescription)
Add a text area to the to last created section. If the label is null, no label is created.

Parameters:
label - Label of the text area, if null then no label
value - Initial value of the text area
isDescription - Set if this is the description component, currently not used
Returns:
JTextArea created

addTextArea

public JTextArea addTextArea(String sectionName,
                             String label,
                             String value,
                             boolean isDescription)
Add a text area to the specified section. If the section is null, added to last created section. If the label is null, no label is created.

Parameters:
sectionName - Section to add these components, if null add to the last created section
label - Label of the text area, if null then no label
value - Initial value of the text area
isDescription - Set if this is the description component, currently not used
Returns:
JTextArea created

addTextArea

public JTextArea addTextArea(String sectionName,
                             String label,
                             String value,
                             String tooltip)
Add a text area to the specified section. If the section is null, added to last created section. If the label is null, no label is created.

Parameters:
tooltip - Tooltip Text
sectionName - Section to add these components, if null add to the last created section
label - Label of the text area, if null then no label
value - Initial value of the text area
Returns:
JTextArea created

addTextArea

public JTextArea addTextArea(JPanel sectionPanel,
                             String label,
                             String value,
                             boolean isDescription)
Add a text area to the specified section. If the section is null, added to last created section. If the label is null, no label is created.

Parameters:
sectionPanel - Section to add these components, if null add to the last created section
label - Label of the text area, if null then no label
value - Initial value of the text area
isDescription - Set if this is the description component, currently not used
Returns:
JTextArea created

addTextArea

public JTextArea addTextArea(JPanel sectionPanel,
                             String label,
                             String value,
                             String tooltip,
                             boolean isDescription)
Add a text area to the specified section. If the section is null, added to last created section. If the label is null, no label is created.

Parameters:
sectionPanel - Section to add these components, if null add to the last created section
tooltip - Tooltip Text
label - Label of the text area, if null then no label
value - Initial value of the text area
isDescription - Set if this is the description component, currently not used
Returns:
JTextArea created

addList

public JList addList(Object[] value,
                     ListSelectionListener lsl)
Add a JList to the last created section. If the label is null, no label is created.

Parameters:
value - values to use in the list
lsl - List selection listener to handle the selection of list items
Returns:
JList created

addList

public JList addList(Object[] value,
                     int visibleRows,
                     ListSelectionListener lsl)
Add a JList to the last created section. If the label is null, no label is created.

Parameters:
value - values to use in the list
visibleRows - Number of visible rows
lsl - List selection listener to handle the selection of list items
Returns:
JList created

addList

public JList addList(String label,
                     Object[] value)
Add a JList to the last created section. If the label is null, no label is created.

Parameters:
label - Label of the list, if null no label is created
value - values to use in the list
Returns:
JList created

addList

public JList addList(String label,
                     Object[] value,
                     boolean differentRows)
Add a JList to the last created section. If the label is null, no label is created.

Parameters:
differentRows - Display the label and component on different rows
label - Label of the list, if null no label is created
value - values to use in the list
Returns:
JList created

addList

public JList addList(String label,
                     Object[] value,
                     int visibleRows)
Add a JList to the last created section. If the label is null, no label is created.

Parameters:
label - Label of the list, if null no label is created
value - values to use in the list
visibleRows - Number of visible rows
Returns:
JList created

addList

public JList addList(String label,
                     Object[] value,
                     int visibleRows,
                     boolean differentRows)
Add a JList to the last created section. If the label is null, no label is created.

Parameters:
label - Label of the list, if null no label is created
value - values to use in the list
differentRows - If the label and list should appear on different rows
visibleRows - Number of visible rows
Returns:
JList created

addList

public JList addList(String label,
                     Object[] value,
                     ListSelectionListener lsl)
Add a JList to the last created section. If the label is null, no label is created.

Parameters:
label - Label of the list, if null no label is created
value - values to use in the list
lsl - List selection listener to handle the selection of list items
Returns:
JList created

addList

public JList addList(String label,
                     Object[] value,
                     boolean differentRows,
                     ListSelectionListener lsl)
Add a JList to the last created section. If the label is null, no label is created.

Parameters:
label - Label of the list, if null no label is created
value - values to use in the list
differentRows - If the label and list should appear on different rows
lsl - List selection listener to handle the selection of list items
Returns:
JList created

addList

public JList addList(String label,
                     Object[] value,
                     int visibleRows,
                     ListSelectionListener lsl)
Add a JList to the last created section. If the label is null, no label is created.

Parameters:
label - Label of the list, if null no label is created
value - values to use in the list
visibleRows - Number of visible rows
lsl - List selection listener to handle the selection of list items
Returns:
JList created

addList

public JList addList(String label,
                     Object[] value,
                     int visibleRows,
                     boolean differentRows,
                     ListSelectionListener lsl)
Add a JList to the last created section. If the label is null, no label is created.

Parameters:
differentRows - Display the label and component on different rows
label - Label of the list, if null no label is created
value - values to use in the list
visibleRows - Number of visible rows
lsl - List selection listener to handle the selection of list items
Returns:
JList created

addList

public JList addList(JPanel jpSection,
                     String label,
                     Object[] value,
                     boolean differentRows,
                     ListSelectionListener lsl)
Add a JList to the specified section. If the section is null, added to last created section. If the label is null, no label is created.

Parameters:
jpSection - Section to add these component, if null added to the last created section
label - Label of the list, if null no label is created
value - values to use in the list
differentRows - If the label and list should appear on different rows
lsl - List selection listener to handle the selection of list items
Returns:
JList created

addList

public JList addList(String sectionName,
                     String label,
                     Object[] value,
                     boolean differentRows,
                     ListSelectionListener lsl)
Add a JList to the specified section. If the section is null, added to last created section. If the label is null, no label is created.

Parameters:
sectionName - Name of the section to add these components, if null added to the last created section
label - Label of the list, if null no label is created
value - values to use in the list
differentRows - If the label and list should appear on different rows
lsl - List selection listener to handle the selection of list items
Returns:
JList created

addList

public JList addList(String sectionName,
                     String label,
                     Object[] value,
                     int visibleRows,
                     boolean differentRows,
                     ListSelectionListener lsl)
Add a JList to the specified section. If the section is null, added to last created section. If the label is null, no label is created.

Parameters:
sectionName - Name of the section to add the components, if null add to last created section
label - Label of the list, if null no label is created
value - values to use in the list
visibleRows - Number of visible rows
differentRows - If the label and list should appear on different rows
lsl - List selection listener to handle the selection of list items
Returns:
JList created

addList

public JList addList(JPanel sectionPanel,
                     String label,
                     Object[] value,
                     int visibleRows,
                     boolean differentRows,
                     ListSelectionListener lsl)
Add a JList to the specified section. If the section is null, added to last created section. If the label is null, no label is created.

Parameters:
sectionPanel - Section to add these component, if null added to the last created section
label - Label of the list, if null no label is created
value - values to use in the list
visibleRows - Number of visible rows
differentRows - If the label and list should appear on different rows
lsl - List selection listener to handle the selection of list items
Returns:
JList created

setVisible

public void setVisible(boolean visibility)
Set frame visibility

Parameters:
visibility - Visibility

getSectionPnl

public JPanel getSectionPnl(String name)
Get the section with the specified name

Parameters:
name - Name of the section to retrieve
Returns:
Section

changeSectionPanel

public void changeSectionPanel(String name,
                               JPanel newPanel)
Change the section panel for the named section

Parameters:
name - section name
newPanel - New Section panel

setSectionPnl

public void setSectionPnl(String name,
                          JPanel panel)
Set the section with the specified name

Parameters:
name - Name of the section to retrieve
panel - New Section

toggleSectionVisible

public void toggleSectionVisible()
Toggle the visibility of the last section created


setParentFrame

public void setParentFrame(JFrame elFrame)
Setter for property parentFrame. Set this property to autopack the parent frame when changing a section's visibility.

Parameters:
elFrame - Value of property parentFrame.

getJtaDescription

public JTextArea getJtaDescription()
Getter for property jtaDescription.

Returns:
Value of property jtaDescription.

setJtaDescription

public void setJtaDescription(JTextArea jtaDescription)
Setter for property jtaDescription.

Parameters:
jtaDescription - New value of property jtaDescription.

setPrevName

public void setPrevName(String name)
Sets the name of the last component created

Parameters:
name - New name for the previous component created

setBackground

public void setBackground(Color color)
Set the background color of the SectionPanel

Parameters:
color - New Color

isSectionPaddingUsed

public boolean isSectionPaddingUsed()
Discover if Section Padding is being used to move all the section to the top of the panel.

Returns:
Value of property bUseSectionPadding.

setOpaque

public void setOpaque(boolean isOpaque)
Set the opacity of the panel

Parameters:
isOpaque - Opacity

useSectionPadding

public void useSectionPadding(boolean b)
If set to true, all the sections are forced to the top of the panel. If no parent frame is set for this panel, it is advisible to set this property to maintain a nice looking panel.

Parameters:
b - New value of property bUseSectionPadding.