Package net.infonode.tabbedpanel
Class TabStateChangedEvent
java.lang.Object
java.util.EventObject
net.infonode.tabbedpanel.TabEvent
net.infonode.tabbedpanel.TabStateChangedEvent
- All Implemented Interfaces:
Serializable
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()).
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionTabStateChangedEvent
(Object source, TabbedPanel tabbedPanel, Tab tab, Tab previousTab, Tab currentTab) Constructs a TabStateChangedEvent -
Method Summary
Modifier and TypeMethodDescriptionGets the current TabGets the previous TabGets the TabbedPanel in which the state change occuredMethods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
TabStateChangedEvent
public TabStateChangedEvent(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 eventtabbedPanel
- the tabbep panel in which the state change occuredtab
- the tab that is effectd by this eventpreviousTab
- the tab that was previously in this statecurrentTab
- the tab that is now in this state
-
-
Method Details
-
getTabbedPanel
Gets the TabbedPanel in which the state change occured- Returns:
- the TabbedPanel in which the state change occured
-
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
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
-