|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
projectviewer.vpt.VPTNode
projectviewer.vpt.VPTFile
Models a file that is part of a project.
Field Summary |
Fields inherited from class projectviewer.vpt.VPTNode |
name, treeNoSelectionBackground, treeNoSelectionForeground, treeSelectionBackground, treeSelectionForeground |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
VPTFile(java.io.File file)
|
|
VPTFile(java.lang.String path)
|
Method Summary | |
boolean |
canOpen()
File nodes can be opened, so return true. |
boolean |
canWrite()
Returns is the underlying file is writable. |
void |
close()
"Closes" the jEdit buffer that contains the file. |
int |
compareToNode(VPTNode node)
Files are at the same level of every leaf node. |
boolean |
delete()
Deletes the file from disk. |
java.io.File |
getFile()
Return the file associated with this node. |
java.awt.Color |
getForegroundColor(boolean sel)
Returns the node's foreground color. |
javax.swing.Icon |
getIcon(boolean expanded)
Returns the icon to be shown on the tree next to the node name. |
java.lang.String |
getNodePath()
Returns the path to the file represented by this node. |
boolean |
isOpened()
Returns "true" if the node is a file and is currently opened in jEdit. |
void |
open()
Opens a new buffer in jEdit with the file pointed by this node. |
void |
setFile(java.io.File f)
Sets the file associated with this node. |
java.lang.String |
toString()
Returns a string representation of the current node. |
Methods inherited from class projectviewer.vpt.VPTNode |
compareName, compareTo, findIndexForChild, findProjectFor, getBackgroundColor, getChildWithName, getClipType, getName, isDirectory, isFile, isGroup, isProject, isRoot, persistChildren, setName, setParent, sortChildren, sortChildren |
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, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setUserObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public VPTFile(java.lang.String path)
public VPTFile(java.io.File file)
Method Detail |
public boolean canWrite()
canWrite
in class VPTNode
public boolean delete()
delete
in class VPTNode
public java.io.File getFile()
public void setFile(java.io.File f)
public boolean isOpened()
isOpened
in class VPTNode
public javax.swing.Icon getIcon(boolean expanded)
getIcon
in class VPTNode
expanded
- If the node is currently expanded or not.public java.awt.Color getForegroundColor(boolean sel)
getForegroundColor
in class VPTNode
sel
- If the node is currently selected.public java.lang.String toString()
toString
in class VPTNode
public boolean canOpen()
canOpen
in class VPTNode
public void open()
open
in class VPTNode
public void close()
close
in class VPTNode
public java.lang.String getNodePath()
getNodePath
in class VPTNode
public int compareToNode(VPTNode node)
compareToNode
in class VPTNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |