public class AttributeElement extends PositionableElement
Constructor and Description |
---|
AttributeElement(Attribute attribute)
Parse the Ptolemy attribute element.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(ValueListener listener)
Attach a value listener to the underlying attribute.
|
void |
addToContainer(PortableContainer container)
Add the visual representation of the element to the provided
container.
|
void |
changeStyle(ParameterEditorStyle style)
Change the style of the parameter to a new style.
|
void |
removeListener(ValueListener listener)
Remove a value listener from the underlying attribute.
|
getElement, getLocation, getTab, setLocation, setTab
public AttributeElement(Attribute attribute) throws IllegalActionException
attribute
- The Ptolemy attribute element to be parsed.IllegalActionException
- If the attribute is not settable.public void addListener(ValueListener listener)
listener
- The listener to attach.public void addToContainer(PortableContainer container) throws IllegalActionException
addToContainer
in class PositionableElement
container
- The container for the element to be placed in.IllegalActionException
- If the element cannot be added
to the container.public void changeStyle(ParameterEditorStyle style) throws IllegalActionException
style
- The new style to be used by the attribute.IllegalActionException
- If this attribute is not of the
expected class for the container, or it has no name, or the attribute
and container are not in the same workspace, or the proposed container
would result in recursive containment, or the proposed container is not
an instance of Settable. Also, if the style name is not the expected
name for the style.public void removeListener(ValueListener listener)
listener
- The listener to remove.addListener(ValueListener)