|
||||||||||
| 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.Source
ptolemy.actor.lib.gui.SliderSource
The output of this actor is controlled by a slider in the run window. The range of the output is specified by two parameters, minimum and maximum. The type of these parameters and the output is integer.
| Red (liuxj) |
| Red (liuxj) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.Entity |
ptolemy.kernel.Entity.ContainedObjectsIterator |
| Field Summary | |
protected javax.swing.JPanel |
_panel
|
ptolemy.data.expr.Parameter |
maximum
The maximum value of the slider. |
ptolemy.data.expr.Parameter |
minimum
The minimum value of the slider. |
javax.swing.JSlider |
slider
The slider that controls the output of this actor. |
ptolemy.kernel.util.StringAttribute |
title
The title to put on top. |
| Fields inherited from class ptolemy.actor.lib.Source |
output, trigger |
| 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 | |
SliderSource(ptolemy.kernel.CompositeEntity container,
java.lang.String name)
Construct an actor with an input multiport of type GENERAL. |
|
| Method Summary | |
void |
attributeChanged(ptolemy.kernel.util.Attribute attribute)
If the specified attribute is minimum or maximum, then set the range of the slider. |
java.lang.Object |
clone(ptolemy.kernel.util.Workspace workspace)
Clone the actor into the specified workspace. |
void |
fire()
Output the value of the slider recorded when prefire() is last called. |
java.awt.Color |
getBackground()
Return the background. |
void |
initialize()
Create a slider on the screen, if necessary. |
void |
place(java.awt.Container container)
Specify the container in which the slider should be displayed. |
boolean |
prefire()
Record the current value of the slider. |
void |
setBackground(java.awt.Color background)
Set the background color. |
void |
setContainer(ptolemy.kernel.CompositeEntity container)
Override the base class to remove the display from its graphical container if the argument is null. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
The value of the slider changed, record the new value. |
| Methods inherited from class ptolemy.actor.TypedAtomicActor |
_addPort, attributeTypeChanged, clone, newPort, typeConstraintList |
| Methods inherited from class ptolemy.actor.AtomicActor |
_createReceivers, connectionsChanged, getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, iterate, newReceiver, outputPortList, postfire, preinitialize, pruneDependencies, removeDependency, stop, stopFire, terminate, wrapup |
| 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, _exportMoMLContents, _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 ptolemy.kernel.util.NamedObj |
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeList, attributeList, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, toString, workspace |
| 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 |
iterate, postfire, preinitialize, stop, stopFire, terminate, wrapup |
| 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 ptolemy.data.expr.Parameter minimum
public ptolemy.data.expr.Parameter maximum
public javax.swing.JSlider slider
public ptolemy.kernel.util.StringAttribute title
protected javax.swing.JPanel _panel
| Constructor Detail |
public SliderSource(ptolemy.kernel.CompositeEntity container,
java.lang.String name)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
container - The container.name - The name of this actor.
ptolemy.kernel.util.IllegalActionException - If the actor cannot be contained
by the proposed container.
ptolemy.kernel.util.NameDuplicationException - If the container already has an
entity with this name.| Method Detail |
public void attributeChanged(ptolemy.kernel.util.Attribute attribute)
throws ptolemy.kernel.util.IllegalActionException
attribute - The attribute that has changed.
ptolemy.kernel.util.IllegalActionException - If the specified range for the
slider is invalid.
public java.lang.Object clone(ptolemy.kernel.util.Workspace workspace)
throws java.lang.CloneNotSupportedException
workspace - The workspace for the new object.
java.lang.CloneNotSupportedException - If a derived class contains
an attribute that cannot be cloned.public java.awt.Color getBackground()
public void fire()
throws ptolemy.kernel.util.IllegalActionException
fire in interface ptolemy.actor.Executablefire in class Sourceptolemy.kernel.util.IllegalActionException - Not thrown in this base class.
public void initialize()
throws ptolemy.kernel.util.IllegalActionException
initialize in interface ptolemy.actor.Executableptolemy.kernel.util.IllegalActionException - If the parent class throws it.public void place(java.awt.Container container)
place in interface ptolemy.actor.gui.Placeablecontainer - The container into which to place the slider.
public boolean prefire()
throws ptolemy.kernel.util.IllegalActionException
prefire in interface ptolemy.actor.Executableptolemy.kernel.util.IllegalActionExceptionpublic void setBackground(java.awt.Color background)
public void setContainer(ptolemy.kernel.CompositeEntity container)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
container - The proposed container.
ptolemy.kernel.util.IllegalActionException - If the base class throws it.
ptolemy.kernel.util.NameDuplicationException - If the base class throws it.public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged in interface javax.swing.event.ChangeListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||