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