org.eclipse.gmf.runtime.common.ui.action
Class ActionMenuManager.MenuCreatorAction
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.ui.actions.PartEventAction
org.eclipse.ui.actions.RetargetAction
org.eclipse.ui.actions.LabelRetargetAction
org.eclipse.gmf.runtime.common.ui.action.ActionMenuManager.MenuCreatorAction
- All Implemented Interfaces:
- ActionFactory.IWorkbenchAction, IAction, IMenuCreator, IPartListener
- Enclosing class:
- ActionMenuManager
- public class ActionMenuManager.MenuCreatorAction
- extends LabelRetargetAction
- implements IMenuCreator
An action that provides a menu and fills it from the contribution
items of the enclosing menu manager. It also retargets to the
manager's supplied action handler.
| Fields inherited from interface org.eclipse.jface.action.IAction |
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT |
| Methods inherited from class org.eclipse.jface.action.Action |
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, notifyResult, removeAcceleratorText, removeMnemonics, setAccelerator, setActionDefinitionId, setDescription, setEnabled, setId, setMenuCreator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.action.IAction |
addPropertyChangeListener, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, removePropertyChangeListener, setAccelerator, setActionDefinitionId, setDescription, setEnabled, setId, setMenuCreator |
ActionMenuManager.MenuCreatorAction
public ActionMenuManager.MenuCreatorAction(IAction actionHandler)
- Creates a new menu creator action
- Parameters:
actionHandler - the action handler
getMenu
public Menu getMenu(Control parent)
- Specified by:
getMenu in interface IMenuCreator
getMenu
public Menu getMenu(Menu parent)
- Specified by:
getMenu in interface IMenuCreator
dispose
public void dispose()
- Specified by:
dispose in interface IMenuCreator
createMenu
protected Menu createMenu(Menu mnu)
- Create the drop-down/pop-up menu.
- Parameters:
mnu - Menu for which to create the drop-down/pop-up menu
- Returns:
Menu the drop-down/pop-up menu
propagateChange
protected void propagateChange(PropertyChangeEvent event)
- Ignores the action handler's "enable" event since "enablement"
is determined by the sub-action(s) enablement state
setActionHandler
protected void setActionHandler(IAction handler)
- Ignores the action handler's "enable" event since "enablement"
is determined by the sub-action(s)
run
public void run()
- Only run the action handler if it is enabled
- Specified by:
run in interface IAction
runWithEvent
public void runWithEvent(Event event)
- Only run the action handler if it is enabled
- Specified by:
runWithEvent in interface IAction
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.