ptolemy.vergil.actor.lib
Class MonitorReceiverContents
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.kernel.util.SingletonAttribute
ptolemy.vergil.actor.lib.MonitorReceiverContents
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable, Singleton
public class MonitorReceiverContents
- extends SingletonAttribute
This parameter, when inserted into a model or an opaque composite actor,
causes all input ports to acquire an attribute that makes them display
their contents on the screen. This works by piggybacking on the
initialize() method of the container to insert the relevant parameters
into the ports. It also piggybacks on postfire() and wrapup() to issue
a ChangeRequest, which causes a repaint of the screen in Vergil.
To stop monitoring the queue contents, simply delete
this attribute from the model.
- Since:
- Ptolemy II 8.0
- Version:
- $Id: MonitorReceiverContents.java 57046 2010-01-27 23:35:53Z cxh $
- Author:
- Edward A. Lee, Contributor: Bert Rodiers
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Methods inherited from class ptolemy.kernel.util.Attribute |
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, 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 |
_executable
private Executable _executable
- The executable that creates the monitor attributes in initialize().
_piggybackContainer
private CompositeActor _piggybackContainer
- The last container on which we piggybacked.
MonitorReceiverContents
public MonitorReceiverContents(NamedObj container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
- Construct an actor with the specified container and name.
- Parameters:
container
- The container.name
- The name of this actor.
- Throws:
IllegalActionException
- If the entity cannot be contained
by the proposed container.
NameDuplicationException
- If the container already has an
actor with this name.
setContainer
public void setContainer(NamedObj container)
throws IllegalActionException,
NameDuplicationException
- Specify the container. If the container is not the same as the
previous container, then stop monitoring queue contents in the
previous container, and start monitoring them in the new one.
- Overrides:
setContainer
in class SingletonAttribute
- Parameters:
container
- The container to attach this attribute to..
- Throws:
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.
NameDuplicationException
- If the container already has
an attribute with the name of this attribute.- See Also:
Attribute.getContainer()