edu.wpi.cs.dsrg.xmldb.xat.component.gui.utils
Class PanelMaker

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.component.gui.utils.PanelMaker

public class PanelMaker
extends java.lang.Object

The PanelMaker makes all of the panels for the GUI. Any selectable/deselected components, such as statistic check boxes, are stored in OptionsStorage. All panels must have a unique name.

Author:
Maylene Waltz

Constructor Summary
PanelMaker(GUI gui)
          Constructor associates the given gui with this PanelMaker.
 
Method Summary
 javax.swing.JPanel getPanel(java.lang.String panelName)
          Returns the panel with the given panelName.
 java.awt.Component makePanel(java.lang.String panelName)
          Makes the panel for the given panelName.
 void setPanel(java.lang.String panelName, javax.swing.JPanel panel)
          Puts the given panel with the given panelName into the HashMap of made panels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PanelMaker

public PanelMaker(GUI gui)
Constructor associates the given gui with this PanelMaker.

Method Detail

getPanel

public javax.swing.JPanel getPanel(java.lang.String panelName)
Returns the panel with the given panelName.

Parameters:
panelName - the name of the panel that would like to be retrieved.
Returns:
the panel with the given panelName. Returns null if no panel exists with the given panelName.

setPanel

public void setPanel(java.lang.String panelName,
                     javax.swing.JPanel panel)
Puts the given panel with the given panelName into the HashMap of made panels.

Parameters:
panelName - the name of the panel. Must be a unique identifier.
panel - the panel to be placed in the HashMap of made panels

makePanel

public java.awt.Component makePanel(java.lang.String panelName)
Makes the panel for the given panelName. If the panel has previously been made, then the panel is retrieved from panel storage and returned.

Parameters:
panelName - the name of the panel to be made
Returns:
the actual JPanel associated with the given panelName