|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.control.Control com.cc.framework.ui.control.TreeControl
TreeControl
Field Summary | |
private TreeGroupDataModel |
dataModel
Data model |
private TreeDesignModel |
designModel
Design model |
static java.lang.String |
PROP_CHECKED
Property for the checked nodes -> this is not really part of the controls state model. but we need a way to synchronize the state of checkboxes. |
private static long |
serialVersionUID
Serial Version UID |
private TreeStateModel |
stateModel
State model |
Fields inherited from class com.cc.framework.ui.control.Control |
log |
Fields inherited from interface com.cc.framework.ui.model.TreeStateModel |
PROP_EXPANDED, PROP_SELECTED |
Fields inherited from interface com.cc.framework.ui.model.StateModel |
PROP_CONTROL |
Constructor Summary | |
TreeControl()
Constructor |
Method Summary | |
protected int |
calcVisibleNodes(TreeNodeDataModel root)
Die Methode berechnet die Anzahl der sichtbaren (=aufgeklappten) Einträge des Baumes. |
void |
collapse(java.lang.String nodeKey)
The specified group node will be collapsed |
void |
collapse(TreeNodeDataModel node)
Collapses the given node |
void |
collapseAll()
Collapses all tree nodes |
protected TreeStateModel |
doCreateStateModel()
Creates the state model for this control instance |
void |
expand(java.lang.String key)
The specified group node will be expanded |
void |
expand(TreeNodeDataModel node)
Expands the given node |
void |
expandAll()
Expands the whole tree. |
void |
expandToLevel(int level)
Expands the tree up to the given level. |
DataModel |
getDataModel()
Returns the data model of the Control |
ControlDesignModel |
getDesignModel()
Returns the design model of the control |
protected TreeNodeDataModel |
getFirstNode()
Returns the first node to be displayed |
java.lang.String[] |
getMarked()
Retrieves all marked items |
java.lang.String |
getScrollHeight()
Retrieves the height of the scroll container |
java.lang.String |
getSelected()
Returns the key of the selected node |
StateModel |
getStateModel()
Returns the state model of the control |
int |
getTotalRowCount()
Liefert die Anzahl der tatsächlich vorhandenen Zeilen zurück. |
boolean |
isExpanded(java.lang.String nodeKey)
Checks if the specified group node is expanded |
boolean |
isExpanded(TreeNodeDataModel node)
Checks if the given node is expanded |
boolean |
isMarked(java.lang.String nodeKey)
Checks if the specified row is highlighted. |
boolean |
isSelected(java.lang.String nodeKey)
Checks if the specified node is selected. |
boolean |
isSelected(TreeNodeDataModel node)
Checks if the given node is selected |
void |
mark(java.lang.String uniqueKey)
Selects a specified row. |
void |
onCheck(ControlRequestContext ctx,
java.lang.String key,
SelectMode mode,
boolean check)
Default handler for the onCheck Event |
void |
onCollapse(ControlRequestContext ctx,
java.lang.String key)
Default handler for the onCollapse Event |
void |
onDrilldown(ControlRequestContext ctx,
java.lang.String key)
Default handler for the onDrilldown Event |
void |
onExpand(ControlRequestContext ctx,
java.lang.String key)
Default handler for the onExpand Event |
void |
onExpandEx(ControlRequestContext ctx,
java.lang.String key)
Default handler for the onExpandEx Event |
void |
reset()
Resets the actual state of a control to the initial state |
protected void |
resetExpandInfo(boolean keepExpanded)
Resets all expanded Nodes |
void |
select(java.lang.String nodeKey)
Selects the specified node. |
void |
select(TreeNodeDataModel node)
Marks the given node as selected |
void |
setDataModel(TreeGroupDataModel dataModel)
Sets the data model |
void |
setDataModel(TreeGroupDataModel dataModel,
boolean keepState)
Sets the data model |
void |
setDesignModel(TreeDesignModel designModel)
Sets the DesignModel |
void |
setStateModel(TreeStateModel stateModel)
Sets the StateModel |
void |
synchronizeState(RequestContext ctx,
PropertyMap properties)
This method applies the given state properties to the controls state model |
void |
unmark(java.lang.String nodeKey)
Highlights a specified row. |
void |
unmarkAll()
Resets all highlighted rows |
void |
unselectAll()
Unselects the current selection of the tree |
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 |
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 |
private static final long serialVersionUID
public static final java.lang.String PROP_CHECKED
private TreeGroupDataModel dataModel
private TreeDesignModel designModel
private TreeStateModel stateModel
Constructor Detail |
public TreeControl()
Method Detail |
protected TreeStateModel doCreateStateModel()
public DataModel getDataModel()
Control
getDataModel
in class Control
Control.getDataModel()
public void setDataModel(TreeGroupDataModel dataModel)
dataModel
- TreeGroupDataModelpublic void setDataModel(TreeGroupDataModel dataModel, boolean keepState)
dataModel
- TreeGroupDataModelkeepState
- when set to true
the treelist control will keep
its current state (Expanded nodes current page etc.)public ControlDesignModel getDesignModel()
Control
getDesignModel
in class Control
Control.getDesignModel()
public void setDesignModel(TreeDesignModel designModel)
designModel
- TreeDesignModelpublic StateModel getStateModel()
Control
getStateModel
in class Control
Control.getStateModel()
public void setStateModel(TreeStateModel stateModel)
stateModel
- TreeStateModelpublic void reset()
StateModel
reset
in interface StateModel
StateModel.reset()
protected void resetExpandInfo(boolean keepExpanded)
keepExpanded
- true
to keep the current expansion state of the
controlpublic boolean isExpanded(TreeNodeDataModel node)
node
- The node to check
true if the node is expanded
public boolean isExpanded(java.lang.String nodeKey)
TreeStateModel
isExpanded
in interface TreeStateModel
nodeKey
- the nodes unique key
TreeStateModel.isExpanded(java.lang.String)
public void expand(TreeNodeDataModel node)
node
- the node to expandpublic void expand(java.lang.String key)
TreeStateModel
expand
in interface TreeStateModel
key
- the nodes unique keyTreeStateModel.expand(java.lang.String)
public void expandAll()
public void expandToLevel(int level)
level
- Tree level (0 = root level)public void collapseAll()
TreeStateModel
collapseAll
in interface TreeStateModel
TreeStateModel.collapseAll()
public void collapse(TreeNodeDataModel node)
node
- the node to collapsepublic void collapse(java.lang.String nodeKey)
TreeStateModel
collapse
in interface TreeStateModel
nodeKey
- the nodes unique keyTreeStateModel.collapse(java.lang.String)
public void select(TreeNodeDataModel node)
node
- Tree nodepublic void select(java.lang.String nodeKey)
TreeStateModel
select
in interface TreeStateModel
nodeKey
- the nodes unique keyTreeStateModel.select(java.lang.String)
public void unselectAll()
TreeStateModel
unselectAll
in interface TreeStateModel
TreeStateModel.unselectAll()
public boolean isSelected(TreeNodeDataModel node)
node
- the node to check
true
if the node is checkedpublic boolean isSelected(java.lang.String nodeKey)
TreeStateModel
isSelected
in interface TreeStateModel
nodeKey
- the nodes unique key
TreeStateModel.isSelected(java.lang.String)
public java.lang.String getSelected()
TreeStateModel
getSelected
in interface TreeStateModel
null
TreeStateModel.getSelected()
protected TreeNodeDataModel getFirstNode()
public int getTotalRowCount()
public java.lang.String getScrollHeight()
protected int calcVisibleNodes(TreeNodeDataModel root)
root
- TreeNodeDataModel
public void synchronizeState(RequestContext ctx, PropertyMap properties) throws java.lang.Exception
Control
synchronizeState
in class Control
ctx
- RequestContextproperties
- State properties
java.lang.Exception
- is thrown when an error occurs during executionControl.synchronizeState(
com.cc.framework.adapter.RequestContext,
com.cc.framework.util.PropertyMap)
public void onDrilldown(ControlRequestContext ctx, java.lang.String key) throws java.lang.Exception
ctx
- ControlRequestContextkey
- Unique Id as generated by the data model to identify the Row
java.lang.Exception
- is thrown when an error occurspublic void onExpandEx(ControlRequestContext ctx, java.lang.String key) throws java.lang.Exception
ctx
- ControlRequestContextkey
- Unique Id as generated by the data model to identify the Row
java.lang.Exception
- is thrown when an error occurspublic void onExpand(ControlRequestContext ctx, java.lang.String key) throws java.lang.Exception
ctx
- ControlRequestContextkey
- Unique Id as generated by the data model to identify the Row
java.lang.Exception
- is thrown when an error occurspublic void onCollapse(ControlRequestContext ctx, java.lang.String key) throws java.lang.Exception
ctx
- ControlRequestContextkey
- Unique Id as generated by the data model to identify the Row
java.lang.Exception
- is thrown when an error occurspublic void onCheck(ControlRequestContext ctx, java.lang.String key, SelectMode mode, boolean check) throws java.lang.Exception
ctx
- ControlRequestContextkey
- Unique Id as generated by the data model to identify the Rowmode
- SelectModecheck
- true if the Node is checked
java.lang.Exception
- is thrown when an error occurspublic void mark(java.lang.String uniqueKey)
TreeStateModel
mark
in interface TreeStateModel
uniqueKey
- The unique key of the row which should be selectedTreeStateModel.mark(java.lang.String)
public boolean isMarked(java.lang.String nodeKey)
TreeStateModel
isMarked
in interface TreeStateModel
nodeKey
- the nodes unique key
TreeStateModel.isMarked(java.lang.String)
public java.lang.String[] getMarked()
getMarked
in interface TreeStateModel
public void unmark(java.lang.String nodeKey)
unmark
in interface TreeStateModel
nodeKey
- the nodes unique keypublic void unmarkAll()
unmarkAll
in interface TreeStateModel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |