public class PetriNetDisplay extends Display implements PetriNetDisplayer
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.
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.String |
text
This string represents the evolution of the Petri Net and should
be set by the PetriNetDirector.
|
_initialized, _isSuppressBlankLines, columnsDisplayed, input, rowsDisplayed, suppressBlankLines, title
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
PetriNetDisplay(CompositeEntity container,
java.lang.String name)
Construct a new PetriNetDisplay.
|
Modifier and Type | Method and Description |
---|---|
void |
openDisplay()
Ensure that the text is placed in the textArea.
|
void |
setText(java.lang.String text)
Set the text for the display.
|
_customTypeConstraints, _getImplementation, _getInputString, _openWindow, attributeChanged, cleanUp, clone, initialize, place, postfire, setContainer, setDisplayName, setName
_containedTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_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
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
fire, isFireFunctional, isStrict, iterate, prefire, stop, stopFire, terminate
addInitializable, preinitialize, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName
getDerivedLevel, getDerivedList, propagateValue
java.lang.String text
public PetriNetDisplay(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The CompositeEntity.name
- The name of the PetriNetDisplay.IllegalActionException
- If the name has a period in it.NameDuplicationException
- If the container already contains an entity with
the specified name.public void openDisplay() throws IllegalActionException
openDisplay
in interface PetriNetDisplayer
IllegalActionException
- If _openWindow() in the base
class throws it.public void setText(java.lang.String text)
setText
in interface PetriNetDisplayer
text
- The text to be shown in the display.