it.amattioli.applicate.browsing
Interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>

Show UML class diagram
Type Parameters:
I -
T -
All Superinterfaces:
Browser<I,T>, CommandListener, EventListener, Selector<T>
All Known Implementing Classes:
DefaultTreeBrowser

public interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
extends Browser<I,T>, CommandListener

A TreeBrowser allows the navigation through a set of entities arranged as the nodes of a tree structure. The tree structure must have a single root that can be retrieved using the getRoot() method.

Author:
andrea

Method Summary
 void deselect()
           
 List<T> getChildrenOf(T target)
          Retrieves the list of the children of a given node
 TreePath getPathOf(T target)
          Retrieves the path of node
 T getRoot()
          Retrieves the root of the tree
 TreePath getSelectedPath()
          Retrieves the path of the selected object
 it.amattioli.dominate.Specification<T> getSpecification()
           
 T getTargetOf(TreePath path)
          Retrieves a tree node given its path inside the tree
 void next()
          Select next node in tree.
 void previous()
          Select previous node in tree.
 void select(T selected)
          Select a node
 void select(TreePath path)
          Select a node given its path
 void setSpecification(it.amattioli.dominate.Specification<T> spec)
           
 
Methods inherited from interface it.amattioli.applicate.browsing.Browser
addContentChangeListener, release, removeContentChangeListener
 
Methods inherited from interface it.amattioli.applicate.selection.Selector
addSelectionListener, getSelectedObject, removeSelectionListener
 
Methods inherited from interface it.amattioli.applicate.commands.CommandListener
commandDone
 

Method Detail

getRoot

T getRoot()
Retrieves the root of the tree

Returns:

getTargetOf

T getTargetOf(TreePath path)
Retrieves a tree node given its path inside the tree

Parameters:
path -
Returns:

getPathOf

TreePath getPathOf(T target)
Retrieves the path of node

Parameters:
target -
Returns:

getChildrenOf

List<T> getChildrenOf(T target)
Retrieves the list of the children of a given node

Parameters:
target -
Returns:

select

void select(T selected)
Select a node

Parameters:
selected -

select

void select(TreePath path)
Select a node given its path

Parameters:
path -

deselect

void deselect()

getSelectedPath

TreePath getSelectedPath()
Retrieves the path of the selected object

Returns:

next

void next()
Select next node in tree. If the current selected node has children the first children will be selected, otherwise the next sibling. If the current node is the last sibling its parent next sibling will be selected.


previous

void previous()
Select previous node in tree. If the current selected node is the first of its sibling its parent will be selected otherwise the first children of its parent previous sibling will be selected.


setSpecification

void setSpecification(it.amattioli.dominate.Specification<T> spec)

getSpecification

it.amattioli.dominate.Specification<T> getSpecification()


Copyright © 2011. All Rights Reserved.