|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
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
public class 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.PlotWindowTableau
Tableau that creates a PlotterPlotFrame. |
Nested classes/interfaces inherited from class ptolemy.kernel.Entity |
---|
Entity.ContainedObjectsIterator |
Field Summary | |
---|---|
protected java.net.URL |
_base
The base specified in configure(). |
private java.util.List<java.net.URL> |
_configureBases
|
private java.lang.String |
_configureSource
|
private java.util.List<java.lang.String> |
_configureSources
|
private java.util.List<java.lang.String> |
_configureTexts
|
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 PlotterBase.PlotWindowTableau |
_tableau
The version of PlotWindowTableau that creates a Plot window. |
protected java.lang.String |
_text
The text specified in configure(). |
protected WindowPropertiesAttribute |
_windowProperties
A specification for the window properties of the frame. |
Parameter |
automaticRescale
If true, the plot will automatically rescale if necessary. |
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 |
---|
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _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 | |
---|---|
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. |
private void |
_remove()
Remove the plot from the current container, if there is one. |
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 |
setDisplayName(java.lang.String name)
Set a name to present to the user. |
void |
setName(java.lang.String name)
Set or change the name. |
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, _fireAt, _fireAt, attributeTypeChanged, clone, newPort, typeConstraintList, typeConstraints |
Methods inherited from class ptolemy.actor.AtomicActor |
---|
_actorFiring, _actorFiring, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, fire, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, 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.InstantiableNamedObj |
---|
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition |
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.actor.Executable |
---|
fire, isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate |
Methods inherited from interface ptolemy.actor.Initializable |
---|
addInitializable, initialize, removeInitializable |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getContainer, getDisplayName, getFullName, getName, getName |
Methods inherited from interface ptolemy.kernel.util.Derivable |
---|
getDerivedLevel, getDerivedList, propagateValue |
Field Detail |
---|
public Parameter automaticRescale
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 PlotterBase.PlotWindowTableau _tableau
protected java.lang.String _text
protected WindowPropertiesAttribute _windowProperties
private java.util.List<java.net.URL> _configureBases
private java.util.List<java.lang.String> _configureSources
private java.util.List<java.lang.String> _configureTexts
private java.lang.String _configureSource
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 NamedObj
attribute
- The attribute that changed.
IllegalActionException
- If the superclass throws it.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class AtomicActor
workspace
- The workspace for the new object.
java.lang.CloneNotSupportedException
- If a derived class has an
attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void configure(java.net.URL base, java.lang.String source, java.lang.String text) throws java.lang.Exception
configure
in interface Configurable
base
- 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 Configurable
public java.lang.String getConfigureText()
getConfigureText
in interface Configurable
public 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 Placeable
container
- 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 Initializable
preinitialize
in class AtomicActor
IllegalActionException
- If the parent class throws it.AtomicActor.initialize()
public void setContainer(CompositeEntity container) throws IllegalActionException, NameDuplicationException
setContainer
in class AtomicActor
container
- The proposed container.
IllegalActionException
- If the base class throws it.
NameDuplicationException
- If the base class throws it.ComponentEntity.getContainer()
public void setDisplayName(java.lang.String name)
If the Plot window has been rendered, then the title of the Plot window will be updated to the value of the name parameter.
setDisplayName
in class NamedObj
name
- A name to present to the user.NamedObj.getDisplayName()
public void setName(java.lang.String name) throws IllegalActionException, NameDuplicationException
If the Plot window has been rendered, then the title of the Plot window will be updated to the value of the name parameter.
setName
in interface Nameable
setName
in class ComponentEntity
name
- The new name.
IllegalActionException
- If the name contains a period
or if the object is a derived object and the name argument does
not match the current name.
NameDuplicationException
- Not thrown in this base class.
May be thrown by derived classes if the container already contains
an object with this name.NamedObj.getName()
,
NamedObj.getName(NamedObj)
public void wrapup() throws IllegalActionException
wrapup
in interface Initializable
wrapup
in class AtomicActor
IllegalActionException
- If the superclass throws it.protected void _exportMoMLContents(java.io.Writer output, int depth) throws java.io.IOException
_exportMoMLContents
in class Entity
output
- The output stream to write to.depth
- The depth in the hierarchy, to determine indenting.
java.io.IOException
- If an I/O error occurs.NamedObj.exportMoML(Writer, int)
protected void _implementDeferredConfigurations()
protected PlotBox _newPlot()
protected void _propagateValue(NamedObj destination) throws IllegalActionException
_propagateValue
in class NamedObj
destination
- Object to which to propagate the
value.
IllegalActionException
- If the value cannot
be propagated.private void _remove()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |