Dresden OCL Toolkit

tudresden.ocl.injection.reverseeng
Class FolderTreeNode

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended bytudresden.ocl.injection.reverseeng.RevengTreeNode
          extended bytudresden.ocl.injection.reverseeng.FolderTreeNode
All Implemented Interfaces:
AbstractDescriptor.AbstractDescriptorListener, Cloneable, EventListener, MutableTreeNode, Serializable, TreeNode

public class FolderTreeNode
extends RevengTreeNode

A tree node representing a File system folder.

Version:
0.1
Author:
sz9 (Steffen Zschaler)
See Also:
Serialized Form

Nested Class Summary
(package private)  class FolderTreeNode.RevengFileFilter
           
 
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode
 
Field Summary
private  int m_cCriticalChildren
          Number of direct critical children.
private  int m_cUncriticalChildren
          Number of direct uncritical children.
private  boolean m_fCriticalFolder
          Does this folder contain any files that have incomplete collections/maps ?
private  boolean m_fFilled
          Has this node already been filled?
private  File m_fMissOnFill
          Folder that has already been associated a tree node (m_ftnMissOnFill) and therefore, does not require creation of a new tree node.
private  FolderTreeNode m_ftnMissOnFill
          Node associated with file indicated by m_fMissOnFill.
private  boolean m_fUseDefaultIcon
          If true, use s_iFolderWait.
(package private) static Icon s_iFolderInCompl
          Icon associated with normal folder containing files with incomplete maps/collections.
(package private) static Icon s_iFolderOK
          Icon associated with normal folder without any files that contain incomplete maps or collections.
(package private) static Icon s_iFolderOpenInCompl
          Icon associated with open folder containing files with incomplete maps/collections.
(package private) static Icon s_iFolderOpenOK
          Icon associated with open folder without any files that contain incomplete maps or collections.
(package private) static Icon s_iFolderOpenWait
          Icon associated with open folder while checking for files with incomplete maps/collections.
(package private) static Icon s_iFolderWait
          Icon associated with normal folder while checking for files with incomplete maps/collections.
(package private) static ThreadPool s_tpFolderFiller
          ThreadPool managing the threads used to fill the folders.
 
Fields inherited from class tudresden.ocl.injection.reverseeng.RevengTreeNode
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
  FolderTreeNode(DefaultTreeModel dtmModel)
          Creates new FolderTreeNode
  FolderTreeNode(DefaultTreeModel dtmModel, File f)
           
protected FolderTreeNode(DefaultTreeModel dtmModel, File f, File fMissOnFill, FolderTreeNode ftnMissOnFill)
           
 
Method Summary
 boolean canRootExplorer()
          True, if RevengGUI can root its explorer in this node.
 RevengTreeNode createLogicalParent()
          Return a RevengTreeNode that represents the logical parent layer to this node.
 void fill()
          Fill in the children of this node.
 void fill(String sDirectory)
          Fill in this node's children, setting the associated folder to sDirectory.
 File getFolder()
          Retrieve the folder associated with this node.
 Icon getIcon(boolean fExpanded)
          Return the icon associated with the tree node.
 void notifyChildTurnedUnCritical()
          Called when one of this node's children turns from critical to uncritical.
 void notifyCriticalChild()
          Called when one of this node's children becomes critical.
 void notifyUnknownChildTurnedUnCritical()
          Called when one of this node's children turns from unknown state to uncritical.
protected  void parentAdded()
          Called when this node gets a parent.
protected  void setCriticalFolder(boolean fCritical)
          Set the critical folder property of this folder.
 void setFolder(File f)
          Set the folder associated with this node.
 String toString()
           
 
Methods inherited from class tudresden.ocl.injection.reverseeng.RevengTreeNode
collapsed, getModel, getPropertyPages, getToolTip, isDirty, nodeChanged, nodeStructureChanged, onDescriptorModified, save, setModified, startDirtyChangeNotification, stopDirtyChangeNotification
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s_tpFolderFiller

