projectviewer.vpt
Class VPTWorkingFileListModel

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

public class VPTWorkingFileListModel
extends ProjectCustomTreeModel

A tree model that shows all files currently opened in jEdit in a flat list.

Author:
Marcelo Vanzin
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultTreeModel
asksAllowsChildren, listenerList, root
 
Constructor Summary
VPTWorkingFileListModel(VPTNode rootNode)
          Create a new VPTFileListModel.
 
Method Summary
 void fileClosed(VPTNode child)
          Removes an open file from the list of open files of the projects to which it belongs.
 void fileOpened(VPTNode child)
          Adds an open file to the list of open files of the projects to which it belongs.
protected  java.util.List<VPTNode> getChildren(VPTProject proj)
          Returns the list of files currently opened in jEdit that belong to the given project.
protected  java.lang.String getName()
          Returns the name of the tree, to be shown in the tabbed pane GUI.
 
Methods inherited from class projectviewer.vpt.ProjectCustomTreeModel
addChild, buildPathToRoot, getCache, getCachedChildren, getChild, getChildCount, getIndexOfChild, getPathToRoot, isCustom, nodeChanged, nodeStructureChanged, projectClosed, removeChild
 
Methods inherited from class javax.swing.tree.DefaultTreeModel
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getListeners, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodesChanged, 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

VPTWorkingFileListModel

public VPTWorkingFileListModel(VPTNode rootNode)
Create a new VPTFileListModel.

Parameters:
rootNode - The root node of the tree.
Method Detail

fileOpened

public void fileOpened(VPTNode child)
Adds an open file to the list of open files of the projects to which it belongs.

Overrides:
fileOpened in class ProjectTreeModel

fileClosed

public void fileClosed(VPTNode child)
Removes an open file from the list of open files of the projects to which it belongs.

Overrides:
fileClosed in class ProjectTreeModel

getChildren

protected java.util.List<VPTNode> getChildren(VPTProject proj)
Returns the list of files currently opened in jEdit that belong to the given project.

Specified by:
getChildren in class ProjectCustomTreeModel
Parameters:
proj - The project being queried.

getName

protected java.lang.String getName()
Description copied from class: ProjectTreeModel
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.

Specified by:
getName in class ProjectTreeModel