com.uppaal.model.core2
Class SetPropertyCommand

java.lang.Object
  extended by com.uppaal.model.core2.AbstractCommand
      extended by com.uppaal.model.core2.SetPropertyCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
SetPropertyWithPositionCommand

public class SetPropertyCommand
extends AbstractCommand


Field Summary
protected  Element element
           
protected  String name
           
protected  Property property
           
protected  Object value
           
 
Fields inherited from class com.uppaal.model.core2.AbstractCommand
version
 
Constructor Summary
SetPropertyCommand(Element element, String name, Object value)
           
 
Method Summary
 void execute()
           
protected  Property getLocalProperty()
           
protected  Object getLocalPropertyValue()
           
 Element getModifiedElement()
           
protected  Object swap()
           
 void 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

element

protected Element element

name

protected String name

value

protected Object value

property

protected Property property
Constructor Detail

SetPropertyCommand

public SetPropertyCommand(Element element,
                          String name,
                          Object value)
Method Detail

execute

public void execute()

undo

public void undo()

swap

protected Object swap()

getLocalProperty

protected Property getLocalProperty()

getLocalPropertyValue

protected Object getLocalPropertyValue()

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.