de.grogra.util
Class AbstractTreeMapper
java.lang.Object
de.grogra.util.AbstractTreeMapper
- All Implemented Interfaces:
- Disposable, java.util.EventListener, javax.swing.event.TreeModelListener
- Direct Known Subclasses:
- TreeMapper
public abstract class AbstractTreeMapper
- extends java.lang.Object
- implements javax.swing.event.TreeModelListener, Disposable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
root
protected java.lang.Object root
source
protected final javax.swing.tree.TreeModel source
target
protected final MutableTreeModel target
AbstractTreeMapper
public AbstractTreeMapper(javax.swing.tree.TreeModel source,
java.lang.Object root,
MutableTreeModel target,
java.util.Comparator comparator)
createAndInsert
protected void createAndInsert(java.lang.Object sourceNode,
java.lang.Object targetParent,
int index)
createNode
protected abstract java.lang.Object createNode(java.lang.Object sourceNode,
java.lang.Object targetParent)
dispose
public final void dispose()
- Specified by:
dispose
in interface Disposable
disposeImpl
protected void disposeImpl()
filter
protected boolean filter(java.lang.Object node)
getImage
protected java.lang.Object getImage(java.lang.Object sourceNode,
java.lang.Object targetParent)
getSourceTree
public javax.swing.tree.TreeModel getSourceTree()
installListener
public void installListener()
isImage
protected abstract boolean isImage(java.lang.Object sourceNode,
java.lang.Object targetNode)
map
public void map()
nodeRemoved
protected void nodeRemoved(java.lang.Object node)
setFilter
public void setFilter(ObjectToBoolean filter)
sourceNodesEqual
public boolean sourceNodesEqual(java.lang.Object a,
java.lang.Object b)
targetChanged
protected void targetChanged(java.lang.Object parent)
treeNodesChanged
public void treeNodesChanged(javax.swing.event.TreeModelEvent e)
- Specified by:
treeNodesChanged
in interface javax.swing.event.TreeModelListener
treeNodesInserted
public void treeNodesInserted(javax.swing.event.TreeModelEvent e)
- Specified by:
treeNodesInserted
in interface javax.swing.event.TreeModelListener
treeNodesRemoved
public void treeNodesRemoved(javax.swing.event.TreeModelEvent e)
- Specified by:
treeNodesRemoved
in interface javax.swing.event.TreeModelListener
treeStructureChanged
public void treeStructureChanged(javax.swing.event.TreeModelEvent e)
- Specified by:
treeStructureChanged
in interface javax.swing.event.TreeModelListener
update
protected void update(java.lang.Object sourceNode,
javax.swing.tree.TreePath targetPath)