Class MenuSearchWidget.SearchPanel

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.pushingpixels.radiance.theming.internal.widget.menu.MenuSearchWidget.SearchPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Enclosing class:
MenuSearchWidget

private class MenuSearchWidget.SearchPanel extends JPanel
Panel for searching the menus.
  • Field Details

    • searchButton

      private JToggleButton searchButton
      Toggle button for showing / hiding search controls.
    • searchStringField

      private JTextField searchStringField
      Text field for entering search string.
    • resultButtons

      private Map<Integer,JButton> resultButtons
  • Constructor Details

    • SearchPanel

      public SearchPanel()
  • Method Details

    • findOccurences

      private LinkedList<MenuSearchWidget.SearchResult> findOccurences(String searchPattern)
      Returns all occurrences of the specified string in the menus and menu items of the associated menu bar.
      Parameters:
      searchPattern - Pattern to search (no wildcards yet).
      Returns:
      All occurrences of the specified string in the menus and menu items of the associated menu bar.
    • checkMenu

      private void checkMenu(LinkedList<JMenu> currentPath, JMenuItem menuItem, String searchPattern, LinkedList<MenuSearchWidget.SearchResult> matchingResults)
      Recursively scans the specified menu (item) and updates the list that contains all occurrences of the specified string in the contained menus and menu items.
      Parameters:
      currentPath - The path to the current menu (item). Contains JMenus.
      menuItem - The menu (item) itself that is being tested.
      searchPattern - Pattern to search (no wildcards yet).
      matchingResults - All occurrences of the specified string up until now. After this function returns, will also contain all occurrences of the specified string in the contained menu (item)s. Contains MenuSearchWidget.SearchResults.
    • setVisible

      public void setVisible(boolean aFlag)
      Overrides:
      setVisible in class JComponent
    • updateSearchIcon

      private void updateSearchIcon()