Class FWSlidingTabPanel

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class FWSlidingTabPanel extends JPanel implements ActionListener
Shows a panel for showing different tabs with the possibility to switch with a slide between them.
Author:
Andreas Enders
See Also:
  • Constructor Details

    • FWSlidingTabPanel

      public FWSlidingTabPanel()
    • FWSlidingTabPanel

      public FWSlidingTabPanel(int aMinimumWidth)
      Parameters:
      aMinimumWidth -
  • Method Details

    • addTab

      public void addTab(String aTitle, JComponent aComponent)
      Adds a tab. Uses the title as id.
    • addTab

      public void addTab(String aTitle, Icon aIcon, JComponent aComponent)
      Adds a tab. Uses the title as id.
    • addTab

      public void addTab(String aID, String aTitle, JComponent aComponent)
      Adds a tab.
    • addTab

      public void addTab(String aID, String aTitle, Icon aIcon, JComponent aComponent)
      Adds a tab.
    • actionPerformed

      public void actionPerformed(ActionEvent aActionEvent)
      Slides between the panels.
      Specified by:
      actionPerformed in interface ActionListener
    • setSelectedIndex

      public void setSelectedIndex(int aIndex)
      Selects the tab at the given index.
    • setSelectedItem

      public void setSelectedItem(String aID)
      Selects the tab with the given id.
    • getSelectedItem

      public JComponent getSelectedItem()
      Returns the selected tab.
    • isShiftRunning

      public boolean isShiftRunning()
      Returns if the shift is running.
    • addChangeListener

      public void addChangeListener(ChangeListener aChangeListener)
      Adds a new listener, which will be called, when a different tab is selected.
    • removeChangeListener

      public void removeChangeListener(ChangeListener aChangeListener)
      Removes the given listener.