Class GuiUtils.CardLayoutPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
ButtonTabbedPane.ComponentPanel
Enclosing class:
GuiUtils

public static class GuiUtils.CardLayoutPanel extends JPanel
Class CardLayoutPanel is a utility that does a card layou of its components. It keeps the CardLayout object around and allows for easy calls to show without keeping track of the String layout key. It is also used in the showComponentInTabs calls to show components in the card layout.
Version:
$Revision: 1.317 $
Author:
IDV Development Team
See Also:
  • Constructor Details

    • CardLayoutPanel

      public CardLayoutPanel()
      ctor
    • CardLayoutPanel

      public CardLayoutPanel(CardLayout cardLayout)
      ctor
      Parameters:
      cardLayout - the layout to use
  • Method Details

    • getCardLayout

      public CardLayout getCardLayout()
      Get the layout
      Returns:
      The layout
    • getVisibleComponent

      public Component getVisibleComponent()
      Get the component that is visible
      Returns:
      visible component
    • addCard

      public String addCard(Component comp)
      Add the component. Generate and return a unique layout key
      Parameters:
      comp - the component
      Returns:
      Where its added in the card layout
    • add

      public Component add(String layoutKey, Component comp)
      add the component. This overrides the base class method to store the key to component mapping
      Overrides:
      add in class Container
      Parameters:
      layoutKey - layout key
      comp - component
      Returns:
      The component
    • show

      public void show(String key)
      Show the component identified by the key
      Parameters:
      key - the key
    • show

      public void show(int i)
      Show the card
      Parameters:
      i - card index
    • getVisibleIndex

      public int getVisibleIndex()
      Get the visible index
      Returns:
      the index
    • flip

      public void flip()
      flip to the next component
    • contains

      public boolean contains(Component comp)
      Does this contain the component
      Parameters:
      comp - the component
      Returns:
      true if it's there
    • containsKey

      public boolean containsKey(Object object)
      Look for a key
      Parameters:
      object - key object
      Returns:
      true if found
    • show

      public void show(Component comp)
      Show the component
      Parameters:
      comp - the component
    • removeAll

      public void removeAll()
      Overwrite base class method to clear the component to key map
      Overrides:
      removeAll in class Container
    • remove

      public void remove(Component comp)
      Overwrite base class method to clear the component to key map
      Overrides:
      remove in class Container
      Parameters:
      comp - the component