roneditor.objectnetview.commands
Class ReconnectONSourceCommand

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

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

command für ändern des sources eines ONArc


Field Summary
protected  ronmodel.ONNode newSource
           
protected  ronmodel.ONNode oldSource
           
protected  ronmodel.ONArc onArc
           
 
Constructor Summary
ReconnectONSourceCommand()
           
 
Method Summary
 boolean canExecute()
           
 void execute()
          Entry point for the command execution.
 ronmodel.ONNode getNewSource()
           
 ronmodel.ONArc getONArc()
           
 void redo()
          Redo command execution.
 void setNewSource(ronmodel.ONNode newSource)
           
 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

oldSource

protected ronmodel.ONNode oldSource

newSource

protected ronmodel.ONNode newSource

onArc

protected ronmodel.ONArc onArc
Constructor Detail

ReconnectONSourceCommand

public ReconnectONSourceCommand()
Method Detail

canExecute

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

execute

public void execute()
Entry point for the command execution. altes Source wird durch die neue Source 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

getNewSource

public ronmodel.ONNode getNewSource()

setNewSource

public void setNewSource(ronmodel.ONNode newSource)

getONArc

public ronmodel.ONArc getONArc()

setONArc

public void setONArc(ronmodel.ONArc onArc)