Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.application.visual.editor.actions
Class ChangeContainerExpandActionDelegate

java.lang.Object
  extended by AbstractActionDelegate
      extended by com.ibm.etools.systems.application.visual.editor.actions.ChangeContainerExpandActionDelegate
Direct Known Subclasses:
ChangeAllContainerExpandActionDelegate, CollapseContainerActionDelegate, ExpandContainerActionDelegate

public class ChangeContainerExpandActionDelegate
extends AbstractActionDelegate

Action for changing expand/collapse state of container.


Field Summary
static String copyright
           
 
Constructor Summary
ChangeContainerExpandActionDelegate(boolean collpase)
          Constructor.
 
Method Summary
protected  void autoLayoutDiagram()
          Auto lay out the diagram.
 void dispose()
          Disposes this action delegate.
protected  void doRun(IProgressMonitor progressMonitor)
           
protected  ApplicationModelEditPart getApplicationModelEditPart()
          Helper to return diagram editpart.
protected  boolean getCollapse()
          Getter of the given collapse state.
protected  boolean getCurrentFigureCollapsState(IFigure figure)
          Return current figure's current collapse state.
protected  List getOperationSet()
          Get a set of objects for expanding/collapsing.
protected  List getSelectedObjects()
          Helper to return a list of objects in the current structured selection.
protected  boolean ignoreCollapseRequest(ICollapsableEditPart editPart)
          Check if collapse / expand request should be ignored.
protected  boolean isCollapsableEditPart(EditPart ep)
          check if the given editpart is collapsable.
protected  boolean isValidSelection()
          Return true if current selection is valid input to the action, false otherwise.
 void selectionChanged(IAction act, ISelection selection)
          Notifies this action delegate that the selection in the workbench has changed.
 void setActivePart(IAction action, IWorkbenchPart targetPart)
          Sets the active part for this delegate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static String copyright
Constructor Detail

ChangeContainerExpandActionDelegate

public ChangeContainerExpandActionDelegate(boolean collpase)
Constructor.

Method Detail

getCollapse

protected boolean getCollapse()
Getter of the given collapse state.


selectionChanged

public void selectionChanged(IAction act,
                             ISelection selection)
Notifies this action delegate that the selection in the workbench has changed.

Parameters:
act - The action proxy that handles presentation portion of the action.
selection - The current selection, or null if there is no selection.

setActivePart

public void setActivePart(IAction action,
                          IWorkbenchPart targetPart)
Sets the active part for this delegate. The active part is commonly used to get a working context for the action, such as the shell for any dialog which is needed.

Parameters:
action - The action proxy that handles presentation portion of the action.
targetPart - The new part target.

isValidSelection

protected boolean isValidSelection()
Return true if current selection is valid input to the action, false otherwise.

Returns:

isCollapsableEditPart

protected boolean isCollapsableEditPart(EditPart ep)
check if the given editpart is collapsable.

Parameters:
ep -
Returns:
true if the given editpart is collapsable, false otherwise.

ignoreCollapseRequest

protected boolean ignoreCollapseRequest(ICollapsableEditPart editPart)
Check if collapse / expand request should be ignored. If it has only single child, ignore the request.


getCurrentFigureCollapsState

protected boolean getCurrentFigureCollapsState(IFigure figure)
Return current figure's current collapse state.


doRun

protected void doRun(IProgressMonitor progressMonitor)

getOperationSet

protected List getOperationSet()
Get a set of objects for expanding/collapsing.


dispose

public void dispose()
Disposes this action delegate.


getSelectedObjects

protected List getSelectedObjects()
Helper to return a list of objects in the current structured selection.

Returns:
A list of objects in the current structure selection

autoLayoutDiagram

protected void autoLayoutDiagram()
Auto lay out the diagram.


getApplicationModelEditPart

protected ApplicationModelEditPart getApplicationModelEditPart()
Helper to return diagram editpart.


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.