java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.MutableTreeNode
, javax.swing.tree.TreeNode
public class FavoritesNode
extends javax.swing.tree.DefaultMutableTreeNode
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
ELEMENT |
XML element name
|
static java.lang.String |
FOOTER |
Footer of xml document
|
static java.lang.String |
HEADER |
Header part of xml file
|
Constructor | Description |
---|---|
FavoritesNode(FavoritesItem item) |
Creates a FavoritesNode for FavoritesItem.
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(javax.swing.tree.DefaultMutableTreeNode child) |
Adds the child node.
|
void |
export(java.io.OutputStream out) |
Exports nodes descendants to the OutputStream
|
java.io.OutputStreamWriter |
exportHeader(java.io.OutputStream out) |
Exports header defined for this type of node to the OutputStream.
|
void |
exportNode(java.io.OutputStreamWriter writer) |
Exports node and its descendants to the xml file according favorites.dtd.
|
boolean |
getAllowsChildren() |
Returns wheter node is allowed to have children or not.
|
FavoritesNode |
getDeepCopy() |
Returns the deep copy of node
|
java.lang.String |
getOffset() |
Returns the string representation of offset.
|
int |
getVisibleChildCount() |
Returns the number of visible children
|
java.lang.String |
getXMLElement() |
Returns the XML element string
|
java.lang.String |
getXMLHeader() |
Returns the XML header string
|
boolean |
isVisible() |
Returns wheter node is visible or not
|
void |
remove(javax.swing.tree.DefaultMutableTreeNode child) |
Removes the child node.
|
void |
setVisible(boolean vis) |
Sets visibility of node
|
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
public static final java.lang.String HEADER
public static final java.lang.String ELEMENT
public static final java.lang.String FOOTER
public FavoritesNode(FavoritesItem item)
item
- The FavoritesItempublic boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
getAllowsChildren
in class javax.swing.tree.DefaultMutableTreeNode
public void add(javax.swing.tree.DefaultMutableTreeNode child)
child
- The DefaultMutableTreeNode with FavoritesItem as UserObject.public void remove(javax.swing.tree.DefaultMutableTreeNode child)
child
- Node to remove.public int getVisibleChildCount()
public java.lang.String getOffset()
public void export(java.io.OutputStream out) throws java.io.IOException
out
- The OutputStreamjava.io.IOException
public void exportNode(java.io.OutputStreamWriter writer) throws java.io.IOException
out
- The OutputStreamjava.io.IOException
public java.io.OutputStreamWriter exportHeader(java.io.OutputStream out) throws java.io.IOException
out
- The OutputStream.java.io.IOException
public java.lang.String getXMLHeader()
public java.lang.String getXMLElement()
public FavoritesNode getDeepCopy()
public boolean isVisible()
public void setVisible(boolean vis)