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:
java.beans.PropertyChangeListener,java.io.Serializable,java.util.EventListener,HelpModelListener,HelpSetListener,javax.swing.event.TreeModelListener,javax.swing.event.TreeSelectionListener
public class BasicFavoritesNavigatorUI extends HelpNavigatorUI implements HelpModelListener, javax.swing.event.TreeSelectionListener, HelpSetListener, java.beans.PropertyChangeListener, javax.swing.event.TreeModelListener, java.io.Serializable
The default UI for JHelpNavigator of type Favorites- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classBasicFavoritesNavigatorUI.AddActionAddAction class.classBasicFavoritesNavigatorUI.CopyActionCopyAction class.classBasicFavoritesNavigatorUI.CutActionCutAction class.classBasicFavoritesNavigatorUI.FavoritesTreeClass for JTree supported D&D features.classBasicFavoritesNavigatorUI.FolderActionFolderAction class.classBasicFavoritesNavigatorUI.PasteActionPasteAction class.classBasicFavoritesNavigatorUI.PopupListenerPopupListener classclassBasicFavoritesNavigatorUI.RemoveActionRemoveAction class.
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.ActionaddActionprotected javax.swing.ActioncopyActionprotected javax.swing.tree.DefaultMutableTreeNodecurrentFindNodeprotected javax.swing.ActioncutActionprotected JHelpFavoritesNavigatorfavoritesprotected javax.swing.ActionfolderActionprotected java.lang.StringoldTextprotected javax.swing.ActionpasteActionprotected javax.swing.JPopupMenupopupprotected java.text.RuleBasedCollatorrbcprotected javax.swing.ActionremoveActionprotected javax.swing.JScrollPanespprotected FavoritesNodetopNodeprotected javax.swing.JTreetree
-
Constructor Summary
Constructors Constructor Description BasicFavoritesNavigatorUI(JHelpFavoritesNavigator b)Creates BasicFavoritesUI for JHelpFavoritesNavigator
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent x)javax.swing.ActiongetAddAction()Returns the Add actionjavax.swing.ActiongetCopyAction()Returns the CopyAction Objectjavax.swing.ActiongetCutAction()Returns the CutAction objectjavax.swing.ActiongetFolderAction()Returns the FolderAction objectjava.awt.DimensiongetMaximumSize(javax.swing.JComponent c)java.awt.DimensiongetMinimumSize(javax.swing.JComponent c)javax.swing.ActiongetPasteAction()Returns the PasteAction objectjava.awt.DimensiongetPreferredSize(javax.swing.JComponent c)javax.swing.ActiongetRemoveAction()Returns the RemoveAction objectFavoritesNodegetSelectedNode()Returns the selected nodevoidhelpSetAdded(HelpSetEvent ev)Invoked when a new HelpSet is added.voidhelpSetRemoved(HelpSetEvent ev)Invoked when a new HelpSet is removed.voididChanged(HelpModelEvent e)Processes and idChanged event.voidinstallUI(javax.swing.JComponent c)voidpropertyChange(java.beans.PropertyChangeEvent event)voidsaveFavorites()Saves favorites to the fileprotected voidsetCellRenderer(NavigatorView view, javax.swing.JTree tree)Sets the desired cell renderer on this tree.voidtreeNodesChanged(javax.swing.event.TreeModelEvent treeModelEvent)voidtreeNodesInserted(javax.swing.event.TreeModelEvent treeModelEvent)voidtreeNodesRemoved(javax.swing.event.TreeModelEvent treeModelEvent)voidtreeStructureChanged(javax.swing.event.TreeModelEvent treeModelEvent)voiduninstallUI(javax.swing.JComponent c)voidvalueChanged(javax.swing.event.TreeSelectionEvent e)Finds the subnode with certain id and name-
Methods inherited from class javax.help.plaf.HelpNavigatorUI
getIcon, getImageIcon, merge, remove, setIcon
-
-
-
-
Field Detail
-
favorites
protected JHelpFavoritesNavigator favorites
-
sp
protected javax.swing.JScrollPane sp
-
topNode
protected FavoritesNode topNode
-
tree
protected javax.swing.JTree tree
-
rbc
protected java.text.RuleBasedCollator rbc
-
oldText
protected java.lang.String oldText
-
currentFindNode
protected javax.swing.tree.DefaultMutableTreeNode currentFindNode
-
addAction
protected javax.swing.Action addAction
-
removeAction
protected javax.swing.Action removeAction
-
cutAction
protected javax.swing.Action cutAction
-
pasteAction
protected javax.swing.Action pasteAction
-
copyAction
protected javax.swing.Action copyAction
-
folderAction
protected javax.swing.Action folderAction
-
popup
protected javax.swing.JPopupMenu popup
-
-
Constructor Detail
-
BasicFavoritesNavigatorUI
public BasicFavoritesNavigatorUI(JHelpFavoritesNavigator b)
Creates BasicFavoritesUI for JHelpFavoritesNavigator
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent x)
-
installUI
public void installUI(javax.swing.JComponent c)
- Overrides:
installUIin classjavax.swing.plaf.ComponentUI
-
setCellRenderer
protected void setCellRenderer(NavigatorView view, javax.swing.JTree tree)
Sets the desired cell renderer on this tree. This is exposed for redefinition by subclases.
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUIin classjavax.swing.plaf.ComponentUI
-
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSizein classjavax.swing.plaf.ComponentUI
-
getMinimumSize
public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
- Overrides:
getMinimumSizein classjavax.swing.plaf.ComponentUI
-
getMaximumSize
public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
- Overrides:
getMaximumSizein classjavax.swing.plaf.ComponentUI
-
idChanged
public void idChanged(HelpModelEvent e)
Processes and idChanged event. In this navigator works with url too.- Specified by:
idChangedin interfaceHelpModelListener- Parameters:
e- The HelpModelEvent
-
valueChanged
public void valueChanged(javax.swing.event.TreeSelectionEvent e)
Finds the subnode with certain id and name- Specified by:
valueChangedin interfacejavax.swing.event.TreeSelectionListener
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent event)
- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
helpSetAdded
public void helpSetAdded(HelpSetEvent ev)
Description copied from interface:HelpSetListenerInvoked when a new HelpSet is added.- Specified by:
helpSetAddedin interfaceHelpSetListener- Parameters:
ev- The event
-
helpSetRemoved
public void helpSetRemoved(HelpSetEvent ev)
Description copied from interface:HelpSetListenerInvoked when a new HelpSet is removed.- Specified by:
helpSetRemovedin interfaceHelpSetListener- Parameters:
ev- The event
-
saveFavorites
public void saveFavorites()
Saves favorites to the file
-
treeStructureChanged
public void treeStructureChanged(javax.swing.event.TreeModelEvent treeModelEvent)
- Specified by:
treeStructureChangedin interfacejavax.swing.event.TreeModelListener
-
treeNodesInserted
public void treeNodesInserted(javax.swing.event.TreeModelEvent treeModelEvent)
- Specified by:
treeNodesInsertedin interfacejavax.swing.event.TreeModelListener
-
treeNodesRemoved
public void treeNodesRemoved(javax.swing.event.TreeModelEvent treeModelEvent)
- Specified by:
treeNodesRemovedin interfacejavax.swing.event.TreeModelListener
-
treeNodesChanged
public void treeNodesChanged(javax.swing.event.TreeModelEvent treeModelEvent)
- Specified by:
treeNodesChangedin interfacejavax.swing.event.TreeModelListener
-
getSelectedNode
public FavoritesNode getSelectedNode()
Returns the selected node
-
getAddAction
public javax.swing.Action getAddAction()
Returns the Add action- Overrides:
getAddActionin classHelpNavigatorUI
-
getRemoveAction
public javax.swing.Action getRemoveAction()
Returns the RemoveAction object
-
getFolderAction
public javax.swing.Action getFolderAction()
Returns the FolderAction object
-
getCutAction
public javax.swing.Action getCutAction()
Returns the CutAction object
-
getPasteAction
public javax.swing.Action getPasteAction()
Returns the PasteAction object
-
getCopyAction
public javax.swing.Action getCopyAction()
Returns the CopyAction Object
-
-