de.cau.cs.kieler.kiml.graphiti
Class GraphitiLayoutCommand

java.lang.Object
  extended by org.eclipse.emf.common.command.AbstractCommand
      extended by org.eclipse.emf.transaction.RecordingCommand
          extended by de.cau.cs.kieler.kiml.graphiti.GraphitiLayoutCommand
All Implemented Interfaces:
Command, ConditionalRedoCommand

public class GraphitiLayoutCommand
extends RecordingCommand

A command for applying the result of automatic layout to a Graphiti diagram.

Rating red

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand
AbstractCommand.NonDirtying
 
Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.util.ConditionalRedoCommand
ConditionalRedoCommand.Compound
 
Field Summary
static IProperty<KInsets> INVIS_INSETS
          node property for the insets caused by invisible shapes.
 
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand
description, isExecutable, isPrepared, label
 
Constructor Summary
GraphitiLayoutCommand(TransactionalEditingDomain domain, org.eclipse.graphiti.features.IFeatureProvider thefeatureProvider)
          Creates a Graphiti layout command.
 
Method Summary
 void add(KGraphElement graphElement, org.eclipse.graphiti.mm.pictograms.PictogramElement pictogramElement)
          Adds the given element to this command.
protected  void doExecute()
          
 KVectorChain getBendPoints(KEdge edge)
          Get a vector chain holding the bend points for the given edge.
 
Methods inherited from class org.eclipse.emf.transaction.RecordingCommand
canRedo, canUndo, chain, dispose, execute, postExecute, preExecute, prepare, redo, undo
 
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand
canExecute, getAffectedObjects, getDescription, getLabel, getResult, setDescription, setLabel, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.common.command.Command
canExecute, getAffectedObjects, getDescription, getLabel, getResult
 

Field Detail

INVIS_INSETS

public static final IProperty<KInsets> INVIS_INSETS
node property for the insets caused by invisible shapes.

Constructor Detail

GraphitiLayoutCommand

public GraphitiLayoutCommand(TransactionalEditingDomain domain,
                             org.eclipse.graphiti.features.IFeatureProvider thefeatureProvider)
Creates a Graphiti layout command.

Parameters:
domain - the transactional editing domain
thefeatureProvider - the feature provider
Method Detail

add

public void add(KGraphElement graphElement,
                org.eclipse.graphiti.mm.pictograms.PictogramElement pictogramElement)
Adds the given element to this command.

Parameters:
graphElement - an element of the layout graph
pictogramElement - the corresponding pictogram element

doExecute

protected void doExecute()

Specified by:
doExecute in class RecordingCommand

getBendPoints

public KVectorChain getBendPoints(KEdge edge)
Get a vector chain holding the bend points for the given edge.

Parameters:
edge - a layout edge
Returns:
the bend points for the edge