Class symantec.itools.awt.TreeNode
All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.awt.TreeNode
Object
|
+----symantec.itools.awt.TreeNode
- public class TreeNode
- extends Object
- implements Serializable
This is a single node in the TreeView panel.
It displays text and optionally one of two images depending on its state,
collapsed or expanded.
It also may have an object associated with it that doesn't get displayed.
- See Also:
- TreeView
-
symantec.itools.awt.TreeNode()
- Constructs a default TreeNode.
-
symantec.itools.awt.TreeNode(String)
-
-
symantec.itools.awt.TreeNode(String, Image, Image)
-
-
symantec.itools.awt.TreeNode(String, TreeView)
- Constructs a TreeNode with the given text label.
-
symantec.itools.awt.TreeNode(String, Image, Image, TreeView)
- Constructs a TreeNode with the given text label, and collapsed and
expanded images.
-
collapse()
- Sets a flag indicating that this node is not expanded.
-
expand()
- Sets a flag indicating that this node is expanded, if it is expandable.
-
getChild()
- Gets the child of this node.
-
getDataObject()
- Gets the object associated with this node.
-
getDepth()
- Gets the depth of this node as previously noted.
-
getImage()
- Gets the proper image for this node in its current state, expanded or collapsed.
-
getParent()
- Gets the parent of this node.
-
getSibling()
- Gets the next sibling of this node.
-
getText()
- Gets the current text label for this node.
-
isAChildVisible()
- Determines whether any child nodes are visible.
-
isASiblingVisible()
- Determines whether any sibling nodes are visible.
-
isExpandable()
- Determines whether this node is expandable.
-
isExpanded()
- Determines whether this node is expanded.
-
isHidden()
- Gets whether this node is hidden.
-
setCollapsedImage(Image)
- Sets the image to use for this node when it is not expanded.
-
setDataObject(Object)
- Sets an object to associate with this node.
-
setExpandedImage(Image)
- Sets the image to use for this node when it is expanded.
-
setHidden(boolean)
- Sets whether this node is hidden.
-
setText(String)
- Sets a new text label for this node.
-
toggle()
- Toggles the node state between collapsed and expanded, if the node
is expandable.
TreeNode
public TreeNode()
- Constructs a default TreeNode.
TreeNode
public TreeNode(String text)
- Note: TreeNode() is deprecated.
-
- See Also:
- TreeNode(java.lang.String, symantec.itools.awt.TreeView)
TreeNode
public TreeNode(String text,
Image collapsedImage,
Image expandedImage)
- Note: TreeNode() is deprecated.
-
- See Also:
- TreeNode(java.lang.String, java.awt.Image, java.awt.Image, symantec.itools.awt.TreeView)
TreeNode
public TreeNode(String text,
TreeView treeView)
- Constructs a TreeNode with the given text label.
- Parameters:
- text - the text to display for this node
- treeView - the instance of TreeView whose node this is.
Typically "this"
TreeNode
public TreeNode(String text,
Image collapsedImage,
Image expandedImage,
TreeView treeView)
- Constructs a TreeNode with the given text label, and collapsed and
expanded images.
- Parameters:
- text - the text to display for this node
- collapsedImage - the image to use when this node is collapsed, hiding
all of its child nodes
- expandedImage - the image to use when this node is expanded, showing
all of its child nodes
- treeView - the instance of TreeView whose node this is.
Typically "this"
collapse
public void collapse()
- Sets a flag indicating that this node is not expanded.
expand
public void expand()
- Sets a flag indicating that this node is expanded, if it is expandable.
getChild
public symantec.itools.awt.TreeNode getChild()
- Gets the child of this node.
- Returns:
- this node's child node
- See Also:
- getParent, getSibling
getDataObject
public java.lang.Object getDataObject()
- Gets the object associated with this node.
This object does not get displayed.
- Returns:
- the object associated with this node
- See Also:
- setDataObject
getDepth
public int getDepth()
- Gets the depth of this node as previously noted.
- Returns:
- the depth of this node
getImage
public java.awt.Image getImage()
- Gets the proper image for this node in its current state, expanded or collapsed.
- Returns:
- the current image for this node in its current state
getParent
public symantec.itools.awt.TreeNode getParent()
- Gets the parent of this node.
- Returns:
- this node's parent node
- See Also:
- getChild, getSibling
getSibling
public symantec.itools.awt.TreeNode getSibling()
- Gets the next sibling of this node.
- Returns:
- this node's next sibling node
- See Also:
- getChild, getParent
getText
public java.lang.String getText()
- Gets the current text label for this node.
- Returns:
- the current text label for this node
- See Also:
- setText
isAChildVisible
public boolean isAChildVisible()
- Determines whether any child nodes are visible.
- Returns:
-
true
if a child node is visible
- See Also:
- isASiblingVisible
isASiblingVisible
public boolean isASiblingVisible()
- Determines whether any sibling nodes are visible.
- Returns:
-
true
if a sibling node is visible
- See Also:
- isAChildVisible
isExpandable
public boolean isExpandable()
- Determines whether this node is expandable.
A node is expandable if it has one or more child nodes.
- Returns:
- true if the node is expandable, false if not
isExpanded
public boolean isExpanded()
- Determines whether this node is expanded.
A node is expanded if its child nodes are visible.
- Returns:
- true if the node is expanded, false if it is collapsed
isHidden
public boolean isHidden()
- Gets whether this node is hidden.
- Returns:
-
true
if this node is hidden
- See Also:
- setHidden
setCollapsedImage
public void setCollapsedImage(Image image)
- Sets the image to use for this node when it is not expanded.
- Parameters:
- image - the image to use when this node is collapsed
- See Also:
- setExpandedImage, getImage
setDataObject
public void setDataObject(Object theObject)
- Sets an object to associate with this node.
This object does not get displayed.
- Parameters:
- theObject - an object to associate with this node
- See Also:
- getDataObject
setExpandedImage
public void setExpandedImage(Image image)
- Sets the image to use for this node when it is expanded.
- Parameters:
- image - the image to use when this node is expanded
- See Also:
- setCollapsedImage, getImage
setHidden
public void setHidden(boolean f)
- Sets whether this node is hidden.
- Parameters:
- f -
true
to make this node is hidden
- See Also:
- isHidden
setText
public void setText(String s)
- Sets a new text label for this node.
- Parameters:
- s - the new text label for this node
- See Also:
- getText
toggle
public void toggle()
- Toggles the node state between collapsed and expanded, if the node
is expandable.
All Packages Class Hierarchy This Package Previous Next Index