org.jupe.editors.classdiagram.model.commands
Class AtomicAddCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.jupe.editors.classdiagram.model.commands.AtomicAddCommand

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

A command to add an existing element to a new parent. Only those elements that need no layout constraint (called atomic, e.g. AttributElement added to ClassElement) are allowed.

The command is more or less unused in the moment. Its only sense is to avoid its execution.

Author:
Steffen Klüpfel, Michael Pradel

Constructor Summary
AtomicAddCommand()
           
 
Method Summary
 boolean canExecute()
           
 void execute()
           
 NodeModelElement getParent()
           
 void redo()
           
 void setChild(NodeModelElement subpart)
           
 void setParent(NodeModelElement newParent)
           
 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomicAddCommand

public AtomicAddCommand()
Method Detail

canExecute

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

execute

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

getParent

public NodeModelElement getParent()

redo

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

setChild

public void setChild(NodeModelElement subpart)

setParent

public void setParent(NodeModelElement newParent)

undo

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