Class FavoritesManagementPanel

    • Field Detail

      • SEPARATOR

        public static final String SEPARATOR
        the separator between name and commandline of favorite.
        See Also:
        Constant Field Values
      • m_Favorites

        protected Favorites m_Favorites
        the favorites in use.
      • m_MenuBar

        protected JMenuBar m_MenuBar
        the menu bar, if used.
      • m_MenuItemSave

        protected JMenuItem m_MenuItemSave
        the "save" menu item.
      • m_MenuItemRevert

        protected JMenuItem m_MenuItemRevert
        the "revert" menu item.
      • m_MenuItemClose

        protected JMenuItem m_MenuItemClose
        the "close" menu item.
      • m_PanelSuperclasses

        protected BaseListWithButtons m_PanelSuperclasses
        the panel for the superclasses.
      • m_ButtonSuperclassAdd

        protected BaseButton m_ButtonSuperclassAdd
        the button for adding a superclass.
      • m_ButtonSuperclassRemove

        protected BaseButton m_ButtonSuperclassRemove
        the button for removing a superclass.
      • m_ButtonSuperclassRemoveAll

        protected BaseButton m_ButtonSuperclassRemoveAll
        the button for removing all superclasses.
      • m_PanelFavorites

        protected BaseListWithButtons m_PanelFavorites
        the panel for the favorites.
      • m_ButtonFavoriteAdd

        protected BaseButton m_ButtonFavoriteAdd
        the button for adding a favorite.
      • m_ButtonFavoriteEdit

        protected BaseButton m_ButtonFavoriteEdit
        the button for editing a favorite.
      • m_ButtonFavoriteRename

        protected BaseButton m_ButtonFavoriteRename
        the button for renaming a favorite.
      • m_ButtonFavoriteRemove

        protected BaseButton m_ButtonFavoriteRemove
        the button for removing a favorite.
      • m_ButtonFavoriteRemoveAll

        protected BaseButton m_ButtonFavoriteRemoveAll
        the button for removing all favorites.
    • Constructor Detail

      • FavoritesManagementPanel

        public FavoritesManagementPanel()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class BasePanel
      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • getGOEEditor

        protected GenericObjectEditorDialog getGOEEditor()
        Returns the GOE editor dialog to use.
        Returns:
        the dialog
      • addSuperclass

        protected void addSuperclass()
        Adds a new superclass for favorites. Automatically pops up dialog for adding a favorite.
      • addFavorite

        protected void addFavorite​(Class cls)
        Pops up dialog for adding a new favorite.
        Parameters:
        cls - the superclass the favorite is for
      • editFavorite

        protected void editFavorite​(Class cls,
                                    String entry)
        Pops up a dialog for editing a favorite.
        Parameters:
        cls - the superclass of the favorite
        entry - the entry in the list
      • renameFavorite

        protected void renameFavorite​(Class cls,
                                      String entry)
        Pops up a dialog for renaming a favorite.
        Parameters:
        cls - the superclass of the favorite
        entry - the entry in the list
      • getMenuBar

        public JMenuBar getMenuBar()
        Creates a menu bar (singleton per panel object). Can be used in frames.
        Specified by:
        getMenuBar in interface MenuBarProvider
        Returns:
        the menu bar
      • updateTitle

        protected void updateTitle()
        Updates the title of the dialog.
      • updateMenu

        protected void updateMenu()
        updates the enabled state of the menu items.
      • updateButtons

        protected void updateButtons()
        Updates the state of the buttons.
      • update

        protected void update()
        Updates menu, buttons and title.
      • checkForModified

        protected boolean checkForModified()
        Returns whether we can proceed with the operation or not, depending on whether the user saved the placeholders or discarded the changes. In case of custom placeholdersm the use will never get asked.
        Returns:
        true if safe to proceed
      • save

        protected void save()
        Saves the current favorites.
      • revert

        protected void revert()
        Reverts the changes.
      • close

        protected void close()
        Closes the dialog or frame.