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 Details

    • 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 Details

    • 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 List<org.eclipse.gef.ui.palette.LayoutAction.LayoutChangeAction> createActions()
      Returns:
      A list of actions that can switch to one of the supported layout modes
    • dispose

      public void dispose()
      Empty method
      Specified by:
      dispose in interface IMenuCreator
      See Also:
    • getMenu

      public Menu getMenu(Control parent)
      Specified by:
      getMenu in interface IMenuCreator
      See Also:
    • getMenu

      public Menu getMenu(Menu parent)
      Specified by:
      getMenu in interface IMenuCreator
      See Also: