Eclipse GEF
3.0

org.eclipse.gef.ui.palette
Class LayoutAction

java.lang.Object
  extended byAction
      extended byorg.eclipse.gef.ui.palette.LayoutAction

public class LayoutAction
extends Action

This action allows to switch between the various supported layout modes for the given palette.

See Also:
Serialized Form

Constructor Summary
LayoutAction(PaletteViewerPreferences prefs)
          Constructor
LayoutAction(PaletteViewerPreferences prefs, boolean hasIcon)
          Constructor
 
Method Summary
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.
protected  List createActions()
           
 void dispose()
          Empty method
 Menu getMenu(Control parent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 List createActions()
Returns:
A list of actions that can switch to one of the supported layout modes

dispose

public void dispose()
Empty method

See Also:
IMenuCreator

getMenu

public Menu getMenu(Control parent)
See Also:
IMenuCreator

Eclipse GEF
3.0

Copyright (c) IBM Corp. and others 2000, 2004. All Rights Reserved.