Class DeckPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class DeckPanel extends JPanel
A JPanel that is the main panel of the PWizard framework. The components that are to be switched in the PWizard framework are added to this panel
See Also:
  • Constructor Details

    • DeckPanel

      public DeckPanel(SequenceManager mgr)
      Creates a DeckPanel with the specified SequenceManger
      Parameters:
      mgr - the SequenceManager to use
  • Method Details

    • addPanel

      public void addPanel(String name, Component panel)
      Adds the given panel as a component to be switched in the PWizard framework
      Parameters:
      name - of the component to be added. Used internally.
      panel - the panel to be added to the framework
    • getIndex

      public int getIndex(String name)
      Returns the index of the component with the specified name in the PWizard framework
      Parameters:
      name - Name that identifies the component
      Returns:
      the index into the sequence
    • getName

      public String getName(int index)
      Returns the name of the component with the specified index in the PWizard framework
      Parameters:
      index - the index into the sequence
      Returns:
      the name of the component
    • getComponent

      public Component getComponent(String name)
      Returns the component with the specified index
      Parameters:
      name - the name of the component
      Returns:
      the component
    • getFirst

      public String getFirst()
      Returns the name of the first component in the sequence
      Returns:
      the name of the component
    • setFirst

      public void setFirst()
      Sets the first component in the sequence to be visible
    • getCurrent

      public String getCurrent()
      Returns the name of the component that is currently visible
      Returns:
      the name of the currently visible component
    • isLast

      public boolean isLast(String name)
      Returns if the component with the given name is the last in the sequence
      Parameters:
      name - of the component
      Returns:
      true if the component is the last in the sequence
    • getNext

      public String getNext()
      Returns the name of the component that is next in the sequence
      Returns:
      the name of the next component in the sequence
    • getPrevious

      public String getPrevious()
      Returns the name of the component that is previous to the current one
      Returns:
      the name of the previous component in the sequence
    • setPanel

      public void setPanel(String name)
      Sets the component with the specified name to be visible