Class zwt.ui.tab.TabEventManager
Extends
zwt.event.UIEventManager.
A tab event manager is used by a tab bar to process tab events and dispatch them to the appropriate handlers.
Handlers are methods previously registered on the event manager to handle a specific type of event. A typical handler method has two input parameters: the object that triggered the event and the event. An optional object argument may also be passed to the handler if it was provided when dispatching the event to the event manager (see zwt.event.EventManager#onEvent).
Defined in: TabEventManager.js.
Constructor Attributes | Constructor Name and Description |
---|---|
zwt.ui.tab.TabEventManager(zwt_ui_tab_TabBar_tabbar)
Construct a tab event manager and attach it to the specified tab bar.
|
Method Attributes | Method Name and Description |
---|---|
addTabCloseHandler(function_handler)
Add a tab close handler.
|
|
addTabDeselectedHandler(function_handler)
Add a tab deselected handler.
|
|
addTabInsertedHandler(function_handler)
Add a tab inserted handler.
|
|
addTabRemovedHandler(function_handler)
Add a tab removed handler.
|
|
addTabSelectedHandler(function_handler)
Add a tab selected handler.
|
|
onEvent(zwt_ui_tab_TabEvent_event, zwt_ui_tab_TabBar_overrideTabbar, object_arg)
Dispatch the specified tab event to the appropriate handlers.
|
|
registerItem(zwt_ui_tab_TabItem_item)
Register the specified tab item into the event manager.
|
|
removeTabCloseHandler(function_handler)
Remove a tab close handler.
|
|
removeTabDeselectedHandler(function_handler)
Remove a tab deselected handler.
|
|
removeTabInsertedHandler(function_handler)
Remove a tab inserted handler.
|
|
removeTabRemovedHandler(function_handler)
Remove a tab removed handler.
|
|
removeTabSelectedHandler(function_handler)
Remove a tab selected handler.
|
|
unregisterItem(zwt_ui_tab_TabItem_item)
Unregister the specified tab item from the event manager.
|
- Methods borrowed from class zwt.event.UIEventManager:
- finalizeEventHandling, registerElement
- Methods borrowed from class zwt.event.EventManager:
- addHandler, addHandlers, removeHandler, removeHandlers
Class Detail
zwt.ui.tab.TabEventManager(zwt_ui_tab_TabBar_tabbar)
Construct a tab event manager and attach it to the specified tab bar.
Author: Jeremy KUHN.
Author: Jeremy KUHN.
- Parameters:
- {zwt.ui.tab.TabBar} zwt_ui_tab_TabBar_tabbar
- The tab bar to monitor
Method Detail
addTabCloseHandler(function_handler)
Add a tab close handler.
- Parameters:
- {Function} function_handler
- The handler to add
addTabDeselectedHandler(function_handler)
Add a tab deselected handler.
- Parameters:
- {Function} function_handler
- The handler to add
addTabInsertedHandler(function_handler)
Add a tab inserted handler.
- Parameters:
- {Function} function_handler
- The handler to add
addTabRemovedHandler(function_handler)
Add a tab removed handler.
- Parameters:
- {Function} function_handler
- The handler to add
addTabSelectedHandler(function_handler)
Add a tab selected handler.
- Parameters:
- {Function} function_handler
- The handler to add
onEvent(zwt_ui_tab_TabEvent_event, zwt_ui_tab_TabBar_overrideTabbar, object_arg)
Dispatch the specified tab event to the appropriate handlers.
- Parameters:
- {zwt.ui.tab.TabEvent} zwt_ui_tab_TabEvent_event
- The event to dispatch
- {zwt.ui.tab.TabBar} zwt_ui_tab_TabBar_overrideTabbar
- If set it overrides the tab bar object passed to the handlers which is the tab bar managed by the event manager by default
- {zwt.Object} object_arg
- An optional object to pass to the handler method
registerItem(zwt_ui_tab_TabItem_item)
Register the specified tab item into the event manager. This method is basically called when a tab item is added to the tab bar.
The event manager will catch the UI event emitted by the item and dispatch them to the handlers.
- Parameters:
- {zwt.ui.tab.TabItem} zwt_ui_tab_TabItem_item
- The item to register
removeTabCloseHandler(function_handler)
Remove a tab close handler.
- Parameters:
- {Function} function_handler
- The handler to remove
removeTabDeselectedHandler(function_handler)
Remove a tab deselected handler.
- Parameters:
- {Function} function_handler
- The handler to remove
removeTabInsertedHandler(function_handler)
Remove a tab inserted handler.
- Parameters:
- {Function} function_handler
- The handler to remove
removeTabRemovedHandler(function_handler)
Remove a tab removed handler.
- Parameters:
- {Function} function_handler
- The handler to remove
removeTabSelectedHandler(function_handler)
Remove a tab selected handler.
- Parameters:
- {Function} function_handler
- The handler to remove
unregisterItem(zwt_ui_tab_TabItem_item)
Unregister the specified tab item from the event manager. This method is basically called when a tab item is removed from the tab bar.
- Parameters:
- {zwt.ui.tab.TabItem} zwt_ui_tab_TabItem_item
- The item to unregister