public class PtolemyEffigy extends Effigy implements ChangeListener
Modifier and Type | Class and Description |
---|---|
static class |
PtolemyEffigy.Factory
A factory for creating new Ptolemy effigies.
|
static class |
PtolemyEffigy.FactoryWithoutNew
A factory for creating new Ptolemy effigies, but without the
capability of creating a new blank effigy.
|
CompositeEntity.ContainedObjectsIterator
identifier, uri
_levelCrossingLinks
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
PtolemyEffigy(CompositeEntity container,
java.lang.String name)
Create a new effigy in the given container with the given name.
|
PtolemyEffigy(Workspace workspace)
Create a new effigy in the specified workspace with an empty string
for its name.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_checkContainer(CompositeEntity container)
Check that the specified container is of a suitable class for
this entity, i.e., ModelDirectory or PtolemyEffigy.
|
void |
changeExecuted(ChangeRequest change)
React to the fact that a change has been successfully executed.
|
void |
changeFailed(ChangeRequest change,
java.lang.Exception exception)
React to the fact that a change has triggered an error by
reporting the error in a top-level dialog.
|
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace.
|
NamedObj |
getModel()
Return the ptolemy model that this is an effigy of.
|
Effigy |
masterEffigy()
Return the effigy that is "in charge" of this effigy.
|
void |
setModel(NamedObj model)
Set the ptolemy model that this is an effigy of.
|
void |
writeFile(java.io.File file)
Write the model associated with this effigy
to the specified file in MoML format.
|
_removeEntity, attributeChanged, closeTableaux, findToplevelEffigy, getTableauFactory, getWritableFile, isModifiable, isModified, isSystemEffigy, numberOfOpenTableaux, setContainer, setModifiable, setModified, setSystemEffigy, setTableauFactory, showTableaux, topEffigy
_addEntity, _addRelation, _adjustDeferrals, _containedDecorators, _deepOpaqueEntityList, _description, _exportMoMLContents, _finishedAddEntity, _removeRelation, _validateSettables, allAtomicEntityList, allowLevelCrossingConnect, classDefinitionList, connect, connect, containedObjectsIterator, deepCompositeEntityList, deepEntityList, deepGetEntities, deepNamedObjList, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportLinks, exportMoML, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, isOpaque, lazyAllAtomicEntityList, lazyAllCompositeEntityList, lazyAllCompositeTransparentAndOpaqueEntityList, lazyClassDefinitionList, lazyDeepEntityList, lazyEntityList, lazyRelationList, newRelation, numberOfEntities, numberOfRelations, numEntities, numRelations, relationList, removeAllEntities, removeAllRelations, setClassDefinition, statistics, uniqueName
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, newPort, propagateExistence, setName
_addPort, _removePort, connectedPortList, connectedPorts, connectionsChanged, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDerivedLevel, getDerivedList, propagateValue
description, getDisplayName, getFullName, getName, getName
public PtolemyEffigy(Workspace workspace)
workspace
- The workspace for this effigy.public PtolemyEffigy(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container that contains this effigy.name
- The name of this effigy.IllegalActionException
- If the entity cannot be contained
by the proposed container.NameDuplicationException
- If the name coincides with
an entity already in the container.public void changeExecuted(ChangeRequest change)
changeExecuted
in interface ChangeListener
change
- The change that has been executed.public void changeFailed(ChangeRequest change, java.lang.Exception exception)
changeFailed
in interface ChangeListener
change
- The change that was attempted.exception
- The exception that resulted.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class CompositeEntity
workspace
- The workspace for the new effigy.java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public NamedObj getModel()
setModel(NamedObj)
public Effigy masterEffigy()
masterEffigy
in class Effigy
Effigy.topEffigy()
public void setModel(NamedObj model)
model
- The model.getModel()
public void writeFile(java.io.File file) throws java.io.IOException
protected void _checkContainer(CompositeEntity container) throws IllegalActionException
_checkContainer
in class Effigy
container
- The proposed container.IllegalActionException
- If the container is not of
an acceptable class.