Package com.uppaal.model.core2
Class Property
- java.lang.Object
-
- com.uppaal.model.core2.Element
-
- com.uppaal.model.core2.Property
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class Property extends Element
A property is a special kind of element. Like any element it can have listeners and properties. The value of a property is an object. This can be a string, an integer, even a font or color. The value of a property cannot be set directly. This needs to be done in the parent of the property.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Objectvalue-
Fields inherited from class com.uppaal.model.core2.Element
listeners, properties, prototype
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(Visitor visitor)Accept a visitor.java.awt.ColorgetColor()Returns the value of the color property.java.awt.FontgetFont()java.lang.StringgetName()Returns the name with which this property is registered in the parent.ElementgetPrototypeFromParent(Element parent)Returns the value of the parent's protype's property given by getName() or null if the parent does not have a prototype.java.lang.ObjectgetValue()intgetX()Returns the value of the x property.booleanisVisible()-
Methods inherited from class com.uppaal.model.core2.Element
acceptSafe, addListener, clone, getCommandManager, getDocument, getLocalProperty, getParent, getProperties, getProperty, getPropertyValue, getPrototype, getTemplate, getXMLLabelKinds, getXPath, getXPathTag, getY, hasFlag, importInto, isPropertyLocal, removeListener, setCommandManager, setProperties, setProperty, setPropertyFromPath, setPrototype
-
-
-
-
Method Detail
-
getValue
public java.lang.Object getValue()
-
getColor
public java.awt.Color getColor()
Description copied from class:ElementReturns the value of the color property. The value of the color property must be of typeColor.
-
getFont
public java.awt.Font getFont()
-
isVisible
public boolean isVisible()
-
accept
public void accept(Visitor visitor) throws java.lang.Exception
Description copied from class:ElementAccept a visitor. This method is specialized in every subclass. Part of the visitor pattern.
-
getName
public java.lang.String getName()
Returns the name with which this property is registered in the parent.- Returns:
- The name
-
getPrototypeFromParent
public Element getPrototypeFromParent(Element parent)
Returns the value of the parent's protype's property given by getName() or null if the parent does not have a prototype.- Overrides:
getPrototypeFromParentin classElement- Parameters:
parent- - The parent element- Returns:
- The property element
-
-