Package javax.help

Class FavoritesItem

java.lang.Object
javax.help.TreeItem
javax.help.FavoritesItem
All Implemented Interfaces:
Transferable, Serializable

public class FavoritesItem extends TreeItem implements Transferable, Serializable
A class for individual favorites items.
See Also:
  • Field Details

    • FAVORITES_FLAVOR

      public static final DataFlavor FAVORITES_FLAVOR
  • Constructor Details

    • FavoritesItem

      public FavoritesItem(String name)
      Creates item with name
      Parameters:
      name - The name of item
    • FavoritesItem

      public FavoritesItem()
      Creates empty item
    • FavoritesItem

      public FavoritesItem(String name, String target, String url, String title, Locale locale)
      Creates FavoritesItem.
      Parameters:
      name - The name of item
      target - The target of item
      url - The external representation of url
      title - The title of the HelpSet
      locale - The Locale of this item
  • Method Details

    • setVisible

      public void setVisible(boolean visible)
    • isVisible

      public boolean isVisible()
    • getTarget

      public String getTarget()
      Returns the id for this item.
    • getURLSpec

      public String getURLSpec()
      Returns the external representation of url for this item.
    • getURL

      public URL getURL()
      Return the URL for this item
      Overrides:
      getURL in class TreeItem
    • getHelpSetTitle

      public String getHelpSetTitle()
      Returns the title of HelpSet
    • setAsFolder

      public void setAsFolder()
      Sets this item as folder.
    • allowsChildren

      public boolean allowsChildren()
      Returns wheter item allows children or not
    • isLeaf

      public boolean isLeaf()
      Returns whether or not this item is leaf
    • isFolder

      public boolean isFolder()
      Returns whether or not this item is folder.
    • add

      public void add(FavoritesItem item)
      Adds FavoritesItem as a child.
      Parameters:
      item - The FavoritesItem.
    • emptyInitState

      public boolean emptyInitState()
      Returns true if item was initialized as empty
    • remove

      public void remove(FavoritesItem item)
      Removes FavoritesItem from vector of children.
      Parameters:
      item - The FavoritesItem to remove.
    • getParent

      public FavoritesItem getParent()
      Returns parent of FavoritesItem.
    • setParent

      public void setParent(FavoritesItem parent)
      Sets the parent of this item.
      Parameters:
      parent - The FavoritesItem.
    • getChildren

      public Vector getChildren()
      Returns children of this FavoritesItem.
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Description copied from class: TreeItem
      Returns a String used when displaying the object. Used by CellRenderers.
      Overrides:
      toString in class TreeItem
      See Also:
      • TOCCellRenderer
    • getTransferData

      public Object getTransferData(DataFlavor df) throws UnsupportedFlavorException, IOException
      Returns an object which represents the data to be transferred.
      Specified by:
      getTransferData in interface Transferable
      Throws:
      UnsupportedFlavorException
      IOException
    • getTransferDataFlavors

      public DataFlavor[] getTransferDataFlavors()
      Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
      Specified by:
      getTransferDataFlavors in interface Transferable
    • isDataFlavorSupported

      public boolean isDataFlavorSupported(DataFlavor df)
      Returns whether or not the specified data flavor is supported for this object.
      Specified by:
      isDataFlavorSupported in interface Transferable