|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.actor.gui.AbstractPlaceableActor
ptolemy.vergil.actor.lib.ModelDisplay
public class ModelDisplay
This actor opens a window to display the specified model. If inputs are provided, they are expected to be MoML strings that are to be applied to the model. This can be used, for example, to create animations.
Red (cxh) |
Yellow (eal) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.Entity |
---|
Entity.ContainedObjectsIterator |
Field Summary | |
---|---|
private PtolemyEffigy |
_effigy
The effigy representing the model. |
private NamedObj |
_entity
The top-level entity read from the file or URL. |
private JGraph |
_graph
The graph display pane. |
private Tableau |
_tableau
The tableau, if the model is displayed in its own window. |
TypedIOPort |
input
The input port through which to provide MoML to modify the model. |
FileParameter |
modelURL
The file or URL from which to read the starting point model. |
Fields inherited from class ptolemy.actor.gui.AbstractPlaceableActor |
---|
_frame, _paneSize, _windowProperties |
Fields inherited from class ptolemy.actor.AtomicActor |
---|
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Fields inherited from interface ptolemy.actor.Executable |
---|
COMPLETED, NOT_READY, STOP_ITERATING |
Constructor Summary | |
---|---|
ModelDisplay(CompositeEntity container,
java.lang.String name)
Construct an actor with the specified container and name. |
Method Summary | |
---|---|
private static NamedObj |
_createBlankEntity()
Create a blank entity associated with this display. |
void |
attributeChanged(Attribute attribute)
React to a change in an attribute. |
void |
changeExecuted(ChangeRequest change)
Do nothing. |
void |
changeFailed(ChangeRequest change,
java.lang.Exception exception)
Stop executing the model. |
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace. |
void |
fire()
Read the input, if there is any, and issue a change request to apply the MoML in the input to the displayed model. |
void |
initialize()
If the model is not yet displayed, then display it in its own window. |
void |
place(java.awt.Container container)
Place the display in the specified container. |
Methods inherited from class ptolemy.actor.gui.AbstractPlaceableActor |
---|
_exportMoMLContents, setFrame |
Methods inherited from class ptolemy.actor.TypedAtomicActor |
---|
_addPort, _fireAt, _fireAt, attributeTypeChanged, clone, newPort, typeConstraintList, typeConstraints |
Methods inherited from class ptolemy.kernel.ComponentEntity |
---|
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
---|
_description, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName |
Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
---|
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ptolemy.actor.Actor |
---|
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList |
Methods inherited from interface ptolemy.actor.Executable |
---|
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate |
Methods inherited from interface ptolemy.actor.Initializable |
---|
addInitializable, preinitialize, removeInitializable, wrapup |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getContainer, getDisplayName, getFullName, getName, getName, setName |
Methods inherited from interface ptolemy.kernel.util.Derivable |
---|
getDerivedLevel, getDerivedList, propagateValue |
Field Detail |
---|
public FileParameter modelURL
public TypedIOPort input
private PtolemyEffigy _effigy
private NamedObj _entity
private JGraph _graph
private Tableau _tableau
Constructor Detail |
---|
public ModelDisplay(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this actor.
IllegalActionException
- If the entity cannot be contained
by the proposed container.
NameDuplicationException
- If the container already has an
actor with this name.Method Detail |
---|
public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class NamedObj
attribute
- The attribute that changed.
IllegalActionException
- If the change is not acceptable
to this container (not thrown in this base class).public void changeExecuted(ChangeRequest change)
changeExecuted
in interface ChangeListener
change
- The change that succeeded.public void changeFailed(ChangeRequest change, java.lang.Exception exception)
changeFailed
in interface ChangeListener
change
- The change.exception
- The exception.public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class AtomicActor
IllegalActionException
- If there is an error reading
the input.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class AtomicActor
workspace
- The workspace for the new object.
java.lang.CloneNotSupportedException
- If a derived class has an
attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AtomicActor
IllegalActionException
- If there is an constructing
the display.public void place(java.awt.Container container)
place
in interface Placeable
place
in class AbstractPlaceableActor
container
- The container, or null to remove it from any
existing container.private static NamedObj _createBlankEntity()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |