roneditor.objectnetview.commands
Class DeleteONNodeCommand

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

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

Command for deleting a transition.


Field Summary
private static java.lang.String DeleteCommand_Label
           
private  java.util.Vector<org.eclipse.emf.ecore.EObject> incomingMappings
           
private  java.util.Vector<org.eclipse.emf.ecore.EObject> incomingONArcs
           
private  ronmodel.ObjectNet objectNet
           
private  ronmodel.ONNode onNode
           
private  java.util.Vector<org.eclipse.emf.ecore.EObject> outgoingMappings
           
private  java.util.Vector<org.eclipse.emf.ecore.EObject> outgoingONArcs
           
private  int x
           
private  int y
           
 
Constructor Summary
DeleteONNodeCommand()
           
 
Method Summary
 boolean canExecute()
           
private  void deleteArcs(ronmodel.ONNode onNode)
          Delete all arcs which are connected with the transition.
private  void deleteMappings(ronmodel.ONNode onNode)
          Delete all mappings which are connected with another node.
 void execute()
          Entry point for command execution.
 ronmodel.ObjectNet getObjectNet()
           
 ronmodel.ONNode getONNode()
           
 int getX()
           
 int getY()
           
 void redo()
           
 void setObjectNet(ronmodel.ObjectNet objectNet)
           
 void setONNode(ronmodel.ONNode node)
           
 void setX(int x)
           
 void setY(int y)
           
 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

DeleteCommand_Label

private static final java.lang.String DeleteCommand_Label
See Also:
Constant Field Values

onNode

private ronmodel.ONNode onNode

x

private int x

y

private int y

objectNet

private ronmodel.ObjectNet objectNet

incomingONArcs

private java.util.Vector<org.eclipse.emf.ecore.EObject> incomingONArcs

outgoingONArcs

private java.util.Vector<org.eclipse.emf.ecore.EObject> outgoingONArcs

incomingMappings

private java.util.Vector<org.eclipse.emf.ecore.EObject> incomingMappings

outgoingMappings

private java.util.Vector<org.eclipse.emf.ecore.EObject> outgoingMappings
Constructor Detail

DeleteONNodeCommand

public DeleteONNodeCommand()
Method Detail

deleteArcs

private void deleteArcs(ronmodel.ONNode onNode)
Delete all arcs which are connected with the transition.

Parameters:
onNode -

deleteMappings

private void deleteMappings(ronmodel.ONNode onNode)
Delete all mappings which are connected with another node.

Parameters:
onNode -

execute

public void execute()
Entry point for command execution. ein ONNode wird aus einem ObjectNet gelöscht. dabei werden alle onArcs und mappings von diesem ONNode mitgelöscht

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()
Undo command execution.

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

canExecute

public boolean canExecute()
Overrides:
canExecute in class org.eclipse.gef.commands.Command

getObjectNet

public ronmodel.ObjectNet getObjectNet()
Returns:
the objectNet

setObjectNet

public void setObjectNet(ronmodel.ObjectNet objectNet)
Parameters:
objectNet - the objectNet to set

getONNode

public ronmodel.ONNode getONNode()
Returns:
the node

setONNode

public void setONNode(ronmodel.ONNode node)
Parameters:
node - the node to set

getX

public int getX()
Returns:
the x

setX

public void setX(int x)
Parameters:
x - the x to set

getY

public int getY()
Returns:
the y

setY

public void setY(int y)
Parameters:
y - the y to set