org.wsmostudio.bpmo.ui.editor.command
Class GatewayCreateCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.wsmostudio.bpmo.ui.editor.command.GatewayCreateCommand

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

A command to add a Shape to a ShapeDiagram. The command can be undone or redone.

Author:
Elias Volanakis

Constructor Summary
GatewayCreateCommand(GatewayNode newTask, WorkflowEntitiesContainer host, org.eclipse.draw2d.geometry.Rectangle bounds)
          Create a command that will add a new Shape to a ShapesDiagram.
 
Method Summary
 boolean canExecute()
          Can execute if all the necessary information has been provided.
 void execute()
           
 void redo()
           
 void undo()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
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

GatewayCreateCommand

public GatewayCreateCommand(GatewayNode newTask,
                            WorkflowEntitiesContainer host,
                            org.eclipse.draw2d.geometry.Rectangle bounds)
Create a command that will add a new Shape to a ShapesDiagram.

Parameters:
newShape - the new Shape that is to be added
parent - the ShapesDiagram that will hold the new element
bounds - the bounds of the new shape; the size can be (-1, -1) if not known
Throws:
java.lang.IllegalArgumentException - if any parameter is null, or the request does not provide a new Shape instance
Method Detail

canExecute

public boolean canExecute()
Can execute if all the necessary information has been provided.

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

execute

public void execute()
Overrides:
execute in class org.eclipse.gef.commands.Command

redo

public void redo()
Overrides:
redo in class org.eclipse.gef.commands.Command

undo

public void undo()
Overrides:
undo in class org.eclipse.gef.commands.Command


Copyright © 2005-2008 Ontotext Lab.. All Rights Reserved.