org.araneaframework.uilib.tab
Class TabWidget

java.lang.Object
  extended by org.araneaframework.core.BaseComponent
      extended by org.araneaframework.core.BaseService
          extended by org.araneaframework.core.BaseWidget
              extended by org.araneaframework.core.BaseApplicationWidget
                  extended by org.araneaframework.uilib.tab.TabWidget
All Implemented Interfaces:
Serializable, Component, Composite, Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget, ApplicationComponent, ApplicationService, ApplicationWidget, Service, TabContext, Viewable, Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget, Widget

public class TabWidget
extends BaseApplicationWidget
implements TabContext

Represents a tab managed by TabContainerContext implementation TabContainerWidget. Tab consists of label and content, represented either by Widgets (for stateful tabs) or WidgetFactoryies (for stateless tabs). Difference between stateful and stateless tabs is that stateless tabs forget the state when they become inactive (deselected).

Since:
1.1
Author:
Taimo Peelo (taimo@araneaframework.org)
See Also:
Serialized Form

Nested Class Summary
protected  class TabWidget.ComponentImpl
           
 
Nested classes/interfaces inherited from class org.araneaframework.core.BaseApplicationWidget
BaseApplicationWidget.CompositeImpl, BaseApplicationWidget.ViewableImpl, BaseApplicationWidget.ViewModel
 
Nested classes/interfaces inherited from class org.araneaframework.core.BaseWidget
BaseWidget.WidgetImpl
 
Nested classes/interfaces inherited from class org.araneaframework.core.BaseService
BaseService.ServiceImpl
 
Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationWidget
ApplicationWidget.WidgetViewModel
 
Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationService
ApplicationService.ServiceViewModel
 
Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationComponent
ApplicationComponent.ComponentViewModel
 
Nested classes/interfaces inherited from interface org.araneaframework.Composite
Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget
 
Nested classes/interfaces inherited from interface org.araneaframework.Viewable
Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget
 
Nested classes/interfaces inherited from interface org.araneaframework.Widget
Widget.Interface
 
Field Summary
static String CONTENT_WIDGET_KEY
          Child key for tab's content widget.
protected  boolean disabled
           
static String LABEL_WIDGET_KEY
          Child key for tab's label widget.
protected  String labelId
           
protected  Widget labelWidget
           
protected  Widget tabContentWidget
           
protected  WidgetFactory tabContentWidgetFactory
           
 
Fields inherited from class org.araneaframework.core.BaseService
currentInputData, currentOutputData
 
Fields inherited from interface org.araneaframework.core.ApplicationWidget
EVENT_HANDLER_ID_KEY, EVENT_PARAMETER_KEY, EVENT_PATH_KEY
 
Fields inherited from interface org.araneaframework.core.ApplicationService
ACTION_HANDLER_ID_KEY, ACTION_PARAMETER_KEY, ACTION_PATH_KEY
 
Constructor Summary
  TabWidget(String labelId, Widget tabContentWidget)
           
  TabWidget(String labelId, WidgetFactory tabContentWidgetFactory)
           
protected TabWidget(Widget tabContentWidget)
           
protected TabWidget(WidgetFactory tabContentWidgetFactory)
           
  TabWidget(Widget labelWidget, Widget tabContentWidget)
           
  TabWidget(Widget labelWidget, WidgetFactory tabContentWidgetFactory)
           
 
Method Summary
 Component.Interface _getComponent()
          The factory method returning the implementation of the Component.
 void deleselectTab()
          Deselects this tab.
protected  void destroy()
          Destroy callback.
 void disableTab()
          Disables this tab.
 void enableTab()
          Enables this tab.
 String getLabel()
          Gets the label of this tag.
 Widget getLabelWidget()
          Gets the label widget of this tag.
protected  TabContainerContext getTabContainerContext()
           
 Widget getTabContentWidget()
          Gets the tab content widget.
protected  TabRegistrationContext getTabRegistrationContext()
           
 boolean isSelected()
          Gets whether this tab is selected.
 boolean isStateless()
          Gets whether this tab is stateless.
 boolean isTabDisabled()
          Gets whether this tab is disabled.
 
Methods inherited from class org.araneaframework.core.BaseApplicationWidget
_getComposite, _getViewable, action, addActionListener, addEventListener, addWidget, addWidget, clearActionListeners, clearEventlisteners, clearGlobalEventListener, disableWidget, enableWidget, event, getActionId, getChildEnvironment, getChildren, getChildWidgetEnvironment, getEnvironment, getEventId, getViewModel, getWidget, handleAction, handleEvent, handleUpdate, propagate, putViewData, putViewDataOnce, removeActionListener, removeEventListener, removeViewData, removeWidget, render, setGlobalEventListener, update
 
