fable.framework.toolbox
Class MenuAction

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.jface.action.AbstractAction
          extended by org.eclipse.jface.action.Action
              extended by fable.framework.toolbox.MenuAction
All Implemented Interfaces:
java.util.EventListener, org.eclipse.jface.action.IAction, org.eclipse.jface.action.IMenuCreator, org.eclipse.jface.util.IPropertyChangeListener

public class MenuAction
extends org.eclipse.jface.action.Action
implements org.eclipse.jface.action.IMenuCreator, org.eclipse.jface.util.IPropertyChangeListener

Simple action which will have other actions in a drop down menu.


Field Summary
 
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
 
Constructor Summary
MenuAction(java.lang.String text)
           
MenuAction(java.lang.String text, boolean useTextOfAction)
           
 
Method Summary
 void add(org.eclipse.jface.action.IAction action)
           
 void dispose()
           
 org.eclipse.swt.widgets.Menu getMenu(org.eclipse.swt.widgets.Control parent)
           
 org.eclipse.swt.widgets.Menu getMenu(org.eclipse.swt.widgets.Menu parent)
           
 void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
           
 void run()
           
 void setSelected(int index)
           
 void setToolTipText(java.lang.String ttext)
           
 
Methods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText
 
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

MenuAction

public MenuAction(java.lang.String text)

MenuAction

public MenuAction(java.lang.String text,
                  boolean useTextOfAction)
Method Detail

dispose

public void dispose()
Specified by:
dispose in interface org.eclipse.jface.action.IMenuCreator

propertyChange

public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
Specified by:
propertyChange in interface org.eclipse.jface.util.IPropertyChangeListener

setToolTipText

public void setToolTipText(java.lang.String ttext)
Specified by:
setToolTipText in interface org.eclipse.jface.action.IAction
Overrides:
setToolTipText in class org.eclipse.jface.action.Action

getMenu

public org.eclipse.swt.widgets.Menu getMenu(org.eclipse.swt.widgets.Menu parent)
Specified by:
getMenu in interface org.eclipse.jface.action.IMenuCreator

add

public void add(org.eclipse.jface.action.IAction action)

getMenu

public org.eclipse.swt.widgets.Menu getMenu(org.eclipse.swt.widgets.Control parent)
Specified by:
getMenu in interface org.eclipse.jface.action.IMenuCreator

run

public void run()
Specified by:
run in interface org.eclipse.jface.action.IAction
Overrides:
run in class org.eclipse.jface.action.Action

setSelected

public void setSelected(int index)