com.ice.jcvsii
Class EntryNode

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--com.ice.jcvsii.EntryNode
All Implemented Interfaces:
java.lang.Cloneable, CVSEntry.ChildEventListener, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode
Direct Known Subclasses:
EntryRootNode

public class EntryNode
extends javax.swing.tree.DefaultMutableTreeNode
implements CVSEntry.ChildEventListener

See Also:
Serialized Form

Field Summary
protected  CVSEntry entry
           
protected  boolean hasLoaded
           
protected  java.lang.String tsCache
           
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
EntryNode(CVSEntry entry)
           
 
Method Summary
 void cvsEntryAddedChild(CVSEntry.ChildEvent event)
           
 void cvsEntryRemovedChild(CVSEntry.ChildEvent event)
           
 int getChildCount()
          return the number of children for this folder node.
 CVSEntry getEntry()
          Returns this node's CVSEntry.
 java.lang.String getEntryTag()
          Returns the tag of this node's CVSEntry.
 java.lang.String getEntryTimestamp()
          Returns the date the receiver was last modified.
 java.lang.String getEntryVersion()
          Returns this version of this node's CVSEntry.
 java.io.File getLocalFile()
          Returns the local File that this node's CVSEntry represents.
 boolean hasLoadedChildren()
          Returns true if the receiver represents a leaf, that is it is isn't a directory.
 boolean isLeaf()
          Returns true if the receiver represents a leaf, that is it is isn't a directory.
protected  void loadChildren()
          Creates the children of the receiver.
 void resetDisplayCaches()
          Resets the cached display strings so they will be recomputed.
static void setTimestampFormat(java.lang.String fmtStr)
           
 java.lang.String toString()
          Returns the string to be used to display this leaf in the JTree.
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, 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

hasLoaded

protected boolean hasLoaded

entry

protected CVSEntry entry

tsCache

protected java.lang.String tsCache
Constructor Detail

EntryNode

public EntryNode(CVSEntry entry)
Method Detail

setTimestampFormat

public static void setTimestampFormat(java.lang.String fmtStr)

toString

public java.lang.String toString()
Returns the string to be used to display this leaf in the JTree.

Overrides:
toString in class javax.swing.tree.DefaultMutableTreeNode

getLocalFile

public java.io.File getLocalFile()
Returns the local File that this node's CVSEntry represents. The File uses the root node's local path combined with the CVSEntry's getFullName() to build the file's path.


getEntryVersion

public java.lang.String getEntryVersion()
Returns this version of this node's CVSEntry.


getEntryTag

public java.lang.String getEntryTag()
Returns the tag of this node's CVSEntry.


resetDisplayCaches

public void resetDisplayCaches()
Resets the cached display strings so they will be recomputed.


getEntryTimestamp

public java.lang.String getEntryTimestamp()
Returns the date the receiver was last modified.


getEntry

public CVSEntry getEntry()
Returns this node's CVSEntry.


isLeaf

public boolean isLeaf()
Returns true if the receiver represents a leaf, that is it is isn't a directory.

Specified by:
isLeaf in interface javax.swing.tree.TreeNode
Overrides:
isLeaf in class javax.swing.tree.DefaultMutableTreeNode

hasLoadedChildren

public boolean hasLoadedChildren()
Returns true if the receiver represents a leaf, that is it is isn't a directory.


getChildCount

public int getChildCount()
return the number of children for this folder node. The first time this method is called we load up all of the folders under the store's defaultFolder

Specified by:
getChildCount in interface javax.swing.tree.TreeNode
Overrides:
getChildCount in class javax.swing.tree.DefaultMutableTreeNode

loadChildren

protected void loadChildren()
Creates the children of the receiver.


cvsEntryAddedChild

public void cvsEntryAddedChild(CVSEntry.ChildEvent event)
Specified by:
cvsEntryAddedChild in interface CVSEntry.ChildEventListener

cvsEntryRemovedChild

public void cvsEntryRemovedChild(CVSEntry.ChildEvent event)
Specified by:
cvsEntryRemovedChild in interface CVSEntry.ChildEventListener


Copyright © 1997-2003, Timothy G. Endres, All Rights Reserved.