com.vividsolutions.jump.util
Class SimpleTreeModel

java.lang.Object
  extended by com.vividsolutions.jump.util.SimpleTreeModel
All Implemented Interfaces:
javax.swing.tree.TreeModel
Direct Known Subclasses:
LayerTreeModel

public abstract class SimpleTreeModel
extends java.lang.Object
implements javax.swing.tree.TreeModel


Nested Class Summary
static class SimpleTreeModel.Folder
           
 
Constructor Summary
SimpleTreeModel(java.lang.Object root)
           
 
Method Summary
 void addTreeModelListener(javax.swing.event.TreeModelListener listener)
           
 void fireTreeNodesChanged(javax.swing.event.TreeModelEvent e)
           
 void fireTreeNodesInserted(javax.swing.event.TreeModelEvent e)
           
 void fireTreeNodesRemoved(javax.swing.event.TreeModelEvent e)
           
 void fireTreeStructureChanged(javax.swing.event.TreeModelEvent e)
           
 java.lang.Object getChild(java.lang.Object parent, int index)
           
 int getChildCount(java.lang.Object parent)
           
abstract  java.util.List getChildren(java.lang.Object parent)
          No need to handle Folders
 int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
           
 java.lang.Object getRoot()
           
 boolean isLeaf(java.lang.Object node)
           
 void removeTreeModelListener(javax.swing.event.TreeModelListener listener)
           
 void setFiringEvents(boolean firingEvents)
           
 void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTreeModel

public SimpleTreeModel(java.lang.Object root)
Method Detail

getRoot

public java.lang.Object getRoot()
Specified by:
getRoot in interface javax.swing.tree.TreeModel

isLeaf

public boolean isLeaf(java.lang.Object node)
Specified by:
isLeaf in interface javax.swing.tree.TreeModel

valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath path,
                                java.lang.Object newValue)
Specified by:
valueForPathChanged in interface javax.swing.tree.TreeModel

getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel

addTreeModelListener

public void addTreeModelListener(javax.swing.event.TreeModelListener listener)
Specified by:
addTreeModelListener in interface javax.swing.tree.TreeModel

removeTreeModelListener

public void removeTreeModelListener(javax.swing.event.TreeModelListener listener)
Specified by:
removeTreeModelListener in interface javax.swing.tree.TreeModel

getChildren

public abstract java.util.List getChildren(java.lang.Object parent)
No need to handle Folders

Parameters:
parent - not a Folder

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
Specified by:
getChild in interface javax.swing.tree.TreeModel

getChildCount

public int getChildCount(java.lang.Object parent)
Specified by:
getChildCount in interface javax.swing.tree.TreeModel

fireTreeNodesChanged

public void fireTreeNodesChanged(javax.swing.event.TreeModelEvent e)

fireTreeNodesInserted

public void fireTreeNodesInserted(javax.swing.event.TreeModelEvent e)

fireTreeNodesRemoved

public void fireTreeNodesRemoved(javax.swing.event.TreeModelEvent e)

fireTreeStructureChanged

public void fireTreeStructureChanged(javax.swing.event.TreeModelEvent e)

setFiringEvents

public void setFiringEvents(boolean firingEvents)