Class JavaScriptTreeNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
org.fife.rsta.ac.SourceTreeNode
org.fife.rsta.ac.js.tree.JavaScriptTreeNode
- All Implemented Interfaces:
Serializable, Cloneable, Comparable<SourceTreeNode>, MutableTreeNode, TreeNode
Tree node for JavaScript outline trees.
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IconThe icon this node displays in the tree.private PositionThe location of this source element in the document.private StringThe text to display in the tree.Fields inherited from class DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject -
Constructor Summary
ConstructorsConstructorDescriptionJavaScriptTreeNode(List<org.mozilla.javascript.ast.AstNode> userObject) JavaScriptTreeNode(org.mozilla.javascript.ast.AstNode userObject) JavaScriptTreeNode(org.mozilla.javascript.ast.AstNode userObject, boolean sorted) -
Method Summary
Modifier and TypeMethodDescriptiongetIcon()intReturns the length in the document of this source element.intReturns the offset into the document of this source element.getText(boolean selected) voidvoidSets the absolute offset of this element in the document.voidSets the text to display in the tree for this node.toString()Overridden to return the textual representation displayed in the tree view.Methods inherited from class SourceTreeNode
add, children, clone, cloneWithChildren, compareTo, filter, getChildAfter, getChildAt, getChildBefore, getChildCount, getIndex, getSortPriority, isSortable, isSorted, refresh, setSortable, setSorted, setSortPriorityMethods inherited from class DefaultMutableTreeNode
breadthFirstEnumeration, depthFirstEnumeration, getAllowsChildren, getDepth, getFirstChild, getFirstLeaf, 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
-
pos
The location of this source element in the document. -
text
The text to display in the tree. -
icon
The icon this node displays in the tree.
-
-
Constructor Details
-
JavaScriptTreeNode
-
JavaScriptTreeNode
public JavaScriptTreeNode(org.mozilla.javascript.ast.AstNode userObject) -
JavaScriptTreeNode
public JavaScriptTreeNode(org.mozilla.javascript.ast.AstNode userObject, boolean sorted)
-
-
Method Details
-
getIcon
-
getLength
public int getLength()Returns the length in the document of this source element.- Returns:
- The length of this element.
- See Also:
-
getOffset
public int getOffset()Returns the offset into the document of this source element. This offset tracks modifications in the document and has been updated accordingly.- Returns:
- The offset.
- See Also:
-
getText
-
setIcon
-
setOffset
Sets the absolute offset of this element in the document.- Parameters:
offs- The offset.- See Also:
-
setText
Sets the text to display in the tree for this node.- Parameters:
text- The text to display.
-
toString
Overridden to return the textual representation displayed in the tree view.- Overrides:
toStringin classDefaultMutableTreeNode- Returns:
- The text of this tree node.
-