pl.edu.agh.cast.schema.editor.action.layout
Class AbstractSetLayoutAction

java.lang.Object
  extended by pl.edu.agh.cast.schema.editor.action.layout.AbstractSetLayoutAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IEditorActionDelegate
Direct Known Subclasses:
AbstractLayoutAlgorithmAction, SetCircleLayoutAction, SetGroupLayoutAction, SetPeacockLayoutAction, SetRandomLayoutAction

public abstract class AbstractSetLayoutAction
extends Object
implements org.eclipse.ui.IEditorActionDelegate

Context menu action for setting nodes layout.

Author:
AGH CAST Team

Field Summary
protected  org.eclipse.gef.commands.CommandStack commandStack
          GEF command stack
protected  ISchemaDiagram diagram
          Schema diagram which contains nodes to layout
protected  List<ISchemaNode> selectedNodes
          Nodes to layout.
 
Constructor Summary
AbstractSetLayoutAction()
           
 
Method Summary
protected abstract  ILayoutAlgorithm getAlgorithm()
          Returns used current layout algorithm.
 void run(org.eclipse.jface.action.IAction action)
          
 void selectionChanged(org.eclipse.jface.action.IAction arg0, org.eclipse.jface.viewers.ISelection selection)
          
 void setActiveEditor(org.eclipse.jface.action.IAction action, org.eclipse.ui.IEditorPart activeEditor)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandStack

protected org.eclipse.gef.commands.CommandStack commandStack
GEF command stack


diagram

protected ISchemaDiagram diagram
Schema diagram which contains nodes to layout


selectedNodes

protected List<ISchemaNode> selectedNodes
Nodes to layout. If empty action will be performed on all nodes belonging to the diagram.

Constructor Detail

AbstractSetLayoutAction

public AbstractSetLayoutAction()
Method Detail

selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction arg0,
                             org.eclipse.jface.viewers.ISelection selection)

Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate
See Also:
IActionDelegate.selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)

setActiveEditor

public void setActiveEditor(org.eclipse.jface.action.IAction action,
                            org.eclipse.ui.IEditorPart activeEditor)

Specified by:
setActiveEditor in interface org.eclipse.ui.IEditorActionDelegate
See Also:
IEditorActionDelegate.setActiveEditor(org.eclipse.jface.action.IAction, org.eclipse.ui.IEditorPart)

run

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

Specified by:
run in interface org.eclipse.ui.IActionDelegate
See Also:
IActionDelegate.run(org.eclipse.jface.action.IAction)

getAlgorithm

protected abstract ILayoutAlgorithm getAlgorithm()
Returns used current layout algorithm.

Returns:
a layout algorithm


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.