uk.ac.kcl.cch.jb.pliny.actions
Class MinimizeAllAction

java.lang.Object
  extended byorg.eclipse.core.commands.common.EventManager
      extended byorg.eclipse.jface.action.AbstractAction
          extended byorg.eclipse.jface.action.Action
              extended byorg.eclipse.gef.ui.actions.WorkbenchPartAction
                  extended byuk.ac.kcl.cch.jb.pliny.actions.MinimizeAllAction
All Implemented Interfaces:
org.eclipse.gef.Disposable, org.eclipse.jface.action.IAction, org.eclipse.gef.ui.actions.UpdateAction

public class MinimizeAllAction
extends org.eclipse.gef.ui.actions.WorkbenchPartAction

This action supports the Minimize All action for Pliny editors and view.

Note that this action derives from GEF's WorkbenchPartAction, so it operates with editors and views that contain a CommandStack, and the minimize is done by means of a command so that it is undoable.

Author:
John Bradley

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
MinimizeAllAction()
          constructor for this action.
MinimizeAllAction(IResourceDrivenPart part)
          constructor for this action to be used by any pliny view or editor that implements IResourceDrivenPart.
 
Method Summary
protected  boolean calculateEnabled()
           
protected  void init()
           
 void run()
          executes the command MinimizeAllContainedObjectCommand against the part's CommandStack.
 void updatePart(IResourceDrivenPart part)
          provides a pliny part with which this action is to work.
 
Methods inherited from class org.eclipse.gef.ui.actions.WorkbenchPartAction
dispose, execute, getCommandStack, getWorkbenchPart, isEnabled, refresh, setLazyEnablementCalculation, setWorkbenchPart, update
 
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, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

MinimizeAllAction

public MinimizeAllAction()
constructor for this action. If this constructor is used updatePart(part) must be called (to give the code a part against which to work) before run() is invoked.


MinimizeAllAction

public MinimizeAllAction(IResourceDrivenPart part)
constructor for this action to be used by any pliny view or editor that implements IResourceDrivenPart.

Parameters:
part - the Resource Driver Part
Method Detail

init

protected void init()

updatePart

public void updatePart(IResourceDrivenPart part)
provides a pliny part with which this action is to work. The part must implement IResourceDrivenPart.

Parameters:
part - the IResourceDrivenPart

run

public void run()
executes the command MinimizeAllContainedObjectCommand against the part's CommandStack. This makes the minimization undoable.


calculateEnabled

protected boolean calculateEnabled()