ptolemy.domains.sr.lib.gui
Class NonStrictDisplay
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.actor.gui.AbstractPlaceableActor
ptolemy.actor.lib.gui.Display
ptolemy.domains.sr.lib.gui.NonStrictDisplay
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Actor, Executable, FiringsRecordable, Placeable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
public class NonStrictDisplay
- extends Display
Display the status and value of input tokens in a text area.
Display the values of the tokens arriving on the input channels along
with the associated time in a text area on the screen. If the value is
undefined or known to be absent, that information is indicated instead.
Each input token is written on a separate line. The input type can be
of any type. If the input happens to be a StringToken,
then the surrounding quotation marks are stripped before printing
the value of the token. Thus, string-valued tokens can be used to
generate arbitrary textual output, at one token per line.
Tokens are read from the input only in
the postfire() method, to allow them to settle in domains where they
converge to a fixed point.
- Since:
- Ptolemy II 8.0
- Version:
- $Id: NonStrictDisplay.java 57044 2010-01-27 22:41:05Z cxh $
- Author:
- Paul Whitaker, Yuhong Xiong, Edward A. Lee
- 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 |
Method Summary |
boolean |
isStrict()
Return false. |
boolean |
postfire()
Read at most one token from each input channel and display its
string value along with the current time on the screen. |
Methods inherited from class ptolemy.actor.AtomicActor |
_actorFiring, _actorFiring, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, fire, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, iterate, newReceiver, outputPortList, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, stop, stopFire, terminate, wrapup |
Methods inherited from class ptolemy.kernel.ComponentEntity |
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence |
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.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeList, attributeList, 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, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ABSENT_STRING
private static final java.lang.String ABSENT_STRING
- See Also:
- Constant Field Values
UNDEFINED_STRING
private static final java.lang.String UNDEFINED_STRING
- See Also:
- Constant Field Values
NonStrictDisplay
public NonStrictDisplay(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
- Construct an actor with an input multiport of type GENERAL.
- 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.
isStrict
public boolean isStrict()
- Return false. This actor displays "undefined" when the input
receiver has status unknown.
- Specified by:
isStrict
in interface Executable
- Overrides:
isStrict
in class AtomicActor
- Returns:
- False.
postfire
public boolean postfire()
throws IllegalActionException
- Read at most one token from each input channel and display its
string value along with the current time on the screen. Each
value is terminated with a newline character.
- Specified by:
postfire
in interface Executable
- Overrides:
postfire
in class Display
- Returns:
- True if execution can continue into the next iteration.
- Throws:
IllegalActionException
- If there is no director.