projectviewer.vpt
Class ProjectTreeModel

java.lang.Object
  extended by javax.swing.tree.DefaultTreeModel
      extended by projectviewer.vpt.ProjectTreeModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.tree.TreeModel
Direct Known Subclasses:
ProjectCustomTreeModel

public abstract class ProjectTreeModel
extends javax.swing.tree.DefaultTreeModel

A tree model that defines a few methods used internally by ProjectViewer.

Since:
PV 3.0.0
Author:
Marcelo Vanzin
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultTreeModel
asksAllowsChildren, listenerList, root
 
Constructor Summary
protected ProjectTreeModel(VPTNode root)
           
 
Method Summary
protected  void fileClosed(VPTNode file)
          Called when a project's file is opened in jEdit.
protected  void fileOpened(VPTNode file)
          Called when a project's file is opened in jEdit.
protected abstract  java.lang.String getName()
          Returns the name of the tree, to be shown in the tabbed pane GUI.
protected  boolean isCustom()
          Returns whether this model shows files in a customized way that does not follow the implicit node hierarchy.
protected  void projectClosed(VPTProject p)
          Called when a project had been closed.
 
Methods inherited from class javax.swing.tree.DefaultTreeModel
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectTreeModel

protected ProjectTreeModel(VPTNode root)
Method Detail

getName

protected abstract java.lang.String getName()
Returns the name of the tree, to be shown in the tabbed pane GUI. The name can also be a key for a jEdit property.


isCustom

protected boolean isCustom()
Returns whether this model shows files in a customized way that does not follow the implicit node hierarchy. Custom trees receive a few different notifications than regular ones: basically, they don't get notifications for changes in directories - rather, they areisCustom notified of a change in the project's structure instead.


fileOpened

protected void fileOpened(VPTNode file)
Called when a project's file is opened in jEdit.


fileClosed

protected void fileClosed(VPTNode file)
Called when a project's file is opened in jEdit.


projectClosed

protected void projectClosed(VPTProject p)
Called when a project had been closed.