public abstract class ActionGUIProperty extends GUIProperty implements Configurable
NamedObj.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected GUIAction |
_action
The action.
|
Parameter |
parse
A Boolean parameter that determines whether the moml text should be
parsed before applying to the current model in the
perform()
method. |
preferredSize
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
ActionGUIProperty(NamedObj container,
java.lang.String name)
Construct a GUI property with the given name contained by the specified
entity.
|
Modifier and Type | Method and Description |
---|---|
protected GUIAction |
_createAction()
Create the action to be used in this property.
|
void |
configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
Configure the object with data from the specified input source
(a URL) and/or textual data.
|
java.lang.String |
getConfigureSource()
Return the input source that was specified the last time the configure
method was called.
|
java.lang.String |
getConfigureText()
Return the text string that represents the current configuration of
this object.
|
void |
perform()
Perform this action.
|
_createComponent, attributeChanged, clone, getComponent, setContainer
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
public Parameter parse
perform()
method.protected GUIAction _action
public ActionGUIProperty(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this attribute.IllegalActionException
- If the attribute is not of an
acceptable class for the container, or if the name contains a period.NameDuplicationException
- If the name coincides with
an attribute already in the container.public void configure(java.net.URL base, java.lang.String source, java.lang.String text) throws java.lang.Exception
This method is defined to throw a very general exception to allow classes that implement the interface to use whatever exceptions are appropriate.
configure
in interface Configurable
base
- The base relative to which references within the input
are found, or null if this is not known, or there is none.source
- The input source, which specifies a URL, or null
if none.text
- Configuration information given as text, or null if
none.java.lang.Exception
- If something goes wrong.public java.lang.String getConfigureSource()
getConfigureSource
in interface Configurable
public java.lang.String getConfigureText()
getConfigureText
in interface Configurable
public void perform()
<configure source="some_file.xml"> </configure>then the source is read and its contents are used as the moml text. The moml text can also be given directly:
<configure> <entity name="C" class="ptolemy.actor.lib.Const"> </entity> </configure>Depending on whether the
parse
parameter is true or false,
the moml text may be parsed first or not. If it is parsed, the
returned NamedObj is used to generate a new moml string to be
applied to the model in the current tableau (the nearest tableau
that contains this GUI property). If it is not parsed, then the moml
text is directly applied to the model.protected GUIAction _createAction() throws IllegalActionException, NameDuplicationException
IllegalActionException
- If the attribute is not of an
acceptable class for the container, or if the name contains a period.NameDuplicationException
- If the name coincides with
an attribute already in the container.