ptolemy.actor.lib.gui
Class Plotter
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.actor.lib.gui.PlotterBase
ptolemy.actor.lib.gui.Plotter
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Actor, Executable, FiringsRecordable, Placeable, Initializable, TypedActor, Changeable, Configurable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
- Direct Known Subclasses:
- ArrayPlotter, ArrayPlotterXY, RealTimePlotter, SequencePlotter, TimedPlotter, XYPlotter
public class Plotter
- extends PlotterBase
Base class for plotters. This class contains an instance of the
Plot class from the Ptolemy plot package as a public member.
It provides a parameter that determines whether to fill the plot
when wrapup is invoked. It also has a legend parameter,
which gives a comma-separated list of labels to attach to
each dataset. Normally, the number of elements in this list
should equal the number of input channels, although this
is not enforced.
This actor also provides a parameter
startingDataset, which specifies the starting point
for the number of the dataset to use to create the plots.
This defaults to zero, but will typically be set to a positive
number when more than one instance of a plotter actor shares
the same plot object.
- Since:
- Ptolemy II 1.0
- Version:
- $Id: Plotter.java 57046 2010-01-27 23:35:53Z cxh $
- Author:
- Edward A. Lee
- See Also:
Plot
,
Serialized Form
- Accepted Rating:
- Proposed Rating:
Fields inherited from class ptolemy.actor.lib.gui.PlotterBase |
_base, _container, _frame, _plotSize, _source, _tableau, _text, _windowProperties, automaticRescale, fillOnWrapup, legend, plot |
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary |
Plotter(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name. |
Method Summary |
void |
attributeChanged(Attribute attribute)
If the attribute is startingDataset, then check its validity. |
void |
initialize()
If the plot has not already been created, create it. |
Methods inherited from class ptolemy.actor.lib.gui.PlotterBase |
_exportMoMLContents, _implementDeferredConfigurations, _newPlot, _propagateValue, clone, configure, getConfigureSource, getConfigureText, place, preinitialize, setContainer, setDisplayName, setName, wrapup |
Methods inherited from class ptolemy.actor.AtomicActor |
_actorFiring, _actorFiring, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, fire, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, stop, stopFire, terminate |
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, _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 |
startingDataset
public Parameter startingDataset
- The starting dataset number to which data is plotted.
This parameter has type IntToken, with default value 0.
Its value must be non-negative.
Plotter
public Plotter(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
- Construct an actor with the given container and name.
- Parameters:
container
- The container.name
- The name of this actor.
- Throws:
IllegalActionException
- If the actor cannot be contained
by the proposed container.
NameDuplicationException
- If the container already has an
actor with this name.
attributeChanged
public void attributeChanged(Attribute attribute)
throws IllegalActionException
- If the attribute is startingDataset, then check its validity.
- Overrides:
attributeChanged
in class PlotterBase
- Parameters:
attribute
- The attribute that changed.
- Throws:
IllegalActionException
- If the specified attribute
is startingDataset and its value is negative, or if the
superclass throws it.
initialize
public void initialize()
throws IllegalActionException
- If the plot has not already been created, create it.
If configurations specified by a call to configure() have not yet
been processed, process them. Clear the data sets that this
actor is responsible for (starting with the one indexed
by startingDataset, up to startingDataset +
width - 1, where width is the width of the
input port.
- Specified by:
initialize
in interface Initializable
- Overrides:
initialize
in class AtomicActor
- Throws:
IllegalActionException
- If the parent class throws it.