javax.help.plaf.basic

Class BasicSearchNavigatorUI

Implemented Interfaces:
ComponentListener, java.util.EventListener, HelpModelListener, PropertyChangeListener, SearchListener, TreeSelectionListener

public class BasicSearchNavigatorUI
extends HelpNavigatorUI
implements HelpModelListener, SearchListener, PropertyChangeListener, TreeSelectionListener, ComponentListener

UI for Search Navigator of type JHelpListNavigator.

Field Summary

protected boolean
displayOptions
protected SearchEngine
helpsearch
protected DefaultMutableTreeNode
lastTOCnode
protected JHelpSearchNavigator
searchnav
protected JTextField
searchparams
protected SearchQuery
searchquery
protected JScrollPane
sp
protected DefaultMutableTreeNode
topNode
protected JTree
tree

Constructor Summary

BasicSearchNavigatorUI(JHelpSearchNavigator b)

Method Summary

protected void
addSubHelpSets(HelpSet hs)
Adds subhelpsets
void
componentHidden(ComponentEvent e)
Invoked when the component has been made invisible.
void
componentMoved(ComponentEvent e)
Invoked when the component's position changes.
void
componentResized(ComponentEvent e)
Invoked when the component's size changes.
void
componentShown(ComponentEvent e)
Invoked when the component has been made visible.
static ComponentUI
createUI(JComponent x)
protected JHelpNavigator
getHelpNavigator()
Dimension
getMaximumSize(JComponent c)
Dimension
getMinimumSize(JComponent c)
Dimension
getPreferredSize(JComponent c)
void
idChanged(HelpModelEvent e)
Processes an idChanged event.
void
installUI(JComponent c)
void
itemsFound(SearchEvent e)
Tells the listener that matching SearchItems have been found.
void
merge(NavigatorView view)
Merges in the navigational data from another NavigatorView.
void
propertyChange(PropertyChangeEvent event)
void
remove(NavigatorView view)
Removes the navigational data from another NavigatorView.
void
searchFinished(SearchEvent e)
Tells the listener that the search has finished
void
searchStarted(SearchEvent e)
Tells the listener that the search has started.
protected void
setCellRenderer(NavigatorView view, JTree tree)
Setd the desired cell renderer on this tree.
void
uninstallUI(JComponent c)
void
valueChanged(TreeSelectionEvent e)
A value has changed.

Methods inherited from class javax.help.plaf.HelpNavigatorUI

getAddAction, getIcon, getImageIcon, merge, remove, setIcon

Field Details

displayOptions

protected boolean displayOptions

helpsearch

protected SearchEngine helpsearch

lastTOCnode

protected DefaultMutableTreeNode lastTOCnode

searchnav

protected JHelpSearchNavigator searchnav

searchparams

protected JTextField searchparams

searchquery

protected SearchQuery searchquery

sp

protected JScrollPane sp

topNode

protected DefaultMutableTreeNode topNode

tree

protected JTree tree

Constructor Details

BasicSearchNavigatorUI

public BasicSearchNavigatorUI(JHelpSearchNavigator b)

Method Details

addSubHelpSets

protected void addSubHelpSets(HelpSet hs)
Adds subhelpsets
Parameters:
hs - The HelpSet which subhelpsets will be added

componentHidden

public void componentHidden(ComponentEvent e)
Invoked when the component has been made invisible.

componentMoved

public void componentMoved(ComponentEvent e)
Invoked when the component's position changes.

componentResized

public void componentResized(ComponentEvent e)
Invoked when the component's size changes.

componentShown

public void componentShown(ComponentEvent e)
Invoked when the component has been made visible.

createUI

public static ComponentUI createUI(JComponent x)

getHelpNavigator

protected JHelpNavigator getHelpNavigator()

getMaximumSize

public Dimension getMaximumSize(JComponent c)

getMinimumSize

public Dimension getMinimumSize(JComponent c)

getPreferredSize

public Dimension getPreferredSize(JComponent c)

idChanged

public void idChanged(HelpModelEvent e)
Processes an idChanged event. Search is different from all other navigators in that you while search tree is synchronized the highlighting doesn't occur unless selected from the search navigator.
Specified by:
idChanged in interface HelpModelListener

installUI

public void installUI(JComponent c)

itemsFound

public void itemsFound(SearchEvent e)
Tells the listener that matching SearchItems have been found.
Specified by:
itemsFound in interface SearchListener

merge

public void merge(NavigatorView view)
Merges in the navigational data from another NavigatorView.
Overrides:
merge in interface HelpNavigatorUI

propertyChange

public void propertyChange(PropertyChangeEvent event)

remove

public void remove(NavigatorView view)
Removes the navigational data from another NavigatorView.
Overrides:
remove in interface HelpNavigatorUI

searchFinished

public void searchFinished(SearchEvent e)
Tells the listener that the search has finished
Specified by:
searchFinished in interface SearchListener

searchStarted

public void searchStarted(SearchEvent e)
Tells the listener that the search has started.
Specified by:
searchStarted in interface SearchListener

setCellRenderer

protected void setCellRenderer(NavigatorView view,
                               JTree tree)
Setd the desired cell renderer on this tree. This is exposed for redefinition by subclases.

uninstallUI

public void uninstallUI(JComponent c)

valueChanged

public void valueChanged(TreeSelectionEvent e)
A value has changed. This is used as a TreeSelectionListener.