Class LayoutAction

  • All Implemented Interfaces:
    IAction, IMenuCreator

    public class LayoutAction
    extends Action
    implements IMenuCreator
    This action allows to switch between the various supported layout modes for the given palette.
    • Constructor Detail

      • LayoutAction

        public LayoutAction​(PaletteViewerPreferences prefs)
        Constructor
        Parameters:
        prefs - PaletteViewerPreferences object where the settings can be saved
      • LayoutAction

        public LayoutAction​(PaletteViewerPreferences prefs,
                            boolean hasIcon)
        Constructor
        Parameters:
        hasIcon - True if this action should associate an icon with itself
        prefs - PaletteViewerPreferences object where the settings can be saved
    • Method Detail

      • addActionToMenu

        protected void addActionToMenu​(Menu parent,
                                       IAction action)
        Helper method that wraps the given action in an ActionContributionItem and then adds it to the given menu.
        Parameters:
        parent - The menu to which the given action is to be added
        action - The action that is to be added to the given menu
      • createActions

        protected java.util.List createActions()
        Returns:
        A list of actions that can switch to one of the supported layout modes