© 2006-2007 ETH Zurich

org.ximtec.igesture.tool.explorer
Class ExplorerTreeModel

java.lang.Object
  extended by org.ximtec.igesture.tool.explorer.ExplorerTreeModel
All Implemented Interfaces:
TreeModel

public class ExplorerTreeModel
extends Object
implements TreeModel

Explorer Tree Model. NodeMappings are used to dynamically build up the tree in a generic manner. The tree structure is defined with NodeInfo instances.

Since:
igesture
Version:
1.0
Author:
UeliKurmann

Constructor Summary
ExplorerTreeModel(Object rootElement, List<NodeInfo> nodeInfos)
          Explorer Tree Model
ExplorerTreeModel(Object rootElement, Map<Class<?>,NodeInfo> nodeInfos)
          Explorer Tree Model Model
 
Method Summary
 void addTreeModelListener(TreeModelListener arg0)
           
 Object getChild(Object node, int index)
           
 int getChildCount(Object node)
           
 int getIndexOfChild(Object node, Object child)
           
 Map<Class<?>,NodeInfo> getNodeInfos()
           
 Object getRoot()
           
 boolean isLeaf(Object node)
           
 void removeTreeModelListener(TreeModelListener arg0)
           
 void valueForPathChanged(TreePath arg0, Object arg1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExplorerTreeModel

public ExplorerTreeModel(Object rootElement,
                         Map<Class<?>,NodeInfo> nodeInfos)
Explorer Tree Model Model

Parameters:
rootElement - the root node
nodeInfos - a map of NodeInfo instances defining the tree layout.

ExplorerTreeModel

public ExplorerTreeModel(Object rootElement,
                         List<NodeInfo> nodeInfos)
Explorer Tree Model

Parameters:
rootElement - the Root Element of the Explorer Tree
nodeInfos - a list of NodeInfo instances defining the tree layout.
Method Detail

getChild

public Object getChild(Object node,
                       int index)
Specified by:
getChild in interface TreeModel

getChildCount

public int getChildCount(Object node)
Specified by:
getChildCount in interface TreeModel

getIndexOfChild

public int getIndexOfChild(Object node,
                           Object child)
Specified by:
getIndexOfChild in interface TreeModel

getRoot

public Object getRoot()
Specified by:
getRoot in interface TreeModel

isLeaf

public boolean isLeaf(Object node)
Specified by:
isLeaf in interface TreeModel

addTreeModelListener

public void addTreeModelListener(TreeModelListener arg0)
Specified by:
addTreeModelListener in interface TreeModel

removeTreeModelListener

public void removeTreeModelListener(TreeModelListener arg0)
Specified by:
removeTreeModelListener in interface TreeModel

valueForPathChanged

public void valueForPathChanged(TreePath arg0,
                                Object arg1)
Specified by:
valueForPathChanged in interface TreeModel

getNodeInfos

public Map<Class<?>,NodeInfo> getNodeInfos()

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.