net.sf.tacos.components.tree
Class TreeManager

java.lang.Object
  extended by net.sf.tacos.components.tree.TreeManager
All Implemented Interfaces:
ITreeManager

public class TreeManager
extends Object
implements ITreeManager

Author:
phraktle

Constructor Summary
TreeManager(Set state, ITreeContentProvider contentProvider, IKeyProvider keyProvider)
          Creates tree manager.
 
Method Summary
 void collapseAll()
          Collapses all nodes.
 void expandAll()
          Expands all
 Set getState()
           
 boolean isExpanded(Object element)
          Whether or not node expanded
 boolean isExpandedKey(Serializable key)
          Checks expanded based on key
 Object reveal(Object element)
          Reveals the object in the tree by adding it and any parents required to reveal it to the current Trees state.
 void setExpanded(Object element, boolean open)
          Sets the element to expanded
 void setExpandedKey(Serializable key, boolean open)
          Sets expanded based on key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeManager

public TreeManager(Set state,
                   ITreeContentProvider contentProvider,
                   IKeyProvider keyProvider)
Creates tree manager.

Parameters:
state -
contentProvider -
keyProvider -
Method Detail

isExpanded

public boolean isExpanded(Object element)
Whether or not node expanded

Specified by:
isExpanded in interface ITreeManager
Returns:

isExpandedKey

public boolean isExpandedKey(Serializable key)
Checks expanded based on key

Specified by:
isExpandedKey in interface ITreeManager
Returns:

setExpanded

public void setExpanded(Object element,
                        boolean open)
Sets the element to expanded

Specified by:
setExpanded in interface ITreeManager

setExpandedKey

public void setExpandedKey(Serializable key,
                           boolean open)
Sets expanded based on key

Specified by:
setExpandedKey in interface ITreeManager

getState

public Set getState()
Returns:

collapseAll

public void collapseAll()
Collapses all nodes.

Specified by:
collapseAll in interface ITreeManager

reveal

public Object reveal(Object element)
Reveals the object in the tree by adding it and any parents required to reveal it to the current Trees state.

Specified by:
reveal in interface ITreeManager
Returns:
The top level parent element that had to be revealed in order to make this component visible, otherwise should return the element passed in.

expandAll

public void expandAll()
Expands all

Specified by:
expandAll in interface ITreeManager


Copyright © 2006-2007 SourceForge.net. All Rights Reserved.