## javax.help
Class IndexView

    java.lang.Object
      javax.help.NavigatorView
          javax.help.IndexView

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  GlossaryView

public class IndexView
extends NavigatorView

Navigational View information for an Index

See Also:
  Serialized Form

Nested Class Summary
`static class` `IndexView.DefaultIndexFactory` A default TreeItemFactory that can be used to parse TOC items as used by this navigator.

Field Summary
`static java.lang.String` `publicIDString` PublicID (known to this XML processor) to the DTD for version 1.0 of the Index
`static java.lang.String` `publicIDString_V2` PublicID (known to this XML processor) to the DTD for version 2.0 of the Index

Constructor Summary
`IndexView(HelpSet hs, java.lang.String name, java.lang.String label, java.util.Hashtable params)` Construct an IndexView with some given data.
`IndexView(HelpSet hs, java.lang.String name, java.lang.String label, java.util.Locale locale, java.util.Hashtable params)` Constructs an IndexView with some given data.

Method Summary
`java.awt.Component` `createNavigator(HelpModel model)` create a navigator for a given model.
`javax.swing.tree.DefaultMutableTreeNode` `getDataAsTree()` Gets a DefaultMutableTreeNode representing the information in this view instance.
`java.lang.String` `getMergeType()` Get the Index navigators mergeType.
`static javax.swing.tree.DefaultMutableTreeNode` `parse(java.net.URL url, HelpSet hs, java.util.Locale locale, TreeItemFactory factory)` Public method for parsing an Index in a URL.

Methods inherited from class javax.help.NavigatorView
`create, getHelpSet, getImageID, getLabel, getLabel, getLocale, getName, getParameters`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### publicIDString

    public static final java.lang.String publicIDString

  PublicID (known to this XML processor) to the DTD for version 1.0 of the Index

  See Also:
    Constant Field Values

### publicIDString_V2

    public static final java.lang.String publicIDString_V2

  PublicID (known to this XML processor) to the DTD for version 2.0 of the Index

  See Also:
    Constant Field Values

Constructor Detail

### IndexView

    public IndexView(HelpSet hs,
                     java.lang.String name,
                     java.lang.String label,
                     java.util.Hashtable params)

  Construct an IndexView with some given data. Locale defaults to that of the HelpSet.

Parameters:
  `hs` - The HelpSet that provides context information
  `name` - The name of the View
  `label` - The label (to show the user) of the View
  `params` - A hashtable providing different key/values for this type. A null for params is valid.

### IndexView

    public IndexView(HelpSet hs,
                     java.lang.String name,
                     java.lang.String label,
                     java.util.Locale locale,
                     java.util.Hashtable params)

  Constructs an IndexView with some given data.

Parameters:
  `hs` - The HelpSet that provides context information
  `name` - The name of the View
  `label` - The label (to show the user) of the View
  `locale` - The default locale to interpret the data in this TOC. A null for locale will be interpreted as the defaultLocale.
  `params` - A Hashtable providing different key/values for this type A null for params is valid.

Method Detail

### createNavigator

    public java.awt.Component createNavigator(HelpModel model)

  create a navigator for a given model.

  Specified by:
    `createNavigator` in class `NavigatorView`
  Parameters:
    `model` - The HelpModel to create this navigator with. A null model is valid.
  Returns:
    The appropriate Component for this view.

### getMergeType

    public java.lang.String getMergeType()

  Get the Index navigators mergeType. Overrides getMergeType in NavigatorView

  Overrides:
    `getMergeType` in class `NavigatorView`
  Returns:
    The merge type of this Navigator view

### getDataAsTree

    public javax.swing.tree.DefaultMutableTreeNode getDataAsTree()

  Gets a DefaultMutableTreeNode representing the information in this view instance. The default implementation parses the data in the URL, but a subclass may override this method and provide a different implemenation. For example, it may create the tree programatically.

### parse

    public static javax.swing.tree.DefaultMutableTreeNode parse(java.net.URL url,
                                                                HelpSet hs,
                                                                java.util.Locale locale,
                                                                TreeItemFactory factory)

  Public method for parsing an Index in a URL. It returns a DefaultMutableTreeNode and its children that correspond to the indexitems in the Index. The factory is invoked to create the TreeItems that are included in the DefaultMutableTreeNode as user data.

  Parameters:
    `url` - Location of the Index. If null, causes null value to be returned.
    `hs` - The HelpSet context for this Index. Null hs is ignored.
    `locale` - The default locale to interpret the data in this Index. Null locale is treated as the default locale.
    `factory` - A factory instance that is used to create the IndexItems
  Returns:
    a TreeNode that represents the Index. Returns null if parsing errors were encountered.