Package ptolemy.domains.petrinet.lib.gui
Class PetriNetDisplay
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.InstantiableNamedObj
-
- ptolemy.kernel.Entity<T>
-
- ptolemy.kernel.ComponentEntity<T>
-
- ptolemy.actor.AtomicActor<TypedIOPort>
-
- ptolemy.actor.TypedAtomicActor
-
- ptolemy.actor.lib.gui.Display
-
- ptolemy.domains.petrinet.lib.gui.PetriNetDisplay
-
- All Implemented Interfaces:
java.lang.Cloneable
,Actor
,Executable
,FiringsRecordable
,Initializable
,PortablePlaceable
,TypedActor
,PetriNetDisplayer
,Changeable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class PetriNetDisplay extends Display implements PetriNetDisplayer
Display the evolution of a Petri net after execution.Place this actor on a canvas along with a Petri Net (containing Places and Transitions) and the actor will display the evolution of the Net after execution. Specifically, the token count of each place will be printed for each iteration.
It should be noted that there are alignment issues within the display on certain operating systems where the font used is not monospaced.
- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Zach Ezzell
- Pt.AcceptedRating:
- Red (reviewmoderator)
- Pt.ProposedRating:
- Red (yukewang)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.actor.lib.gui.Display
_initialized, _isSuppressBlankLines, columnsDisplayed, input, rowsDisplayed, suppressBlankLines, title
-
Fields inherited from class ptolemy.actor.TypedAtomicActor
_typesValid
-
Fields inherited from class ptolemy.actor.AtomicActor
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _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
Constructors Constructor Description PetriNetDisplay(CompositeEntity container, java.lang.String name)
Construct a new PetriNetDisplay.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
openDisplay()
Ensure that the text is placed in the textArea.void
setText(java.lang.String text)
Set the text for the display.-
Methods inherited from class ptolemy.actor.lib.gui.Display
_customTypeConstraints, _getImplementation, _getInputString, _openWindow, attributeChanged, cleanUp, clone, initialize, place, postfire, setContainer, setDisplayName, setName
-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, fire, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, 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
_addPort, _description, _exportMoMLContents, _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, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, 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, 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.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.actor.Executable
fire, isFireFunctional, isStrict, 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
-
-
-
-
Constructor Detail
-
PetriNetDisplay
public PetriNetDisplay(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct a new PetriNetDisplay.- Parameters:
container
- The CompositeEntity.name
- The name of the PetriNetDisplay.- Throws:
IllegalActionException
- If the name has a period in it.NameDuplicationException
- If the container already contains an entity with the specified name.
-
-
Method Detail
-
openDisplay
public void openDisplay() throws IllegalActionException
Ensure that the text is placed in the textArea.- Specified by:
openDisplay
in interfacePetriNetDisplayer
- Throws:
IllegalActionException
- If _openWindow() in the base class throws it.
-
setText
public void setText(java.lang.String text)
Set the text for the display. This method is called by the PetriNetDirector.- Specified by:
setText
in interfacePetriNetDisplayer
- Parameters:
text
- The text to be shown in the display.
-
-