com.uppaal.model.core2.lsc
Class RemoveAnchorCommand

java.lang.Object
  extended by com.uppaal.model.core2.AbstractCommand
      extended by com.uppaal.model.core2.AbstractTransaction
          extended by com.uppaal.model.core2.lsc.RemoveAnchorCommand
All Implemented Interfaces:
Command

public class RemoveAnchorCommand
extends AbstractTransaction


Field Summary
protected  Condition element
           
protected  InstanceLine oldAnchor
           
 
Fields inherited from class com.uppaal.model.core2.AbstractTransaction
committed, document
 
Fields inherited from class com.uppaal.model.core2.AbstractCommand
version
 
Constructor Summary
RemoveAnchorCommand(Document document, Element element, InstanceLine anchor)
          Constructor
 
Method Summary
protected  void doCancel()
          Undo the translation.
protected  void doExecute()
           
protected  void doUndo()
           
 Element getModifiedElement()
           
 void removeAnchor(ViewWorkAround view)
           
 
Methods inherited from class com.uppaal.model.core2.AbstractTransaction
cancel, commit, execute, move, undo
 
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oldAnchor

protected InstanceLine oldAnchor

element

protected Condition element
Constructor Detail

RemoveAnchorCommand

public RemoveAnchorCommand(Document document,
                           Element element,
                           InstanceLine anchor)
Constructor

Parameters:
document -
element -
Method Detail

removeAnchor

public void removeAnchor(ViewWorkAround view)

doCancel

protected void doCancel()
Undo the translation. All elements are moved back to their original position. The translation can only be canceled as long as it has not been committed.

Specified by:
doCancel in class AbstractTransaction

doExecute

protected void doExecute()
Specified by:
doExecute in class AbstractTransaction

doUndo

protected void doUndo()
Specified by:
doUndo in class AbstractTransaction

getModifiedElement

public Element getModifiedElement()
Returns:
the modified element or its closest relative (sibling or parent) if the element is not displayed.


Copyright © 2012 Uppsala University and Aalborg University. All Rights Reserved.