com.cc.framework.ui.control
Class TabbarControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.TabbarControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, ClientHandler, java.io.Serializable, StateModel, TabsetStateModel
Direct Known Subclasses:
TabsetControl

public class TabbarControl
extends Control
implements TabsetStateModel

TabbarControl

Since:
1.2
Version:
$Revision: 1.17 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  TabsetDataModel dataModel
          Data model
private  TabsetDesignModel designModel
          Design model
private static long serialVersionUID
          Serial Version UID
private  TabsetStateModel stateModel
          State model
 
Fields inherited from class com.cc.framework.ui.control.Control
log
 
Fields inherited from interface com.cc.framework.ui.model.TabsetStateModel
PROP_FIRST, PROP_SELECTED
 
Fields inherited from interface com.cc.framework.ui.model.StateModel
PROP_CONTROL
 
Constructor Summary
TabbarControl()
          Constructor
 
Method Summary
protected  TabsetStateModel doCreateStatemodel()
          Creates the state model for this control instance
 boolean filter()
          Returns if the filter is activated (default=true).
 java.lang.String getAction(TabDesignModel tab)
          Returns the associate Action for a TabPage
 Color getBgColor()
          Returns the Background Color
 DataModel getDataModel()
          Returns the data model of the Control
 ControlDesignModel getDesignModel()
          Returns the design model of the control
 java.lang.String getFirstVisibleTab()
          Returns the first visible TabPage of the tabSet
 ImageMap getImageMap()
          Returns the ImageMap
 int getLabelLength()
          Returns the maximal length of the Labels on the TabPages
 int getMaxVisible()
          Returns the Number of visible TabPages
 java.lang.String getSelectedTab()
          Returns the current selected TabPage of the tabSet
 StateModel getStateModel()
          Returns the state model of the control
 TabDesignModel[] getTabs()
          Returns all tab pages
 TabDesignModel[] getVisibleTabs()
          Returns all visible tab pages
 boolean isOverlapping()
           
 boolean isSelected(TabDesignModel tab)
          Returns if the TabPage is selected
 boolean isStacked()
           
 void onTabClick(ControlRequestContext ctx, java.lang.String tabId)
          The default handler for the onTabClick Event
 void onTabScroll(ControlRequestContext ctx, java.lang.String tabId)
          The default handler for the onTabScroll Event
 void reset()
          Resets the actual state of a control to the initial state
 void setDesignModel(TabsetDesignModel designModel)
          Sets the DesignModel
 void setFirstVisibleTab(java.lang.String first)
          Selects the first visible TabPage
 void setSelectedTab(java.lang.String selected)
          Selects the specified TabPage
 void setStateModel(TabsetStateModel stateModel)
          Sets the StateModel
 
Methods inherited from class com.cc.framework.ui.control.Control
addButton, allowAjaxRendering, execute, execute, execute, execute, execute, execute, execute, getAction, getAjaxId, getButtons, getControlName, getDesignRules, getFrameworkString, getHandler, getHandlers, getHeight, getHelp, getId, getLocaleName, getName, getPermission, getPrincipal, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getUniqueStyleId, getWidth, isAjaxEnabled, isDisabled, isFormElement, markDirty, onHelp, setAjaxAttribute, setHandler, setPrincipal, setValue, show, showButton, synchronizeState, synchronizeState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cc.framework.ui.model.StateModel
synchronizeState
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

dataModel

private TabsetDataModel dataModel
Data model


designModel

private TabsetDesignModel designModel
Design model


stateModel

private TabsetStateModel stateModel
State model

Constructor Detail

TabbarControl

public TabbarControl()
Constructor

Method Detail

doCreateStatemodel

protected TabsetStateModel doCreateStatemodel()
Creates the state model for this control instance

Returns:
State model instance

getDesignModel

public ControlDesignModel getDesignModel()
Description copied from class: Control
Returns the design model of the control

Specified by:
getDesignModel in class Control
Returns:
The ControlDesignModel
See Also:
Control.getDesignModel()

getDataModel

public DataModel getDataModel()
Description copied from class: Control
Returns the data model of the Control

