pl.edu.agh.cast.schema.editor.command
Class SetLayoutCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by pl.edu.agh.cast.schema.editor.command.SetLayoutCommand

public class SetLayoutCommand
extends org.eclipse.gef.commands.Command

Command positioning given elements according to injected algorithm strategy.

While this command's execute() method is run, IVisualSchemaNodes' location property change events are NOT fired. GUI has to be manually refreshed!

Author:
AGH CAST Team

Constructor Summary
SetLayoutCommand(ILayoutAlgorithm layout, ISchemaDiagram diagram, Collection<ISchemaNode> nodesToLayout, String label)
          Constructor.
SetLayoutCommand(ILayoutAlgorithm layout, ISchemaDiagram diagram, String label)
          Constructor which get contents edit part.
 
Method Summary
 void execute()
          
 void redo()
          
 void undo()
          
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetLayoutCommand

public SetLayoutCommand(ILayoutAlgorithm layout,
                        ISchemaDiagram diagram,
                        Collection<ISchemaNode> nodesToLayout,
                        String label)
Constructor.

Parameters:
layout - layout to perform
diagram - diagram which contains nodes to layout
nodesToLayout - nodes to layout
label - layout label

SetLayoutCommand

public SetLayoutCommand(ILayoutAlgorithm layout,
                        ISchemaDiagram diagram,
                        String label)
Constructor which get contents edit part. The layout will be performed on its all schema node edit parts belonging to the contents edit part.

Parameters:
layout - layout to perform
diagram - diagram to layout
label - layout label
Method Detail

execute

public void execute()

Overrides:
execute in class org.eclipse.gef.commands.Command
See Also:
Command.execute()

undo

public void undo()

Overrides:
undo in class org.eclipse.gef.commands.Command
See Also:
Command.undo()

redo

public void redo()

Overrides:
redo in class org.eclipse.gef.commands.Command
See Also:
Command.redo()


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