|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jgraph.pad.util.JGraphpadTreeModelAdapter
com.jgraph.pad.factory.JGraphpadLibraryPane.LibraryTracker
Utility class to establish a listener in a editor's document model and update the library panes in a tabbed pane.
| Field Summary | |
protected JGraphEditor |
editor
References the enclosing editor. |
protected JTabbedPane |
tabPane
References the tabbed pane to be updated. |
protected Map |
tabs
Holds library, component pairs to find the respective tabs. |
| Constructor Summary | |
JGraphpadLibraryPane.LibraryTracker(JTabbedPane tabPane,
JGraphEditor editor)
Constructs a new library tracker for updating the specified tabPane using factory to create required components. |
|
| Method Summary | |
protected String |
getTitle(JGraphpadLibrary library)
Hook for subclassers to return the tab title to be used for the specified library. |
void |
treeNodesChanged(TreeModelEvent arg0)
Calls updateTabTitle(JGraphpadLibrary) for all libraries
that have changed in the tree. |
void |
treeNodesInserted(TreeModelEvent arg0)
Creates a new JGraphpadLibraryPane, wraps it up in a scroll
pane using JGraphEditorFactory.createScrollPane(Component)
and adds it as a tab to tabPane using the library's toString
method to set the tab's title. |
void |
treeNodesRemoved(TreeModelEvent arg0)
Removes the tabs for the removed libraries from the tab pane. |
protected void |
updateTabTitle(JGraphpadLibrary library)
Invoked to update the title for the tab of the specified library. |
| 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 |
protected JGraphEditor editor
protected JTabbedPane tabPane
protected Map tabs
| Constructor Detail |
public JGraphpadLibraryPane.LibraryTracker(JTabbedPane tabPane,
JGraphEditor editor)
tabPane - The pane to be updated on document model changes.editor - The enclosing editor.| Method Detail |
public void treeNodesInserted(TreeModelEvent arg0)
JGraphpadLibraryPane, wraps it up in a scroll
pane using JGraphEditorFactory.createScrollPane(Component)
and adds it as a tab to tabPane using the library's toString
method to set the tab's title.
treeNodesInserted in interface TreeModelListenertreeNodesInserted in class JGraphpadTreeModelAdapterarg0 - The object that describes the event.public void treeNodesRemoved(TreeModelEvent arg0)
treeNodesRemoved in interface TreeModelListenertreeNodesRemoved in class JGraphpadTreeModelAdapterpublic void treeNodesChanged(TreeModelEvent arg0)
updateTabTitle(JGraphpadLibrary) for all libraries
that have changed in the tree.
treeNodesChanged in interface TreeModelListenertreeNodesChanged in class JGraphpadTreeModelAdapterarg0 - The object that describes the event.protected void updateTabTitle(JGraphpadLibrary library)
library - The library who's title needs to be updated.protected String getTitle(JGraphpadLibrary library)
library - The library to return the title for.
library.
|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||