|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.kernel.util.AbstractSettableAttribute
ptolemy.data.expr.Variable
ptolemy.data.expr.Parameter
ptolemy.actor.parameters.IntRangeParameter
This is a parameter with type integer with a limited range. Its value is an integer token that is constrained to lie within the boundaries specified by its two parameters, min and max. These specify the minimum and maximum values. A user interface will typically use this information to represent the parameter value using a slider. The default values for min and max are 0 and 100, respectively, and the default value for this parameter is 50.
| Red (cxh) |
| Yellow (eal) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.data.expr.Variable |
ptolemy.data.expr.Variable.VariableScope |
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
ptolemy.kernel.util.NamedObj.ContainedObjectsIterator |
| Nested classes inherited from class ptolemy.kernel.util.Settable |
ptolemy.kernel.util.Settable.Visibility |
| Field Summary | |
ptolemy.data.expr.Parameter |
max
The maximum value. |
ptolemy.data.expr.Parameter |
min
The minimum value. |
| Fields inherited from class ptolemy.data.expr.Variable |
_currentExpression, _needsEvaluation, _parserScope, _parseTreeValid, _valueListeners |
| 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.kernel.util.Settable |
EXPERT, FULL, NONE, NOT_EDITABLE |
| Constructor Summary | |
IntRangeParameter(ptolemy.kernel.util.NamedObj container,
java.lang.String name)
Construct an attribute with the given name contained by the specified container. |
|
| Method Summary | |
protected void |
_setTokenAndNotify(ptolemy.data.Token newToken)
|
void |
attributeChanged(ptolemy.kernel.util.Attribute attribute)
React to a change in an attribute by ensuring that the current value remains within the range given by min and max. |
int |
getCurrentValue()
Return the current value of this parameter as an integer. |
int |
getMaxValue()
Return the maximum value of this parameter as an integer. |
int |
getMinValue()
Return the minimum value of this parameter. |
| Methods inherited from class ptolemy.data.expr.Parameter |
addChoice, exportMoML, getChoices, removeAllChoices, removeChoice |
| Methods inherited from class ptolemy.data.expr.Variable |
_description, _evaluate, _notifyValueListeners, _parseIfNecessary, _propagate, _propagateToValueListeners, _propagateValue, _setToken, addValueListener, clone, getDeclaredType, getExpression, getFreeIdentifiers, getScope, getToken, getType, getTypeTerm, getVisibility, invalidate, isKnown, isLazy, isStringMode, isTypeAcceptable, removeValueListener, reset, setContainer, setExpression, setLazy, setParseTreeEvaluator, setStringMode, setToken, setToken, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, setUnknown, setVisibility, stringRepresentation, toString, typeConstraintList, validate, valueChanged |
| Methods inherited from class ptolemy.kernel.util.AbstractSettableAttribute |
getDefaultExpression |
| Methods inherited from class ptolemy.kernel.util.Attribute |
_getContainedObject, _propagateExistence, getContainer, setName |
| Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, uniqueName, validateSettables, workspace |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
description, getContainer, getFullName, getName, getName, setName |
| Field Detail |
public ptolemy.data.expr.Parameter max
public ptolemy.data.expr.Parameter min
| Constructor Detail |
public IntRangeParameter(ptolemy.kernel.util.NamedObj container,
java.lang.String name)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
container - The container.name - The name of this attribute.
ptolemy.kernel.util.IllegalActionException - If the attribute is not of an
acceptable class for the container, or if the name contains a period.
ptolemy.kernel.util.NameDuplicationException - If the name coincides with
an attribute already in the container.| Method Detail |
public void attributeChanged(ptolemy.kernel.util.Attribute attribute)
throws ptolemy.kernel.util.IllegalActionException
attribute - The attribute that changed.
ptolemy.kernel.util.IllegalActionException - If the change is not acceptable
to this container (should not be thrown).
public int getCurrentValue()
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If the expression cannot
be parsed or cannot be evaluated, or if the result of evaluation
violates type constraints, or if the result of evaluation is null
and there are variables that depend on this one.
public int getMaxValue()
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If the expression cannot
be parsed or cannot be evaluated, or if the result of evaluation
violates type constraints, or if the result of evaluation is null
and there are variables that depend on this one.
public int getMinValue()
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If the expression cannot
be parsed or cannot be evaluated, or if the result of evaluation
violates type constraints, or if the result of evaluation is null
and there are variables that depend on this one.
protected void _setTokenAndNotify(ptolemy.data.Token newToken)
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||