Package javax.help
Class FavoritesNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
javax.help.FavoritesNode
- All Implemented Interfaces:
Serializable,Cloneable,MutableTreeNode,TreeNode
A class for Favorites node. This class forces none-folders to have children.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXML element namestatic final StringFooter of xml documentstatic final StringHeader part of xml fileFields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject -
Constructor Summary
ConstructorsConstructorDescriptionFavoritesNode(FavoritesItem item) Creates a FavoritesNode for FavoritesItem. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(DefaultMutableTreeNode child) Adds the child node.voidexport(OutputStream out) Exports nodes descendants to the OutputStreamexportHeader(OutputStream out) Exports header defined for this type of node to the OutputStream.voidexportNode(OutputStreamWriter writer) Exports node and its descendants to the xml file according favorites.dtd.booleanReturns wheter node is allowed to have children or not.Returns the deep copy of nodeReturns the string representation of offset.intReturns the number of visible childrenReturns the XML element stringReturns the XML header stringbooleanReturns wheter node is visible or notvoidremove(DefaultMutableTreeNode child) Removes the child node.voidsetVisible(boolean vis) Sets visibility of nodeMethods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, 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, toString
-
Field Details
-
HEADER
Header part of xml file- See Also:
-
ELEMENT
XML element name- See Also:
-
FOOTER
Footer of xml document- See Also:
-
-
Constructor Details
-
FavoritesNode
Creates a FavoritesNode for FavoritesItem.- Parameters:
item- The FavoritesItem
-
-
Method Details
-
getAllowsChildren
public boolean getAllowsChildren()Returns wheter node is allowed to have children or not.- Specified by:
getAllowsChildrenin interfaceTreeNode- Overrides:
getAllowsChildrenin classDefaultMutableTreeNode
-
add
Adds the child node.- Parameters:
child- The DefaultMutableTreeNode with FavoritesItem as UserObject.
-
remove
Removes the child node.- Parameters:
child- Node to remove.
-
getVisibleChildCount
public int getVisibleChildCount()Returns the number of visible children -
getOffset
Returns the string representation of offset. -
export
Exports nodes descendants to the OutputStream- Parameters:
out- The OutputStream- Throws:
IOException
-
exportNode
Exports node and its descendants to the xml file according favorites.dtd.- Parameters:
out- The OutputStream- Throws:
IOException
-
exportHeader
Exports header defined for this type of node to the OutputStream.- Parameters:
out- The OutputStream.- Throws:
IOException
-
getXMLHeader
Returns the XML header string -
getXMLElement
Returns the XML element string -
getDeepCopy
Returns the deep copy of node -
isVisible
public boolean isVisible()Returns wheter node is visible or not -
setVisible
public void setVisible(boolean vis) Sets visibility of node
-