com.uppaal.model.core2
Class Template

java.lang.Object
  extended by com.uppaal.model.core2.Element
      extended by com.uppaal.model.core2.Node
          extended by com.uppaal.model.core2.AbstractTemplate
              extended by com.uppaal.model.core2.Template
All Implemented Interfaces:
Serializable, Cloneable

public class Template
extends AbstractTemplate

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.uppaal.model.core2.Node
first, next, previous
 
Fields inherited from class com.uppaal.model.core2.Element
listeners, properties, prototype
 
Constructor Summary
Template(Element prototype)
           
 
Method Summary
 Object clone()
          Returns a deep clone of the template.
 BranchPoint createBranchPoint()
          Create a new branch point with this template as the parent and optionally a prototype according to the '#branchpoint' property of the template.
 Edge createEdge()
          Create a new edge with this template as the parent and optionally a prototype according to the '#edge' property of the template.
 Location createLocation()
          Create a new location with this template as the parent and optionally a prototype according to the '#location' property of the template.
 Element getPrototypeFromParent(Element parent)
          Returns the #template property value of the parent argument.
 
Methods inherited from class com.uppaal.model.core2.AbstractTemplate
accept, getTemplate
 
Methods inherited from class com.uppaal.model.core2.Node
getFirst, getLast, getNext, getPrevious, insert, move, remove, setPrototype
 
Methods inherited from class com.uppaal.model.core2.Element
acceptSafe, addListener, getColor, getDocument, getLocalProperty, getParent, getProperties, getProperty, getPropertyValue, getPrototype, getX, getY, hasFlag, importInto, isPropertyLocal, removeListener, setProperties, setProperty, setPropertyFromPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Template

public Template(Element prototype)
Method Detail

createLocation

public Location createLocation()
Create a new location with this template as the parent and optionally a prototype according to the '#location' property of the template. The new location is not inserted into the tree!


createBranchPoint

public BranchPoint createBranchPoint()
Create a new branch point with this template as the parent and optionally a prototype according to the '#branchpoint' property of the template. The new branch point is not inserted into the tree!


createEdge

public Edge createEdge()
Create a new edge with this template as the parent and optionally a prototype according to the '#edge' property of the template. The new edge is not inserted into the tree!


getPrototypeFromParent

public Element getPrototypeFromParent(Element parent)
Returns the #template property value of the parent argument.

Specified by:
getPrototypeFromParent in class AbstractTemplate

clone

public Object clone()
             throws CloneNotSupportedException
Returns a deep clone of the template. The source and target of any edges in the template are set to the corresponding clones of the locations of the template.

Overrides:
clone in class AbstractTemplate
Throws:
CloneNotSupportedException


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