Package javax.help.plaf.basic

# Class BasicFavoritesNavigatorUI

java.lang.Object
javax.swing.plaf.ComponentUI
javax.help.plaf.HelpNavigatorUI
javax.help.plaf.basic.BasicFavoritesNavigatorUI

All Implemented Interfaces:
  `PropertyChangeListener`, `Serializable`, `EventListener`, `HelpModelListener`, `HelpSetListener`, `TreeModelListener`, `TreeSelectionListener`

public class BasicFavoritesNavigatorUI extends HelpNavigatorUI implements HelpModelListener, TreeSelectionListener, HelpSetListener, PropertyChangeListener, TreeModelListener, Serializable
The default UI for JHelpNavigator of type Favorites

See Also:
  - Serialized Form

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`BasicFavoritesNavigatorUI.AddAction`
AddAction class.
`class`
`BasicFavoritesNavigatorUI.CopyAction`
CopyAction class.
`class`
`BasicFavoritesNavigatorUI.CutAction`
CutAction class.
`class`
`BasicFavoritesNavigatorUI.FavoritesTree`
Class for JTree supported Dinvalid input: '&D' features.
`class`
`BasicFavoritesNavigatorUI.FolderAction`
FolderAction class.
`class`
`BasicFavoritesNavigatorUI.PasteAction`
PasteAction class.
`class`
`BasicFavoritesNavigatorUI.PopupListener`
PopupListener class
`class`
`BasicFavoritesNavigatorUI.RemoveAction`
RemoveAction class.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Action`
`addAction`
`protected Action`
`copyAction`
`protected DefaultMutableTreeNode`
`currentFindNode`
`protected Action`
`cutAction`
`protected JHelpFavoritesNavigator`
`favorites`
`protected Action`
`folderAction`
`protected String`
`oldText`
`protected Action`
`pasteAction`
`protected JPopupMenu`
`popup`
`protected RuleBasedCollator`
`rbc`
`protected Action`
`removeAction`
`protected JScrollPane`
`sp`
`protected FavoritesNode`
`topNode`
`protected JTree`
`tree`

## Constructor Summary

Constructors
Constructor
Description
`BasicFavoritesNavigatorUI(JHelpFavoritesNavigator b)`
Creates BasicFavoritesUI for JHelpFavoritesNavigator

## Method Summary

Modifier and Type
Method
Description
`static ComponentUI`
`createUI(JComponent x)`
`Action`
`getAddAction()`
Returns the Add action
`Action`
`getCopyAction()`
Returns the CopyAction Object
`Action`
`getCutAction()`
Returns the CutAction object
`Action`
`getFolderAction()`
Returns the FolderAction object
`Dimension`
`getMaximumSize(JComponent c)`
`Dimension`
`getMinimumSize(JComponent c)`
`Action`
`getPasteAction()`
Returns the PasteAction object
`Dimension`
`getPreferredSize(JComponent c)`
`Action`
`getRemoveAction()`
Returns the RemoveAction object
`FavoritesNode`
`getSelectedNode()`
Returns the selected node
`void`
`helpSetAdded(HelpSetEvent ev)`
Invoked when a new HelpSet is added.
`void`
`helpSetRemoved(HelpSetEvent ev)`
Invoked when a new HelpSet is removed.
`void`
`idChanged(HelpModelEvent e)`
Processes and idChanged event.
`void`
`installUI(JComponent c)`
`void`
`propertyChange(PropertyChangeEvent event)`
`void`
`saveFavorites()`
Saves favorites to the file
`protected void`
`setCellRenderer(NavigatorView view, JTree tree)`
Sets the desired cell renderer on this tree.
`void`
`treeNodesChanged(TreeModelEvent treeModelEvent)`
`void`
`treeNodesInserted(TreeModelEvent treeModelEvent)`
`void`
`treeNodesRemoved(TreeModelEvent treeModelEvent)`
`void`
`treeStructureChanged(TreeModelEvent treeModelEvent)`
`void`
`uninstallUI(JComponent c)`
`void`
`valueChanged(TreeSelectionEvent e)`
Finds the subnode with certain id and name

### Methods inherited from class javax.help.plaf.HelpNavigatorUI

`getIcon, getImageIcon, merge, remove, setIcon`

### Methods inherited from class javax.swing.plaf.ComponentUI

`contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, paint, update`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### favorites

protected JHelpFavoritesNavigator favorites

### sp

protected JScrollPane sp

### topNode

protected FavoritesNode topNode

### tree

protected JTree tree

### rbc

protected RuleBasedCollator rbc

### oldText

protected String oldText

### currentFindNode

protected DefaultMutableTreeNode currentFindNode

### addAction

protected Action addAction

### removeAction

protected Action removeAction

### cutAction

protected Action cutAction

### pasteAction

protected Action pasteAction

### copyAction

protected Action copyAction

### folderAction

protected Action folderAction

### popup

protected JPopupMenu popup

## Constructor Details

### BasicFavoritesNavigatorUI

public BasicFavoritesNavigatorUI(JHelpFavoritesNavigator b)
Creates BasicFavoritesUI for JHelpFavoritesNavigator

## Method Details

### createUI

public static ComponentUI createUI(JComponent x)

### installUI

public void installUI(JComponent c)

Overrides:
  `installUI` in class `ComponentUI`

### setCellRenderer

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

### uninstallUI

public void uninstallUI(JComponent c)

Overrides:
  `uninstallUI` in class `ComponentUI`

### getPreferredSize

public Dimension getPreferredSize(JComponent c)

Overrides:
  `getPreferredSize` in class `ComponentUI`

### getMinimumSize

public Dimension getMinimumSize(JComponent c)

Overrides:
  `getMinimumSize` in class `ComponentUI`

### getMaximumSize

public Dimension getMaximumSize(JComponent c)

Overrides:
  `getMaximumSize` in class `ComponentUI`

### idChanged

public void idChanged(HelpModelEvent e)
Processes and idChanged event. In this navigator works with url too.

Specified by:
  `idChanged` in interface `HelpModelListener`
Parameters:
  `e` - The HelpModelEvent

### valueChanged

public void valueChanged(TreeSelectionEvent e)
Finds the subnode with certain id and name

Specified by:
  `valueChanged` in interface `TreeSelectionListener`

### propertyChange

public void propertyChange(PropertyChangeEvent event)

Specified by:
  `propertyChange` in interface `PropertyChangeListener`

### helpSetAdded

public void helpSetAdded(HelpSetEvent ev)
Description copied from interface: `HelpSetListener`
Invoked when a new HelpSet is added.

Specified by:
  `helpSetAdded` in interface `HelpSetListener`
Parameters:
  `ev` - The event

### helpSetRemoved

public void helpSetRemoved(HelpSetEvent ev)
Description copied from interface: `HelpSetListener`
Invoked when a new HelpSet is removed.

Specified by:
  `helpSetRemoved` in interface `HelpSetListener`
Parameters:
  `ev` - The event

### saveFavorites

public void saveFavorites()
Saves favorites to the file

### treeStructureChanged

public void treeStructureChanged(TreeModelEvent treeModelEvent)

Specified by:
  `treeStructureChanged` in interface `TreeModelListener`

### treeNodesInserted

public void treeNodesInserted(TreeModelEvent treeModelEvent)

Specified by:
  `treeNodesInserted` in interface `TreeModelListener`

### treeNodesRemoved

public void treeNodesRemoved(TreeModelEvent treeModelEvent)

Specified by:
  `treeNodesRemoved` in interface `TreeModelListener`

### treeNodesChanged

public void treeNodesChanged(TreeModelEvent treeModelEvent)

Specified by:
  `treeNodesChanged` in interface `TreeModelListener`

### getSelectedNode

public FavoritesNode getSelectedNode()
Returns the selected node

### getAddAction

public Action getAddAction()
Returns the Add action

Overrides:
  `getAddAction` in class `HelpNavigatorUI`

### getRemoveAction

public Action getRemoveAction()
Returns the RemoveAction object

### getFolderAction

public Action getFolderAction()
Returns the FolderAction object

### getCutAction

public Action getCutAction()
Returns the CutAction object

### getPasteAction

public Action getPasteAction()
Returns the PasteAction object

### getCopyAction

public Action getCopyAction()
Returns the CopyAction Object