Package javax.help

Class FavoritesNode

All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode

public class FavoritesNode extends DefaultMutableTreeNode
A class for Favorites node. This class forces none-folders to have children.
See Also:
  • Field Details

  • Constructor Details

    • FavoritesNode

      public FavoritesNode(FavoritesItem item)
      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:
      getAllowsChildren in interface TreeNode
      Overrides:
      getAllowsChildren in class DefaultMutableTreeNode
    • add

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

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

      public int getVisibleChildCount()
      Returns the number of visible children
    • getOffset

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

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

      public void exportNode(OutputStreamWriter writer) throws IOException
      Exports node and its descendants to the xml file according favorites.dtd.
      Parameters:
      out - The OutputStream
      Throws:
      IOException
    • exportHeader

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

      public String getXMLHeader()
      Returns the XML header string
    • getXMLElement

      public 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