ptolemy.domains.sr.lib.gui
Class NonStrictDisplay

java.lang.Object
  extended by ptolemy.kernel.util.NamedObj
      extended by ptolemy.kernel.InstantiableNamedObj
          extended by ptolemy.kernel.Entity
              extended by ptolemy.kernel.ComponentEntity
                  extended by ptolemy.actor.AtomicActor
                      extended by ptolemy.actor.TypedAtomicActor
                          extended by ptolemy.actor.gui.AbstractPlaceableActor
                              extended by ptolemy.actor.lib.gui.Display
                                  extended by 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:
Red (pwhitake)
Proposed Rating:
Red (pwhitake)

Nested Class Summary
 
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
 
Field Summary
private static java.lang.String ABSENT_STRING
           
private static java.lang.String UNDEFINED_STRING
           
 
Fields inherited from class ptolemy.actor.lib.gui.Display
_initialized, _suppressBlankLines, columnsDisplayed, input, rowsDisplayed, suppressBlankLines, textArea, title
 
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
NonStrictDisplay(CompositeEntity container, java.lang.String name)
          Construct an actor with an input multiport of type GENERAL.
 
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.lib.gui.Display
_openWindow, attributeChanged, clone, getBackground, initialize, place, setBackground, setContainer, setDisplayName, setName
 
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.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.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
 
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
 
Methods inherited from interface ptolemy.actor.Actor
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
 
Methods inherited from interface ptolemy.actor.Executable
fire, isFireFunctional, iterate, 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
 
Methods inherited from interface ptolemy.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
 

Field Detail

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
Constructor Detail

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.
Method Detail

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.