public class CAViewer extends AbstractPlaceableActor
The CAViewer is a display actor to be used in conjunction with the CADirector. The CAViewer can be placed on the canvas and will render the grid as defined by the Director's parameters and possibly the output of the CA2DConvolution actor. This actor is the currently the only way to visualize cellular automata or other 2D grid based phenomena employing the CADirectory.
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected boolean |
_initialized
True if the actor has been initialized.
|
protected double[][] |
matrix
The matrix to be rendered as a grid.
|
_frame, _paneSize, _windowClosingAdapter, _windowProperties
_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 |
---|
CAViewer(CompositeEntity entity,
java.lang.String name)
Construct a new CAViewer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_openWindow()
Open the window, first initializing it if necessary.
|
void |
initialize()
Initialize the viewer.
|
void |
place(java.awt.Container container)
Specify the container in which the data should be displayed.
|
boolean |
postfire()
Show the tableau containing the visualization of the matrix.
|
void |
setMatrix(double[][] matrix)
Set the matrix to be rendered as a grid.
|
_exportMoMLContents, cleanUp, clone, setFrame
_containedTypeConstraints, _customTypeConstraints, _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, setContainer, stop, stopFire, terminate, wrapup
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _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, attributeChanged, 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, setDisplayName, 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, setName
getDerivedLevel, getDerivedList, propagateValue
protected boolean _initialized
protected double[][] matrix
public CAViewer(CompositeEntity entity, java.lang.String name) throws IllegalActionException, NameDuplicationException
entity
- The containername
- The name of the CAViewer.IllegalActionException
- If the name has a period in it.NameDuplicationException
- If the container already
contains an entity with the specified name.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AtomicActor<TypedIOPort>
IllegalActionException
- If the superclass throws
the exception.public void place(java.awt.Container container)
place
in interface Placeable
place
in class AbstractPlaceableActor
container
- The container in which to place the pane that
will contain the CATableau or null to specify no container.public boolean postfire() throws IllegalActionException
postfire
in interface Executable
postfire
in class AtomicActor<TypedIOPort>
IllegalActionException
- If the base class throws an
exception.public void setMatrix(double[][] matrix)
matrix
- The matrix to be rendered.protected void _openWindow() throws IllegalActionException
IllegalActionException
- If the top level effigy
cannot be found or the token effigy cannot be created.