org.apache.tapestry5.tree
Class DefaultTreeSelectionModel<T>

java.lang.Object
  extended by org.apache.tapestry5.BaseOptimizedSessionPersistedObject
      extended by org.apache.tapestry5.tree.DefaultTreeSelectionModel<T>
Type Parameters:
T - type of node
All Implemented Interfaces:
OptimizedSessionPersistedObject, TreeSelectionModel<T>

public class DefaultTreeSelectionModel<T>
extends BaseOptimizedSessionPersistedObject
implements TreeSelectionModel<T>

Default implementation of TreeSelectionModel. This is simply a wrapper around a set of node ids.


Constructor Summary
DefaultTreeSelectionModel()
           
 
Method Summary
 void clear()
          Clears the selection.
 boolean isSelected(TreeNode<T> node)
          Returns true, if the given node is selected.
 void select(TreeNode<T> node)
          Selects a node.
 void unselect(TreeNode<T> node)
          Unselects a node.
 
Methods inherited from class org.apache.tapestry5.BaseOptimizedSessionPersistedObject
checkAndResetDirtyMarker, markDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTreeSelectionModel

public DefaultTreeSelectionModel()
Method Detail

isSelected

public boolean isSelected(TreeNode<T> node)
Description copied from interface: TreeSelectionModel
Returns true, if the given node is selected.

Specified by:
isSelected in interface TreeSelectionModel<T>
Parameters:
node - node to check

select

public void select(TreeNode<T> node)
Description copied from interface: TreeSelectionModel
Selects a node.

Specified by:
select in interface TreeSelectionModel<T>
Parameters:
node - node to select

unselect

public void unselect(TreeNode<T> node)
Description copied from interface: TreeSelectionModel
Unselects a node.

Specified by:
unselect in interface TreeSelectionModel<T>
Parameters:
node - node to unselect

clear

public void clear()
Description copied from interface: TreeSelectionModel
Clears the selection.

Specified by:
clear in interface TreeSelectionModel<T>


Copyright © 2003-2012 The Apache Software Foundation.