Class MenuSearchWidget
java.lang.Object
org.pushingpixels.radiance.theming.api.RadianceThemingWidget<JMenuBar>
org.pushingpixels.radiance.theming.internal.widget.menu.MenuSearchWidget
Adds menu search panel to menu bars.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Panel for searching the menus.private static class
Single result of menu search.private static class
Listener on thesearch result
button.private class
Layout for the search panel. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Boolean flag to prevent infinite loop.private PropertyChangeListener
Listens on changes to the component orientation.private MenuSearchWidget.SearchPanel
The associated search panel.Fields inherited from class org.pushingpixels.radiance.theming.api.RadianceThemingWidget
jcomp
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
getMenuItemCount
(JMenuBar menuBar) Returns the number of menu items under the specified menu bar.private static int
getMenuItemCount
(JMenuItem menuItem) Returns the number of menu items under the specified menu item.void
Installs listeners for the associated component.void
Installs UI on the associated component.private void
reset()
private static boolean
toInstallMenuSearch
(JMenuBar menuBar) void
Uninstalls listeners for the associated component.void
Uninstalls UI on the associated component.Methods inherited from class org.pushingpixels.radiance.theming.api.RadianceThemingWidget
installComponents, installDefaults, setComponent, uninstallComponents, uninstallDefaults
-
Field Details
-
inEvent
private boolean inEventBoolean flag to prevent infinite loop. Maybe need to use something more elegant. -
propertyListener
Listens on changes to the component orientation. -
searchPanel
The associated search panel.
-
-
Constructor Details
-
MenuSearchWidget
public MenuSearchWidget()
-
-
Method Details
-
toInstallMenuSearch
-
getMenuItemCount
Returns the number of menu items under the specified menu item.- Parameters:
menuItem
- The root menu item.- Returns:
- The number of menu items under the specified menu item.
-
getMenuItemCount
Returns the number of menu items under the specified menu bar.- Parameters:
menuBar
- The root menu bar.- Returns:
- The number of menu items under the specified menu bar.
-
installUI
public void installUI()Description copied from class:RadianceThemingWidget
Installs UI on the associated component.- Overrides:
installUI
in classRadianceThemingWidget<JMenuBar>
-
uninstallUI
public void uninstallUI()Description copied from class:RadianceThemingWidget
Uninstalls UI on the associated component.- Overrides:
uninstallUI
in classRadianceThemingWidget<JMenuBar>
-
installListeners
public void installListeners()Description copied from class:RadianceThemingWidget
Installs listeners for the associated component.- Overrides:
installListeners
in classRadianceThemingWidget<JMenuBar>
-
uninstallListeners
public void uninstallListeners()Description copied from class:RadianceThemingWidget
Uninstalls listeners for the associated component.- Overrides:
uninstallListeners
in classRadianceThemingWidget<JMenuBar>
-
reset
private void reset()
-