Specified by:
getDataModel in class Control
Returns:
The data model
See Also:
Control.getDataModel()

getStateModel

public StateModel getStateModel()
Description copied from class: Control
Returns the state model of the control

Specified by:
getStateModel in class Control
Returns:
The state model
See Also:
Control.getStateModel()

setStateModel

public void setStateModel(TabsetStateModel stateModel)
Sets the StateModel

Parameters:
stateModel - TabsetStateModel

getSelectedTab

public java.lang.String getSelectedTab()
Description copied from interface: TabsetStateModel
Returns the current selected TabPage of the tabSet

Specified by:
getSelectedTab in interface TabsetStateModel
Returns:
String
See Also:
TabsetStateModel.getSelectedTab()

setSelectedTab

public void setSelectedTab(java.lang.String selected)
Description copied from interface: TabsetStateModel
Selects the specified TabPage

Specified by:
setSelectedTab in interface TabsetStateModel
Parameters:
selected - TabPage to be selected
See Also:
TabsetStateModel.setSelectedTab(java.lang.String)

reset

public void reset()
Description copied from interface: StateModel
Resets the actual state of a control to the initial state

Specified by:
reset in interface StateModel
See Also:
StateModel.reset()

setDesignModel

public void setDesignModel(TabsetDesignModel designModel)
Sets the DesignModel

Parameters:
designModel - TabsetDesignModel

getMaxVisible

public int getMaxVisible()
Returns the Number of visible TabPages

Returns:
integer

isStacked

public boolean isStacked()
Returns:
returns true when stacked display mode is enabled

getLabelLength

public int getLabelLength()
Returns the maximal length of the Labels on the TabPages

Returns:
integer

isSelected

public boolean isSelected(TabDesignModel tab)
Returns if the TabPage is selected

Specified by:
isSelected in interface TabsetStateModel
Parameters:
tab - TabDesignModel
Returns:
boolean

getFirstVisibleTab

public java.lang.String getFirstVisibleTab()
Description copied from interface: TabsetStateModel
Returns the first visible TabPage of the tabSet

Specified by:
getFirstVisibleTab in interface TabsetStateModel
Returns:
String or null
See Also:
TabsetStateModel.getFirstVisibleTab()

setFirstVisibleTab

public void setFirstVisibleTab(java.lang.String first)
Description copied from interface: TabsetStateModel
Selects the first visible TabPage

Specified by:
setFirstVisibleTab in interface TabsetStateModel
Parameters:
first - The first visible TabPage
See Also:
TabsetStateModel.setFirstVisibleTab(java.lang.String)

filter

public boolean filter()
Returns if the filter is activated (default=true). This means that all Strings which should be displayed in the HTML page are HTML encoded

Returns:
true if string will be HTML encoded; false otherwise

getTabs

public TabDesignModel[] getTabs()
Returns all tab pages

Returns:
TabDesignModel

getVisibleTabs

public TabDesignModel[] getVisibleTabs()
Returns all visible tab pages

Returns:
List of visible tabs

getBgColor

public Color getBgColor()
Returns the Background Color

Returns:
Color

getImageMap

public ImageMap getImageMap()
Returns the ImageMap

Returns:
ImageMap

isOverlapping

public boolean isOverlapping()
Returns:
returns true when the tabs should be displayed in overlapping mode

getAction

public java.lang.String getAction(TabDesignModel tab)
Returns the associate Action for a TabPage

Parameters:
tab - TabDesignModel
Returns:
String

onTabClick

public void onTabClick(ControlRequestContext ctx,
                       java.lang.String tabId)
                throws java.lang.Exception
The default handler for the onTabClick Event

Parameters:
ctx - ControlRequestContext
tabId - Id of the Tab
Throws:
java.lang.Exception - is thrown when an error occurs

onTabScroll

public void onTabScroll(ControlRequestContext ctx,
                        java.lang.String tabId)
                 throws java.lang.Exception
The default handler for the onTabScroll Event

Parameters:
ctx - ControlRequestContext
tabId - Id of the Tab to scroll to
Throws:
java.lang.Exception - is thrown when an error occurs


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.