Package gov.nih.mipav.view
Class VOIFrameNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
gov.nih.mipav.view.VOIFrameNode
- All Implemented Interfaces:
Serializable,Cloneable,MutableTreeNode,TreeNode
This class is used to represent a frame, such as a slice number.
Nodes in the tree are expanded by calling this class's explore method.
- Author:
- Justin Senseney
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe slice number of the VOI componentprivate static final longUse serialVersionUID for interoperability.Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexplore()Adds the children of this file to the this FileNode for display in a JTree. adjusts theexploredvariable.intGets the slice number of this VOI.getName()the string returned is the name of the VOI returns the name of the VOI if the VOI exists, ornullif it doesn't.getVOI()Returns this node's user object.toString()the string returned is the name of the VOI returns the name of the VOI if it exists, ornullif it doesn't.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
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
frameNumber
private int frameNumberThe slice number of the VOI component
-
-
Constructor Details
-
VOIFrameNode
Creates a new VOIFrameNode object.- Parameters:
node- File for tree leaf.fNumber- The slice number of this VOI component
-
-
Method Details
-
explore
public void explore()Adds the children of this file to the this FileNode for display in a JTree. adjusts theexploredvariable. Does nothing if the FileNode is not a directory or if the node has already been explored. If directories only are to be explored, then the only children to be added will be directories. Otherwise, if the file filter is not null, only the files that satisfy the filter will be added. If the filter is null, all files will be added.Implementation of this is different from the Sun Books' code.
-
getFrameNumber
public int getFrameNumber()Gets the slice number of this VOI. Note that slice number is zero based- Returns:
- DOCUMENT ME!
-
getName
the string returned is the name of the VOI returns the name of the VOI if the VOI exists, ornullif it doesn't.- Returns:
- The slice number of this VOI.
-
getVOI
Returns this node's user object.Overrides:
getUserObjectin javax.swing.tree.DefaultMutableTree#getUserObject()- See Also:
-
toString
the string returned is the name of the VOI returns the name of the VOI if it exists, ornullif it doesn't.- Overrides:
toStringin classDefaultMutableTreeNode- Returns:
- The File's name.
-