Package com.vividsolutions.jump.util
Class SimpleTreeModel
- java.lang.Object
-
- com.vividsolutions.jump.util.SimpleTreeModel
-
- All Implemented Interfaces:
TreeModel
- Direct Known Subclasses:
LayerTreeModel
public abstract class SimpleTreeModel extends Object implements TreeModel
Simple implementation of TreeModel. SimpleTreeModel is the equivalent of DefaultTreeModel with a firingEvent attribute to determine if model events must be propagated to the interface.
-
-
Constructor Summary
Constructors Constructor Description SimpleTreeModel(Object root)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addTreeModelListener(TreeModelListener listener)
void
fireTreeNodesChanged(TreeModelEvent e)
void
fireTreeNodesInserted(TreeModelEvent e)
void
fireTreeNodesRemoved(TreeModelEvent e)
void
fireTreeStructureChanged(TreeModelEvent e)
Object
getChild(Object parent, int index)
int
getChildCount(Object parent)
abstract List<?>
getChildren(Object parent)
No need to handle Foldersint
getIndexOfChild(Object parent, Object child)
Object
getRoot()
boolean
isLeaf(Object node)
void
removeTreeModelListener(TreeModelListener listener)
void
setFiringEvents(boolean firingEvents)
void
valueForPathChanged(TreePath path, Object newValue)
-
-
-
Constructor Detail
-
SimpleTreeModel
public SimpleTreeModel(Object root)
-
-
Method Detail
-
valueForPathChanged
public void valueForPathChanged(TreePath path, Object newValue)
- Specified by:
valueForPathChanged
in interfaceTreeModel
-
getIndexOfChild
public int getIndexOfChild(Object parent, Object child)
- Specified by:
getIndexOfChild
in interfaceTreeModel
-
addTreeModelListener
public void addTreeModelListener(TreeModelListener listener)
- Specified by:
addTreeModelListener
in interfaceTreeModel
-
removeTreeModelListener
public void removeTreeModelListener(TreeModelListener listener)
- Specified by:
removeTreeModelListener
in interfaceTreeModel
-
getChildren
public abstract List<?> getChildren(Object parent)
No need to handle Folders- Parameters:
parent
- not a Folder
-
getChildCount
public int getChildCount(Object parent)
- Specified by:
getChildCount
in interfaceTreeModel
-
fireTreeNodesChanged
public void fireTreeNodesChanged(TreeModelEvent e)
-
fireTreeNodesInserted
public void fireTreeNodesInserted(TreeModelEvent e)
-
fireTreeNodesRemoved
public void fireTreeNodesRemoved(TreeModelEvent e)
-
fireTreeStructureChanged
public void fireTreeStructureChanged(TreeModelEvent e)
-
setFiringEvents
public void setFiringEvents(boolean firingEvents)
-
-