Class MenuSearchWidget.SearchResult

  • Enclosing class:
    MenuSearchWidget

    private static class MenuSearchWidget.SearchResult
    extends java.lang.Object
    Single result of menu search.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.swing.MenuElement[] menuElements
      Path to the menu (item).
    • Constructor Summary

      Constructors 
      Constructor Description
      SearchResult​(javax.swing.JMenuBar menuBar, java.util.LinkedList<javax.swing.JMenu> menuPath, javax.swing.JMenuItem menuLeaf)
      Simple constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEnabled()
      Checks that all entries leading to the associated menu (item) are enabled.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • menuElements

        private javax.swing.MenuElement[] menuElements
        Path to the menu (item). The first element is always JMenuBar, and after each JMenu there is it's JMenu.getPopupMenu().
    • Constructor Detail

      • SearchResult

        public SearchResult​(javax.swing.JMenuBar menuBar,
                            java.util.LinkedList<javax.swing.JMenu> menuPath,
                            javax.swing.JMenuItem menuLeaf)
        Simple constructor.
        Parameters:
        menuBar - The main menu bar.
        menuPath - The menus leading to the matching entry. Contains JMenus.
        menuLeaf - The menu (item) that matches the search pattern string.
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isEnabled

        public boolean isEnabled()
        Checks that all entries leading to the associated menu (item) are enabled.
        Returns:
        true if all entries leading to the associated menu (item) are enabled, false otherwise.