roneditor.objectnetview.commands
Class ReconnectONTargetCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by roneditor.objectnetview.commands.ReconnectONTargetCommand

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

command für ändern des Targets eines ONArc


Field Summary
protected  ronmodel.ONNode newTarget
           
protected  ronmodel.ONNode oldTarget
           
protected  ronmodel.ONArc onArc
           
 
Constructor Summary
ReconnectONTargetCommand()
           
 
Method Summary
 boolean canExecute()
           
 void execute()
          Entry point for the command execution.
 ronmodel.ONNode getNewTarget()
           
 ronmodel.ONArc getONArc()
           
 void redo()
          Redo command execution.
 void setNewTarget(ronmodel.ONNode newTarget)
           
 void setONArc(ronmodel.ONArc onArc)
           
 void undo()
          Undo command execution.
 
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
 

Field Detail

oldTarget

protected ronmodel.ONNode oldTarget

newTarget

protected ronmodel.ONNode newTarget

onArc

protected ronmodel.ONArc onArc
Constructor Detail

ReconnectONTargetCommand

public ReconnectONTargetCommand()
Method Detail

canExecute

public boolean canExecute()
Overrides:
canExecute in class org.eclipse.gef.commands.Command
Returns:
true wenn die neue Target und alte Source aus unterschiedliche Klassen sind und keine ONArc haben.

execute

public void execute()
Entry point for the command execution. altes Target wird durch die neue Target ersetzt.

Overrides:
execute in class org.eclipse.gef.commands.Command

redo

public void redo()
Redo command execution.

Overrides:
redo in class org.eclipse.gef.commands.Command

undo

public void undo()
Undo command execution.

Overrides:
undo in class org.eclipse.gef.commands.Command

getNewTarget

public ronmodel.ONNode getNewTarget()

setNewTarget

public void setNewTarget(ronmodel.ONNode newTarget)

getONArc

public ronmodel.ONArc getONArc()

setONArc

public void setONArc(ronmodel.ONArc onArc)