com.cc.framework.ui.model.imp
Class TreeStateModelImp

java.lang.Object
  extended bycom.cc.framework.ui.model.imp.TreeStateModelImp
All Implemented Interfaces:
java.io.Serializable, StateModel, TreeStateModel
Direct Known Subclasses:
TreelistStateModelImp

public class TreeStateModelImp
extends java.lang.Object
implements TreeStateModel, java.io.Serializable

Imploementation of the TreeStateModel interface

Version:
$Revision: 1.10 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  java.util.HashSet expanded
          List of Keys for the expanded Nodes
private  java.util.HashSet highlight
          Collection with the highlight rows
private  java.lang.String selected
          The selected Node
private static long serialVersionUID
          Serial Version UID
 
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
TreeStateModelImp()
           
 
Method Summary
 void collapse(java.lang.String nodeKey)
          The specified group node will be collapsed
 void collapseAll()
          Collapses all tree nodes
 void expand(java.lang.String nodeKey)
          The specified group node will be expanded
 java.lang.String[] getMarked()
          Retrieves all marked items
 java.lang.String getSelected()
          Returns the key of the selected node
 boolean isExpanded(java.lang.String nodeKey)
          Checks if the specified group node is expanded
 boolean isMarked(java.lang.String uniqueKey)
          Checks if the specified row is highlighted.
 boolean isSelected(java.lang.String nodeKey)
          Checks if the specified node is selected.
 void mark(java.lang.String uniqueKey)
          Selects a specified row.
 void reset()
          Resets the actual state of a control to the initial state
 void select(java.lang.String nodeKey)
          Selects the specified node.
 void synchronizeState(PropertyMap properties)
          This method applies the given state properties to the controls state model
 void unmark(java.lang.String uniqueKey)
          Highlights a specified row.
 void unmarkAll()
          Resets all highlighted rows
 void unselectAll()
          Unselects the current selection of the tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

expanded

private java.util.HashSet expanded
List of Keys for the expanded Nodes


selected

private java.lang.String selected
The selected Node


highlight

private java.util.HashSet highlight
Collection with the highlight rows

Constructor Detail

TreeStateModelImp

public TreeStateModelImp()
Method Detail

collapse

public void collapse(java.lang.String nodeKey)
Description copied from interface: TreeStateModel
The specified group node will be collapsed

Specified by:
collapse in interface TreeStateModel
Parameters:
nodeKey - the nodes unique key
See Also:
TreeStateModel.collapse(java.lang.String)

collapseAll

public void collapseAll()
Description copied from interface: TreeStateModel
Collapses all tree nodes

Specified by:
collapseAll in interface TreeStateModel
See Also:
TreeStateModel.collapseAll()

expand

public void expand(java.lang.String nodeKey)
Description copied from interface: TreeStateModel
The specified group node will be expanded

Specified by:
expand in interface TreeStateModel
Parameters:
nodeKey - the nodes unique key
See Also:
TreeStateModel.expand(java.lang.String)

isExpanded

public boolean isExpanded(java.lang.String nodeKey)
Description copied from interface: TreeStateModel
Checks if the specified group node is expanded

Specified by:
isExpanded in interface TreeStateModel
Parameters:
nodeKey - the nodes unique key
Returns:
boolean
See Also:
TreeStateModel.isExpanded(java.lang.String)

getSelected

public java.lang.String getSelected()
Description copied from interface: TreeStateModel
Returns the key of the selected node

Specified by:
getSelected in interface TreeStateModel
Returns:
Key or null
See Also:
TreeStateModel.getSelected()

isSelected

public boolean isSelected(java.lang.String nodeKey)
Description copied from interface: TreeStateModel
Checks if the specified node is selected.

Specified by:
isSelected in interface TreeStateModel
Parameters:
nodeKey - the nodes unique key
Returns:
boolean
See Also:
TreeStateModel.isSelected(java.lang.String)

select

public void select(java.lang.String nodeKey)
Description copied from interface: TreeStateModel
Selects the specified node. Within a tree there can only exists one selected node

Specified by:
select in interface TreeStateModel
Parameters:
nodeKey - the nodes unique key
See Also:
TreeStateModel.select(java.lang.String)

unselectAll

public void unselectAll()
Description copied from interface: TreeStateModel
Unselects the current selection of the tree

Specified by:
unselectAll in interface TreeStateModel
See Also:
TreeStateModel.unselectAll()

isMarked

public boolean isMarked(java.lang.String uniqueKey)
Description copied from interface: TreeStateModel
Checks if the specified row is highlighted.

Specified by:
isMarked in interface TreeStateModel
Parameters:
uniqueKey - the nodes unique key
Returns:
boolean Returns true if the row is selected; false otherwise
See Also:
TreeStateModel.isMarked(java.lang.String)

getMarked

public java.lang.String[] getMarked()
Description copied from interface: TreeStateModel
Retrieves all marked items

Specified by:
getMarked in interface TreeStateModel
Returns:
Array with the keys of the marked items
See Also:
TreeStateModel.getMarked()

mark

public void mark(java.lang.String uniqueKey)
Description copied from interface: TreeStateModel
Selects a specified row.

Specified by:
mark in interface TreeStateModel
Parameters:
uniqueKey - The unique key of the row which should be selected
See Also:
TreeStateModel.mark(java.lang.String)

unmark

public void unmark(java.lang.String uniqueKey)
Description copied from interface: TreeStateModel
Highlights a specified row.

Specified by:
unmark in interface TreeStateModel
Parameters:
uniqueKey - the nodes unique key
See Also:
TreeStateModel.unmark(java.lang.String)

unmarkAll

public void unmarkAll()
Description copied from interface: TreeStateModel
Resets all highlighted rows

Specified by:
unmarkAll in interface TreeStateModel
See Also:
TreeStateModel.unmarkAll()

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

synchronizeState

public void synchronizeState(PropertyMap properties)
                      throws java.lang.Exception
Description copied from interface: StateModel
This method applies the given state properties to the controls state model

Specified by:
synchronizeState in interface StateModel
Parameters:
properties - State properties
Throws:
java.lang.Exception - is thrown when an error occurs during execution
See Also:
StateModel.synchronizeState(com.cc.framework.util.PropertyMap)


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