net.infonode.tabbedpanel
Class TabStateChangedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.infonode.tabbedpanel.TabEvent
          extended by net.infonode.tabbedpanel.TabStateChangedEvent
All Implemented Interfaces:
java.io.Serializable

public class TabStateChangedEvent
extends TabEvent

TabStateChangedEvent is a state changed event. A change could mean that the selected tab has been deselcted and another tab has been selected.

Example: Tab 1 is the selected tab. The user selects tab 2 and tab 1 will be deselected. A change event will then be triggered where tab 1 will be the previous tab (getPreviousTab()) and tab 2 will be the curent tab (getCurrentTab()).

Version:
$Revision: 1.5 $
Author:
$Author: jesper $
See Also:
TabListener, TabbedPanel, Tab, Serialized Form

Field Summary
private  Tab currentTab
           
private  Tab previousTab
           
private  TabbedPanel tabbedPanel
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TabStateChangedEvent(java.lang.Object source, TabbedPanel tabbedPanel, Tab tab, Tab previousTab, Tab currentTab)
          Constructs a TabStateChangedEvent
 
Method Summary
 Tab getCurrentTab()
          Gets the current Tab
 Tab getPreviousTab()
          Gets the previous Tab
 TabbedPanel getTabbedPanel()
          Gets the TabbedPanel in which the state change occured
 
Methods inherited from class net.infonode.tabbedpanel.TabEvent
getTab
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tabbedPanel

private TabbedPanel tabbedPanel

previousTab

private Tab previousTab

currentTab

private Tab currentTab
Constructor Detail

TabStateChangedEvent

public TabStateChangedEvent(java.lang.Object source,
                            TabbedPanel tabbedPanel,
                            Tab tab,
                            Tab previousTab,
                            Tab currentTab)
Constructs a TabStateChangedEvent

Parameters:
source - the tabbed panel or tab that is the source for this event
tabbedPanel - the tabbep panel in which the state change occured
tab - the tab that is effectd by this event
previousTab - the tab that was previously in this state
currentTab - the tab that is now in this state
Method Detail

getTabbedPanel

public TabbedPanel getTabbedPanel()
Gets the TabbedPanel in which the state change occured

Returns:
the TabbedPanel in which the state change occured

getPreviousTab

public Tab getPreviousTab()
Gets the previous Tab

Returns:
the previous Tab before the change or null if no previous tab was in that state before the change

getCurrentTab

public Tab getCurrentTab()
Gets the current Tab

Returns:
the current Tab after the change or null if no current tab is in the that state after the change