|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.actor.lib.gui.PlotterBase
Base class for plotters. This class contains an instance of the PlotBox class from the Ptolemy plot package as a public member, although which subclass of PlotBox is created is left to derived classes. 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.
PlotBox,
Serialized Form
| Green (cxh) |
| Green (eal) |
| Nested Class Summary | |
protected class |
PlotterBase.PlotterPlotFrame
Version of Plot class that removes its association with the plot upon closing, and also records the size of the plot window. |
protected class |
PlotterBase.PlotWindowTableau
Tableau that creates a PlotterPlotFrame. |
| Nested classes inherited from class ptolemy.kernel.Entity |
Entity.ContainedObjectsIterator |
| Field Summary | |
protected java.net.URL |
_base
The base specified in configure(). |
protected java.awt.Container |
_container
Container into which this plot should be placed |
protected PlotTableauFrame |
_frame
Frame into which plot is placed, if any. |
protected SizeAttribute |
_plotSize
A specification of the size of the plot if it's in its own window. |
protected java.lang.String |
_source
The source specified in configure(). |
protected java.lang.String |
_text
The text specified in configure(). |
protected WindowPropertiesAttribute |
_windowProperties
A specification for the window properties of the frame. |
Parameter |
fillOnWrapup
If true, fill the plot when wrapup is called. |
StringAttribute |
legend
A comma-separated list of labels to attach to each data set. |
PlotBox |
plot
The plot object. |
| Fields inherited from class ptolemy.actor.AtomicActor |
_stopRequested |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.actor.Executable |
COMPLETED, NOT_READY, STOP_ITERATING |
| Constructor Summary | |
PlotterBase(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name. |
|
| Method Summary | |
protected void |
_exportMoMLContents(java.io.Writer output,
int depth)
Write a MoML description of the contents of this object, which in this class is the configuration information. |
protected void |
_implementDeferredConfigurations()
If configurations have been deferred, implement them now. |
protected PlotBox |
_newPlot()
Create a new plot. |
protected void |
_propagateValue(NamedObj destination)
Propagate the value of this object to the specified object. |
void |
attributeChanged(Attribute attribute)
If the attribute is legend, then parse the string and set the legend. |
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace. |
void |
configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
Configure the object with data from the specified input source (a URL) and/or textual data, assumed to be in PlotML format. |
java.lang.String |
getConfigureSource()
Return the input source that was specified the last time the configure method was called. |
java.lang.String |
getConfigureText()
Return the text string that represents the current configuration of this object. |
void |
place(java.awt.Container container)
Specify the container into which this plot should be placed. |
void |
preinitialize()
Clear the plot, if there is one. |
void |
setContainer(CompositeEntity container)
Override the base class to remove the plot from its graphical container if the argument is null. |
void |
wrapup()
If the fillOnWrapup parameter is true, rescale the plot so that all the data is visible. |
| Methods inherited from class ptolemy.actor.TypedAtomicActor |
_addPort, attributeTypeChanged, clone, newPort, typeConstraintList |
| Methods inherited from class ptolemy.actor.AtomicActor |
_createReceivers, connectionsChanged, fire, getDirector, getExecutiveDirector, getFunctionDependency, getManager, initialize, inputPortList, iterate, newReceiver, outputPortList, postfire, prefire, pruneDependencies, removeDependency, stop, stopFire, terminate |
| Methods inherited from class ptolemy.kernel.ComponentEntity |
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, propagateExistence, setName |
| Methods inherited from class ptolemy.kernel.Entity |
_description, _removePort, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName, validateSettables |
| Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.actor.Actor |
getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, newReceiver, outputPortList |
| Methods inherited from interface ptolemy.actor.Executable |
fire, initialize, iterate, postfire, prefire, stop, stopFire, terminate |
| Methods inherited from interface ptolemy.kernel.util.Derivable |
getDerivedLevel, getDerivedList, propagateValue |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
description, getFullName, getName, getName |
| Field Detail |
public transient PlotBox plot
public Parameter fillOnWrapup
public StringAttribute legend
protected java.net.URL _base
protected java.awt.Container _container
protected transient PlotTableauFrame _frame
protected SizeAttribute _plotSize
protected java.lang.String _source
protected java.lang.String _text
protected WindowPropertiesAttribute _windowProperties
| Constructor Detail |
public PlotterBase(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
container - The container.name - The name of this actor.
IllegalActionException - If the actor cannot be contained
by the proposed container.
NameDuplicationException - If the container already has an
actor with this name.| Method Detail |
public void attributeChanged(Attribute attribute)
throws IllegalActionException
attributeChanged in class NamedObjattribute - The attribute that changed.
IllegalActionException - If the superclass throws it.
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
clone in class AtomicActorworkspace - The workspace for the new object.
java.lang.CloneNotSupportedException - If a derived class has an
attribute that cannot be cloned.
public void configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
throws java.lang.Exception
configure in interface Configurablebase - The base relative to which references within the input
are found, or null if this is not known, or there is none.source - The input source, which specifies a URL.text - Configuration information given as text.
java.lang.Exception - If the configuration source cannot be read
or if the configuration information is incorrect.public java.lang.String getConfigureSource()
getConfigureSource in interface Configurablepublic java.lang.String getConfigureText()
getConfigureText in interface Configurablepublic void place(java.awt.Container container)
If configure() has been called (prior to the plot getting created), then the configurations that it specified have been deferred. Those configurations are performed at this time.
place in interface Placeablecontainer - The container into which to place the plot, or
null to specify that a new plot should be created.
public void preinitialize()
throws IllegalActionException
preinitialize in interface Executablepreinitialize in class AtomicActorIllegalActionException - If the parent class throws it.AtomicActor.initialize()
public void setContainer(CompositeEntity container)
throws IllegalActionException,
NameDuplicationException
setContainer in class AtomicActorcontainer - The proposed container.
IllegalActionException - If the base class throws it.
NameDuplicationException - If the base class throws it.
public void wrapup()
throws IllegalActionException
wrapup in interface Executablewrapup in class AtomicActorIllegalActionException - If the superclass throws it.
protected void _exportMoMLContents(java.io.Writer output,
int depth)
throws java.io.IOException
_exportMoMLContents in class Entityoutput - The output stream to write to.depth - The depth in the hierarchy, to determine indenting.
java.io.IOException - If an I/O error occurs.protected void _implementDeferredConfigurations()
protected PlotBox _newPlot()
protected void _propagateValue(NamedObj destination)
throws IllegalActionException
_propagateValue in class NamedObjdestination - Object to which to propagate the
value.
IllegalActionException - If the value cannot
be propagated.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||