Class AbstractPerFoldPopupMenuItem

  • Direct Known Subclasses:
    CopySetup, SubRangeEvaluation

    public abstract class AbstractPerFoldPopupMenuItem
    extends Object
    Ancestor for classes that add menu items to the per-fold popup menu.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • AbstractPerFoldPopupMenuItem

        public AbstractPerFoldPopupMenuItem()
    • Method Detail

      • setOutputGenerator

        public void setOutputGenerator​(AbstractOutputGenerator value)
        Sets the output generator.
        Parameters:
        value - the generator
      • getOutputGenerator

        public AbstractOutputGenerator getOutputGenerator()
        Returns the output generator.
        Returns:
        the generator
      • getCategory

        public abstract String getCategory()
        The category for grouping menu items.
        Returns:
        the group
      • getTitle

        public abstract String getTitle()
        The menu item title.
        Returns:
        the title
      • createMenuItem

        public abstract JMenuItem createMenuItem​(PerFoldMultiPagePane pane,
                                                 int[] indices)
        Creates the menu item to add to the pane's popup menu.
        Parameters:
        pane - the per-fold panel this menu is for
        indices - the selected indices
        Returns:
        the menu item, null if failed to generate
      • updatePopupMenu

        public static void updatePopupMenu​(PerFoldMultiPagePane pane,
                                           AbstractOutputGenerator generator,
                                           int[] indices,
                                           JPopupMenu menu)
        Updates the menu.
        Parameters:
        pane - the per-fold pane
        owner - the owning tab
        generator - the output generator that was used to generate the per-fold pane
        indices - the currently selected indices
        menu - the menu to update