Class javax.help.JHelpNavigator

java.lang.Object
    |
    +----java.awt.Component
            |
            +----java.awt.Container
                    |
                    +----javax.swing.JComponent
                            |
                            +----javax.help.JHelpNavigator
Subclasses:
JHelpFavoritesNavigator, JHelpGlossaryNavigator, JHelpIndexNavigator, JHelpSearchNavigator, JHelpTOCNavigator

public class JHelpNavigator
extends javax.swing.JComponent
implements javax.accessibility.Accessible
A JHelpNavigator is a control that presents navigational help data. It is identified by a type and it interacts with a HelpModel. There are three JHelpNavigators that most JavaHelp implementations should support:

See Also:
JHelpTOCNavigator, JHelpIndexNavigator, JHelpSearchNavigator

helpModel

protected HelpModel helpModel

type

protected java.lang.String type

JHelpNavigator

public JHelpNavigator(NavigatorView view)
Returns a JHelpNavigator with an instance of DefaultHelpModel as its data model.
Parameters:
view - The NavigatorView to use. If view is null it creates a JHelpTOCNavigator with a null NavigatorView.

JHelpNavigator

public JHelpNavigator(NavigatorView view,
                      HelpModel model)
Constructs a JHelpNavigator from some view and with a preexisting model and in default initial state of navigation entries.
Parameters:
view - The NavigatorView. If view is null it creates a JHelpNavigator with a null NavigatorView.
model - The model that generates changes. If model is null it creates a JHelpNavigator without a model.

getSelectedItems

public TreeItem[] getSelectedItems()
Returns a list of selected items

setSelectedItems

public void setSelectedItems(TreeItem[] selectedItems)
Sets the list of selected items

getUIClassID

public java.lang.String getUIClassID()
Returns:
"HelpNavigatorUI"
Overrides:
getUIClassID in class javax.swing.JComponent

canMerge

public boolean canMerge(NavigatorView view)
Determines if this instance of a JHelpNavigator can merge its data with another one.
Parameters:
view - The data to merge.
Returns:
Whether it can be merged.
See Also:
merge(NavigatorView), remove(NavigatorView)

merge

public void merge(NavigatorView view)
Merged a NavigatorView into this instance.
Parameters:
view - The data to merge
Throws:
UnsupportedOperationException -
See Also:
canMerge(NavigatorView), remove(NavigatorView)

remove

public void remove(NavigatorView view)
Removes a NavigatorView from this instance.
Parameters:
view - The data to merge
Throws:
UnsupportedOperationException -
See Also:
canMerge(NavigatorView), merge(NavigatorView)

getNavigatorName

public java.lang.String getNavigatorName()
Names this Navigator.
Returns:
The name of this Navigator. This is locale independent and can be used by the application to identify the view.

getNavigatorView

public NavigatorView getNavigatorView()
Gets the NavigatorView that created this Navigator View.
Returns:
the NavigatorView

getNavigatorLabel

public java.lang.String getNavigatorLabel()
Gets the name of this navigator view.
Returns:
The label for this NavigatorView.

getNavigatorLabel

public java.lang.String getNavigatorLabel(java.util.Locale locale)
Gets locale-dependent name for this navigator view.
Returns:
the label for this NavigatorView. If locale is null it is treated as the default Locale.

getIcon

public javax.swing.Icon getIcon()
Gets an icon to identify this Navigator. Currently this is a read-only property.
Returns:
An icon to identify this navigator.

setModel

public void setModel(HelpModel newModel)
Sets the HelpModel that provides the data.
Parameters:
newModel - The HelpModel for this component. A null for newModel is valid.

getModel

public HelpModel getModel()
Returns the HelpModel that provides the data.

setUI

public void setUI(HelpNavigatorUI ui)
Sets the HelpUI that provides the current look and feel.

getUI

public HelpNavigatorUI getUI()
Returns the HelpUI that provides the current look and feel.

updateUI

public void updateUI()
Replaces the UI with the latest version from the default UIFactory.
Overrides:
updateUI in class javax.swing.JComponent

addHelpModelListener

public void addHelpModelListener(HelpModelListener l)
Adds a listener for the HelpModelEvent posted after the model has changed.
Parameters:
l - - The listener to add.
See Also:
removeHelpModelListener

removeHelpModelListener

public void removeHelpModelListener(HelpModelListener l)
Removes a listener previously added with addHelpModelListener.
Parameters:
l - - The listener to remove.
See Also:
addHelpModelListener

createParams

protected static java.util.Hashtable createParams(java.net.URL data)
Creates the parameters for a Navigator from data stored in a URL.
Returns:
A Hashtable of parameters

getAccessibleContext

public javax.accessibility.AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this JComponent.
Implements:
getAccessibleContext in interface javax.accessibility.Accessible
Returns:
The AccessibleContext of this JComponent
Overrides:
getAccessibleContext in class javax.swing.JComponent