static ThreadPool s_tpFolderFiller
ThreadPool managing the threads used to fill the folders.


s_iFolderOK

static Icon s_iFolderOK
Icon associated with normal folder without any files that contain incomplete maps or collections.


s_iFolderOpenOK

static Icon s_iFolderOpenOK
Icon associated with open folder without any files that contain incomplete maps or collections.


s_iFolderWait

static Icon s_iFolderWait
Icon associated with normal folder while checking for files with incomplete maps/collections.


s_iFolderOpenWait

static Icon s_iFolderOpenWait
Icon associated with open folder while checking for files with incomplete maps/collections.


s_iFolderInCompl

static Icon s_iFolderInCompl
Icon associated with normal folder containing files with incomplete maps/collections.


s_iFolderOpenInCompl

static Icon s_iFolderOpenInCompl
Icon associated with open folder containing files with incomplete maps/collections.


m_fUseDefaultIcon

private boolean m_fUseDefaultIcon
If true, use s_iFolderWait.


m_fCriticalFolder

private boolean m_fCriticalFolder
Does this folder contain any files that have incomplete collections/maps ?


m_fFilled

private boolean m_fFilled
Has this node already been filled?


m_cCriticalChildren

private int m_cCriticalChildren
Number of direct critical children.


m_cUncriticalChildren

private int m_cUncriticalChildren
Number of direct uncritical children.


m_fMissOnFill

private File m_fMissOnFill
Folder that has already been associated a tree node (m_ftnMissOnFill) and therefore, does not require creation of a new tree node.


m_ftnMissOnFill

private FolderTreeNode m_ftnMissOnFill
Node associated with file indicated by m_fMissOnFill.

Constructor Detail

FolderTreeNode

public FolderTreeNode(DefaultTreeModel dtmModel)
Creates new FolderTreeNode


FolderTreeNode

public FolderTreeNode(DefaultTreeModel dtmModel,
                      File f)

FolderTreeNode

protected FolderTreeNode(DefaultTreeModel dtmModel,
                         File f,
                         File fMissOnFill,
                         FolderTreeNode ftnMissOnFill)
Method Detail

getFolder

public File getFolder()
Retrieve the folder associated with this node.


setFolder

public void setFolder(File f)
Set the folder associated with this node.


getIcon

public Icon getIcon(boolean fExpanded)
Description copied from class: RevengTreeNode
Return the icon associated with the tree node.

Specified by:
getIcon in class RevengTreeNode
Parameters:
fExpanded - if true, the node is currently expanded.

fill

public void fill(String sDirectory)
Fill in this node's children, setting the associated folder to sDirectory.


fill

public final void fill()
Description copied from class: RevengTreeNode
Fill in the children of this node. Called when the node was freshly expanded.

Specified by:
fill in class RevengTreeNode

setCriticalFolder

protected void setCriticalFolder(boolean fCritical)
Set the critical folder property of this folder.


parentAdded

protected void parentAdded()
Called when this node gets a parent. It will have to indicate its critical state.


notifyCriticalChild

public void notifyCriticalChild()
Called when one of this node's children becomes critical.


notifyChildTurnedUnCritical

public void notifyChildTurnedUnCritical()
Called when one of this node's children turns from critical to uncritical.


notifyUnknownChildTurnedUnCritical

public void notifyUnknownChildTurnedUnCritical()
Called when one of this node's children turns from unknown state to uncritical.


toString

public String toString()

canRootExplorer

public boolean canRootExplorer()
True, if RevengGUI can root its explorer in this node.

Overrides:
canRootExplorer in class RevengTreeNode

createLogicalParent

public RevengTreeNode createLogicalParent()
Return a RevengTreeNode that represents the logical parent layer to this node.

Overrides:
createLogicalParent in class RevengTreeNode

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.