Methods inherited from class org.araneaframework.core.BaseWidget
_getWidget, getInputData, getOutputData, handleWidgetException
 
Methods inherited from class org.araneaframework.core.BaseService
_getService, handleServiceException
 
Methods inherited from class org.araneaframework.core.BaseComponent
_addComponent, _addComponent, _checkCall, _disableComponent, _enableComponent, _endCall, _endWaitingCall, _getChildren, _getDisabledChildren, _propagate, _relocateComponent, _removeComponent, _setEnvironment, _setScope, _startCall, _startWaitingCall, _strictCheckCall, _strictStartCall, _waitNoCall, disable, enable, getScope, handleException, init, isAlive, isDead, isInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.araneaframework.core.ApplicationComponent
getChildEnvironment
 
Methods inherited from interface org.araneaframework.Composite
_getComposite
 
Methods inherited from interface org.araneaframework.Viewable
_getViewable
 
Methods inherited from interface org.araneaframework.Widget
_getWidget
 
Methods inherited from interface org.araneaframework.Service
_getService
 
Methods inherited from interface org.araneaframework.Component
getEnvironment, getScope, isAlive
 

Field Detail

LABEL_WIDGET_KEY

public static final String LABEL_WIDGET_KEY
Child key for tab's label widget.

See Also:
Constant Field Values

CONTENT_WIDGET_KEY

public static final String CONTENT_WIDGET_KEY
Child key for tab's content widget.

See Also:
Constant Field Values

labelId

protected String labelId

labelWidget

protected Widget labelWidget

tabContentWidget

protected Widget tabContentWidget

tabContentWidgetFactory

protected WidgetFactory tabContentWidgetFactory

disabled

protected boolean disabled
Constructor Detail

TabWidget

protected TabWidget(Widget tabContentWidget)

TabWidget

protected TabWidget(WidgetFactory tabContentWidgetFactory)

TabWidget

public TabWidget(String labelId,
                 Widget tabContentWidget)

TabWidget

public TabWidget(Widget labelWidget,
                 Widget tabContentWidget)

TabWidget

public TabWidget(String labelId,
                 WidgetFactory tabContentWidgetFactory)

TabWidget

public TabWidget(Widget labelWidget,
                 WidgetFactory tabContentWidgetFactory)
Method Detail

enableTab

public void enableTab()
Description copied from interface: TabContext
Enables this tab.

Specified by:
enableTab in interface TabContext

disableTab

public void disableTab()
Description copied from interface: TabContext
Disables this tab.

Specified by:
disableTab in interface TabContext

deleselectTab

public void deleselectTab()
Description copied from interface: TabContext
Deselects this tab.

Specified by:
deleselectTab in interface TabContext

getLabel

public String getLabel()
Description copied from interface: TabContext
Gets the label of this tag.

Specified by:
getLabel in interface TabContext
Returns:
the label of this tag.

getLabelWidget

public Widget getLabelWidget()
Description copied from interface: TabContext
Gets the label widget of this tag.

Specified by:
getLabelWidget in interface TabContext
Returns:
the label widget of this tag.

getTabContentWidget

public Widget getTabContentWidget()
Description copied from interface: TabContext
Gets the tab content widget.

Specified by:
getTabContentWidget in interface TabContext
Returns:
the tab content widget.

isTabDisabled

public boolean isTabDisabled()
Description copied from interface: TabContext
Gets whether this tab is disabled.

Specified by:
isTabDisabled in interface TabContext
Returns:
true, if this tab is disabled.

isSelected

public boolean isSelected()
Description copied from interface: TabContext
Gets whether this tab is selected.

Specified by:
isSelected in interface TabContext
Returns:
true, if this tab is selected.

isStateless

public boolean isStateless()
Description copied from interface: TabContext
Gets whether this tab is stateless.

Specified by:
isStateless in interface TabContext
Returns:
true, if this tab is stateless.

_getComponent

public Component.Interface _getComponent()
Description copied from interface: Component
The factory method returning the implementation of the Component.

Specified by:
_getComponent in interface Component
Overrides:
_getComponent in class BaseComponent
Returns:
the implementation of the Component.

destroy

protected void destroy()
                throws Exception
Description copied from class: BaseComponent
Destroy callback. Gets called when the component is destroyed.

Overrides:
destroy in class BaseComponent
Throws:
Exception - Any runtime exception that may occur.

getTabContainerContext

protected TabContainerContext getTabContainerContext()

getTabRegistrationContext

protected TabRegistrationContext getTabRegistrationContext()