Class javax.help.FavoritesNode
java.lang.Object
|
+----javax.swing.tree.DefaultMutableTreeNode
|
+----javax.help.FavoritesNode
- public class FavoritesNode
- extends javax.swing.tree.DefaultMutableTreeNode
A class for Favorites node. This class forces none-folders to have children.
HEADER
public static final java.lang.String HEADER
- Header part of xml file
ELEMENT
public static final java.lang.String ELEMENT
- XML element name
FOOTER
public static final java.lang.String FOOTER
- Footer of xml document
FavoritesNode
public FavoritesNode(FavoritesItem item)
- Creates a FavoritesNode for FavoritesItem.
- Parameters:
item
- The FavoritesItem
getAllowsChildren
public boolean getAllowsChildren()
- Returns wheter node is allowed to have children or not.
- Overrides:
- getAllowsChildren in class javax.swing.tree.DefaultMutableTreeNode
add
public void add(javax.swing.tree.DefaultMutableTreeNode child)
- Adds the child node.
- Parameters:
child
- The DefaultMutableTreeNode with FavoritesItem as UserObject.
remove
public void remove(javax.swing.tree.DefaultMutableTreeNode child)
- Removes the child node.
- Parameters:
child
- Node to remove.
getVisibleChildCount
public int getVisibleChildCount()
- Returns the number of visible children
getOffset
public java.lang.String getOffset()
- Returns the string representation of offset.
export
public void export(java.io.OutputStream out) throws java.io.IOException
- Exports nodes descendants to the OutputStream
- Parameters:
out
- The OutputStream
exportNode
public void exportNode(java.io.OutputStreamWriter writer) throws java.io.IOException
- Exports node and its descendants to the xml file according favorites.dtd.
- Parameters:
out
- The OutputStream
exportHeader
public java.io.OutputStreamWriter exportHeader(java.io.OutputStream out) throws java.io.IOException
- Exports header defined for this type of node to the OutputStream.
- Parameters:
out
- The OutputStream.
getXMLHeader
public java.lang.String getXMLHeader()
- Returns the XML header string
getXMLElement
public java.lang.String getXMLElement()
- Returns the XML element string
getDeepCopy
public FavoritesNode 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