ptolemy.actor.gui
Class TextEditorTableau.Factory
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.actor.gui.TableauFactory
ptolemy.actor.gui.TextEditorTableau.Factory
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Changeable, Configurable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
- Enclosing class:
- TextEditorTableau
public static class TextEditorTableau.Factory
- extends TableauFactory
A factory that creates text editor tableaux for Ptolemy models.
- See Also:
- Serialized Form
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Method Summary |
Tableau |
createTableau(Effigy effigy)
If the specified effigy is a TextEffigy and it
already contains a tableau named
"textTableau", then return that tableau; otherwise, create
a new instance of TextEditorTableau in the specified
effigy, and name it "textTableau" and return that tableau. |
Methods inherited from class ptolemy.kernel.util.Attribute |
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent |
Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _description, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, 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, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_tableauConstructor
private java.lang.reflect.Constructor _tableauConstructor
_newTextEffigyText
private java.lang.reflect.Method _newTextEffigyText
_newTextEffigyURL
private java.lang.reflect.Method _newTextEffigyURL
TextEditorTableau.Factory
public TextEditorTableau.Factory(NamedObj container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
- Create a factory with the given name and container.
- Parameters:
container
- The container entity.name
- The name of the entity.
- Throws:
IllegalActionException
- If the container is incompatible
with this attribute.
NameDuplicationException
- If the name coincides with
an attribute already in the container.
createTableau
public Tableau createTableau(Effigy effigy)
throws java.lang.Exception
- If the specified effigy is a TextEffigy and it
already contains a tableau named
"textTableau", then return that tableau; otherwise, create
a new instance of TextEditorTableau in the specified
effigy, and name it "textTableau" and return that tableau.
If the specified effigy is not an instance of TextEffigy,
but contains an instance of TextEffigy, then open a tableau
for that effigy. If it is a PtolemyEffigy, then create a
text effigy with the MoML representation of the model.
Finally, if is not a TextEffigy or a PtolemyEffigy,
and it does not contain a TextEffigy, then attempt to
open its URL and display its date by creating a text effigy,
which will then be contained by the specified effigy. If all
of this fails, then do not create a tableau and return null.
It is the responsibility of callers of this method to check the
return value and call show().
- Overrides:
createTableau
in class TableauFactory
- Parameters:
effigy
- The effigy.
- Returns:
- A text editor tableau, or null if one cannot be
found or created.
- Throws:
java.lang.Exception
- If the factory should be able to create a
tableau for the effigy, but something goes wrong.