Package javax.help

Class TreeItem

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    FavoritesItem, IndexItem, TOCItem

    public class TreeItem
    extends java.lang.Object
    implements java.io.Serializable
    The base items known to TOC, Index and Favorites Navigators.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int COLLAPSE
      Show the children of the node collapsed in the view
      static int DEFAULT_EXPANSION
      A state of expansion determined by the view
      static int EXPAND
      Show the children of the node expanded in the view
      protected java.util.Locale locale  
    • Constructor Summary

      Constructors 
      Constructor Description
      TreeItem()
      Creates an empty TreeItem.
      TreeItem​(java.lang.String name)
      Creates a TreeItem.
      TreeItem​(Map.ID id, java.util.Locale locale)
      Creates a TreeItem.
      TreeItem​(Map.ID id, HelpSet hs, java.util.Locale locale)
      Create an TreeItem.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getExpansionType()
      Returns the exansion type
      HelpSet getHelpSet()
      Returns the HelpSet scoping this IndexItem.
      Map.ID getID()
      Returns the ID for the item.
      java.util.Locale getLocale()
      Returns the locale for the item.
      java.lang.String getMergeType()
      Returns the merge type for the item
      java.lang.String getName()
      Returns the name of the item.
      java.lang.String getPresentation()
      Returns the presentation
      java.lang.String getPresentationName()
      Returns the presentation name
      java.net.URL getURL()
      Returns the URL for the item.
      void setExpansionType​(int type)
      Sets the expansion type
      void setHelpSet​(HelpSet hs)
      Set the HelpSet for this TreeItem.
      void setID​(Map.ID id)
      Set the ID for the item.
      void setMergeType​(java.lang.String mergeType)
      Sets the merge type
      void setName​(java.lang.String name)
      Sets the name of the item.
      void setPresentation​(java.lang.String presentation)
      Sets the presentation
      void setPresentationName​(java.lang.String presentationName)
      Sets the presentation name
      java.lang.String toString()
      Returns a String used when displaying the object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DEFAULT_EXPANSION

        public static final int DEFAULT_EXPANSION
        A state of expansion determined by the view
        See Also:
        Constant Field Values
      • COLLAPSE

        public static final int COLLAPSE
        Show the children of the node collapsed in the view
        See Also:
        Constant Field Values
      • EXPAND

        public static final int EXPAND
        Show the children of the node expanded in the view
        See Also:
        Constant Field Values
      • locale

        protected java.util.Locale locale
    • Constructor Detail

      • TreeItem

        public TreeItem​(Map.ID id,
                        HelpSet hs,
                        java.util.Locale locale)
        Create an TreeItem.
        Parameters:
        id - ID for the item. The ID can be null.
        hs - A HelpSet scoping this item.
        locale - The locale for this item
      • TreeItem

        public TreeItem​(Map.ID id,
                        java.util.Locale locale)
        Creates a TreeItem.
        Parameters:
        id - ID for the item. Null is a valid ID.
        The - lang for this item. A null is valid and indicates the default locale.
      • TreeItem

        public TreeItem​(java.lang.String name)
        Creates a TreeItem.
        Parameters:
        name - The name for the item.
      • TreeItem

        public TreeItem()
        Creates an empty TreeItem.
    • Method Detail

      • setName

        public void setName​(java.lang.String name)
        Sets the name of the item.
      • getName

        public java.lang.String getName()
        Returns the name of the item.
      • setID

        public void setID​(Map.ID id)
        Set the ID for the item.
      • getID

        public Map.ID getID()
        Returns the ID for the item.
      • getURL

        public java.net.URL getURL()
        Returns the URL for the item.
      • setHelpSet

        public void setHelpSet​(HelpSet hs)
        Set the HelpSet for this TreeItem.
      • getHelpSet

        public HelpSet getHelpSet()
        Returns the HelpSet scoping this IndexItem. Will return the ID HelpSet if one exists. Null otherwise
      • getLocale

        public java.util.Locale getLocale()
        Returns the locale for the item.
      • setMergeType

        public void setMergeType​(java.lang.String mergeType)
        Sets the merge type
      • getMergeType

        public java.lang.String getMergeType()
        Returns the merge type for the item
      • setExpansionType

        public void setExpansionType​(int type)
        Sets the expansion type
        Throws:
        java.lang.IllegalArgumentException - if not a valid type
      • getExpansionType

        public int getExpansionType()
        Returns the exansion type
      • setPresentation

        public void setPresentation​(java.lang.String presentation)
        Sets the presentation
        See Also:
        Presentation
      • getPresentation

        public java.lang.String getPresentation()
        Returns the presentation
        See Also:
        Presentation
      • setPresentationName

        public void setPresentationName​(java.lang.String presentationName)
        Sets the presentation name
        See Also:
        Presentation
      • getPresentationName

        public java.lang.String getPresentationName()
        Returns the presentation name
        See Also:
        Presentation
      • toString

        public java.lang.String toString()
        Returns a String used when displaying the object. Used by CellRenderers.
        Overrides:
        toString in class java.lang.Object
        See Also:
        TOCCellRenderer