Package javax.help
Class FavoritesView
java.lang.Object
javax.help.NavigatorView
javax.help.FavoritesView
- All Implemented Interfaces:
Serializable
Navigational View information for the Favorites
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A default TreeItemFactory that can be used to parse Favorites items as used by this navigator. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
PublicID (known to this XML processor) to the DTD for version 2.0 of the Index -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNavigator
(HelpModel model) create a navigator for a given model.Gets a DefaultMutableTreeNode representing the information in this view instance.Get the Index navigators mergeType.parse
(HelpSet hs, Locale locale, TreeItemFactory factory) Public method for parsing the Favorites in a URL.void
saveFavorites
(FavoritesNode node) Saves favorites fileMethods inherited from class javax.help.NavigatorView
create, getHelpSet, getImageID, getLabel, getLabel, getLocale, getName, getParameters
-
Field Details
-
publicIDString
PublicID (known to this XML processor) to the DTD for version 2.0 of the Index- See Also:
-
-
Constructor Details
-
FavoritesView
Construct an FavoritesView with some given data. Locale defaults to that of the HelpSet.- Parameters:
hs
- The HelpSet that provides context informationname
- The name of the Viewlabel
- The label (to show the user) of the Viewparams
- A hashtable providing different key/values for this type. A null for params is valid.
-
FavoritesView
Constructs an FavoritesView with some given data.- Parameters:
hs
- The HelpSet that provides context informationname
- The name of the Viewlabel
- The label (to show the user) of the Viewlocale
- 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 Details
-
getMergeType
Get the Index navigators mergeType. Overrides getMergeType in NavigatorView- Overrides:
getMergeType
in classNavigatorView
- Returns:
- The merge type of this Navigator view
-
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 method for parsing the Favorites in a URL. It returns a DefaultMutableTreeNode and its children that correspond to the favoritesItems in the Favorites. The factory is invoked to create the TreeItems that are included in the DefaultMutableTreeNode as user data.- Parameters:
hs
- The HelpSet context for this Favorites. Null hs is ignored.locale
- The default locale to interpret the data in this Favorites. Null locale is treated as the default locale.factory
- A factory instance that is used to create the FavoritesItemsurl
- Location of the Favorites. If null, causes null value to be returned.- Returns:
- a TreeNode that represents the Favorites. Returns null if parsing errors were encountered.
-
saveFavorites
Saves favorites file- Parameters:
node
- The FavoritesNode