JGraphpad Pro
v6.0.5.0


com.jgraph.pad.factory
Class JGraphpadPane.DocumentTracker

java.lang.Object
  extended bycom.jgraph.pad.util.JGraphpadTreeModelAdapter
      extended bycom.jgraph.pad.factory.JGraphpadPane.DocumentTracker
All Implemented Interfaces:
EventListener, TreeModelListener
Enclosing class:
JGraphpadPane

public static class JGraphpadPane.DocumentTracker
extends JGraphpadTreeModelAdapter

Utility class to establish a listener in a editor's document model and update an editor pane.


Field Summary
protected  JGraphpadPane pane
          References the editor pane to be updated.
 
Constructor Summary
JGraphpadPane.DocumentTracker(JGraphpadPane pane)
          Constructs a new diagram tracker for updating the specified pane.
 
Method Summary
 void treeNodeInserted(TreeModel source, Object object)
          Calls JGraphpadPane.addFile(JGraphEditorFile) or JGraphpadPane.addDiagram(JGraphEditorDiagram) recursively on all inserted nodes of the respective type.
 void treeNodesChanged(TreeModelEvent event)
          Calls JGraphpadPane.updateFileTitle(JGraphEditorFile) or JGraphpadPane.updateDiagramTitle(JGraphEditorDiagram) on all changed nodes of the respective type.
 void treeNodesInserted(TreeModelEvent arg0)
          Calls treeNodeInserted(TreeModel, Object) with the last path component of TreeModelEvent.getTreePath() as the root of the resursion.
 void treeNodesRemoved(TreeModelEvent arg0)
          Calls JGraphpadPane.removeFile(JGraphEditorFile) or JGraphpadPane.removeDiagram(JGraphEditorFile, JGraphEditorDiagram) on all removed nodes of the respective type.
 
Methods inherited from class com.jgraph.pad.util.JGraphpadTreeModelAdapter
treeStructureChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pane

protected JGraphpadPane pane
References the editor pane to be updated.

Constructor Detail

JGraphpadPane.DocumentTracker

public JGraphpadPane.DocumentTracker(JGraphpadPane pane)
Constructs a new diagram tracker for updating the specified pane. The diagram tracker must be added as a tree model listener to an editor's document model.

Parameters:
pane - The pane to be updated on document model changes.
Method Detail

treeNodesInserted

public void treeNodesInserted(TreeModelEvent arg0)
Calls treeNodeInserted(TreeModel, Object) with the last path component of TreeModelEvent.getTreePath() as the root of the resursion.

Specified by:
treeNodesInserted in interface TreeModelListener
Overrides:
treeNodesInserted in class JGraphpadTreeModelAdapter
Parameters:
arg0 - The object that describes the event.

treeNodeInserted

public void treeNodeInserted(TreeModel source,
                             Object object)
Calls JGraphpadPane.addFile(JGraphEditorFile) or JGraphpadPane.addDiagram(JGraphEditorDiagram) recursively on all inserted nodes of the respective type.

Parameters:
source - The source tree model.
object - The node that has been inserted.

treeNodesChanged

public void treeNodesChanged(TreeModelEvent event)
Calls JGraphpadPane.updateFileTitle(JGraphEditorFile) or JGraphpadPane.updateDiagramTitle(JGraphEditorDiagram) on all changed nodes of the respective type.

Specified by:
treeNodesChanged in interface TreeModelListener
Overrides:
treeNodesChanged in class JGraphpadTreeModelAdapter
Parameters:
event - The object that describes the event.

treeNodesRemoved

public void treeNodesRemoved(TreeModelEvent arg0)
Calls JGraphpadPane.removeFile(JGraphEditorFile) or JGraphpadPane.removeDiagram(JGraphEditorFile, JGraphEditorDiagram) on all removed nodes of the respective type.

Specified by:
treeNodesRemoved in interface TreeModelListener
Overrides:
treeNodesRemoved in class JGraphpadTreeModelAdapter
Parameters:
arg0 - The object that describes the event.

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.