javax.help

Class FavoritesNode


public class FavoritesNode
extends DefaultMutableTreeNode

A class for Favorites node. This class forces none-folders to have children.

Field Summary

static String
ELEMENT
XML element name
static String
FOOTER
Footer of xml document
static String
HEADER
Header part of xml file

Constructor Summary

FavoritesNode(FavoritesItem item)
Creates a FavoritesNode for FavoritesItem.

Method Summary

void
add(DefaultMutableTreeNode child)
Adds the child node.
void
export(OutputStream out)
Exports nodes descendants to the OutputStream
OutputStreamWriter
exportHeader(OutputStream out)
Exports header defined for this type of node to the OutputStream.
void
exportNode(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
String
getOffset()
Returns the string representation of offset.
int
getVisibleChildCount()
Returns the number of visible children
String
getXMLElement()
Returns the XML element string
String
getXMLHeader()
Returns the XML header string
boolean
isVisible()
Returns wheter node is visible or not
void
remove(DefaultMutableTreeNode child)
Removes the child node.
void
setVisible(boolean vis)
Sets visibility of node

Field Details

ELEMENT

public static final String ELEMENT
XML element name

FOOTER

public static final String FOOTER
Footer of xml document

HEADER

public static final String HEADER
Header part of xml file

Constructor Details

FavoritesNode

public FavoritesNode(FavoritesItem item)
Creates a FavoritesNode for FavoritesItem.
Parameters:
item - The FavoritesItem

Method Details

add

public void add(DefaultMutableTreeNode child)
Adds the child node.
Parameters:
child - The DefaultMutableTreeNode with FavoritesItem as UserObject.

export

public void export(OutputStream out)
            throws IOException
Exports nodes descendants to the OutputStream
Parameters:
out - The OutputStream

exportHeader

public OutputStreamWriter exportHeader(OutputStream out)
            throws IOException
Exports header defined for this type of node to the OutputStream.
Parameters:
out - The OutputStream.

exportNode

public void exportNode(OutputStreamWriter writer)
            throws IOException
Exports node and its descendants to the xml file according favorites.dtd.
Parameters:

getAllowsChildren

public boolean getAllowsChildren()
Returns wheter node is allowed to have children or not.

getDeepCopy

public FavoritesNode getDeepCopy()
Returns the deep copy of node

getOffset

public String getOffset()
Returns the string representation of offset.

getVisibleChildCount

public int getVisibleChildCount()
Returns the number of visible children

getXMLElement

public String getXMLElement()
Returns the XML element string

getXMLHeader

public String getXMLHeader()
Returns the XML header string

isVisible

public boolean isVisible()
Returns wheter node is visible or not

remove

public void remove(DefaultMutableTreeNode child)
Removes the child node.
Parameters:
child - Node to remove.

setVisible

public void setVisible(boolean vis)
Sets visibility of node