com.cc.framework.ui.control
Class CrumbsControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.CrumbsControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, ClientHandler, CrumbsStateModel, java.io.Serializable, StateModel

public class CrumbsControl
extends Control
implements CrumbsStateModel

TabbarControl

Since:
1.3
Version:
$Revision: 1.11 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  CrumbsDataModel dataModel
          Data model
private  CrumbsDesignModel designModel
          Design model
private static long serialVersionUID
          Serial Version UID
private  CrumbsStateModel stateModel
          Design model
 
Fields inherited from class com.cc.framework.ui.control.Control
log
 
Fields inherited from interface com.cc.framework.ui.model.CrumbsStateModel
PROP_SELECTED
 
Fields inherited from interface com.cc.framework.ui.model.StateModel
PROP_CONTROL
 
Constructor Summary
CrumbsControl()
          Constructor
 
Method Summary
protected  CrumbsStateModel doCreateStatemodel()
          Creates the state model for this control instance
 boolean filter()
          Returns if the filter is activated (default=true).
 java.lang.String getAction(CrumbModel crumb)
          Returns the associated Action for a TabPage
 CrumbModel[] getCrumbs()
          Returns all tab pages
 DataModel getDataModel()
          Returns the data model of the Control
 ControlDesignModel getDesignModel()
          Returns the design model of the control
 ImageMap getImageMap()
          Returns the ImageMap
 int getLabelLength()
          Returns the maximal length of the Labels on the TabPages
 java.lang.String getSelectedCrumb()
          Returns the current selected crumb
 StateModel getStateModel()
          Returns the state model of the control
 CrumbModel[] getVisibleCrumbs()
          Returns all visible crumbs
 boolean isSelected(CrumbModel crumb)
          Returns true if the crumb is selected
 void onCrumbClick(ControlRequestContext ctx, java.lang.String crumb)
          The default handler for the onCrumbClick Event
 void reset()
          Resets the actual state of a control to the initial state
 void setDataModel(CrumbsDataModel dataModel)
          Sets the data model
 void setDesignModel(CrumbsDesignModel designModel)
          Sets the DesignModel
 void setSelectedCrumb(java.lang.String selected)
          Selects the specified crumb
 void setStateModel(CrumbsStateModel 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 CrumbsDataModel dataModel
Data model


designModel

private CrumbsDesignModel designModel
Design model


stateModel

private CrumbsStateModel stateModel
Design model

Constructor Detail

CrumbsControl

public CrumbsControl()
Constructor

Method Detail

doCreateStatemodel

protected CrumbsStateModel 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()

setDataModel

public void setDataModel(CrumbsDataModel dataModel)
Sets the data model

Parameters:
dataModel - DataModel

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(CrumbsStateModel stateModel)
Sets the StateModel

Parameters:
stateModel - CrumbsStateModel

setDesignModel

public void setDesignModel(CrumbsDesignModel designModel)
Sets the DesignModel

Parameters:
designModel - TabsetDesignModel

getLabelLength

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

Returns:
integer

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

getCrumbs

public CrumbModel[] getCrumbs()
Returns all tab pages

Returns:
CrumbDesignModel

getVisibleCrumbs

public CrumbModel[] getVisibleCrumbs()
Returns all visible crumbs

Returns:
List of visible crumbs

getSelectedCrumb

public java.lang.String getSelectedCrumb()
Description copied from interface: CrumbsStateModel
Returns the current selected crumb

Specified by:
getSelectedCrumb in interface CrumbsStateModel
Returns:
String
See Also:
CrumbsStateModel.getSelectedCrumb()

setSelectedCrumb

public void setSelectedCrumb(java.lang.String selected)
Description copied from interface: CrumbsStateModel
Selects the specified crumb

Specified by:
setSelectedCrumb in interface CrumbsStateModel
Parameters:
selected - crumb to be selected
See Also:
CrumbsStateModel.setSelectedCrumb(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()

isSelected

public boolean isSelected(CrumbModel crumb)
Returns true if the crumb is selected

Specified by:
isSelected in interface CrumbsStateModel
Parameters:
crumb - CrumbDesignModel
Returns:
boolean

getImageMap

public ImageMap getImageMap()
Returns the ImageMap

Returns:
ImageMap

getAction

public java.lang.String getAction(CrumbModel crumb)
Returns the associated Action for a TabPage

Parameters:
crumb - CrumbDesignModel
Returns:
String

onCrumbClick

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

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


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