FileDocCategorySizeDatePackage
NumericControlAdapter.javaAPI DocJMF 2.1.1e2539Mon May 12 12:20:56 BST 2003com.sun.media.controls

NumericControlAdapter

public class NumericControlAdapter extends AtomicControlAdapter implements NumericControl
A control that represents the state by a numeric value. The value can be any number represented as a float as long as it falls within the range and has the specified granularity/accuracy. For example, if the lower limit is 0 and the upper limit is 255 and the granularity is 1, then it can be assigned any integer value from 0 to 255.

Fields Summary
protected float
lowerLimit
protected float
upperLimit
protected float
defaultValue
protected float
granularity
protected boolean
logarithmic
Constructors Summary
public NumericControlAdapter()

	super(null, true, null);
	lowerLimit = 0f;
	upperLimit = 1.0f;
	defaultValue = 0.5f;
	granularity = 0.001f;
	logarithmic = false;
    
public NumericControlAdapter(float ll, float ul, float dv, float gran, boolean log, Component comp, boolean def, Control parent)


	super(comp, def, parent);
	lowerLimit = ll;
	upperLimit = ul;
	defaultValue = dv;
	granularity = gran;
	logarithmic = log;
    
Methods Summary
public floatgetDefaultValue()
Returns the value that is the default for this control.

	return defaultValue;
    
public floatgetGranularity()
Returns the granularity of the numeric value.

	return granularity;
    
public floatgetLogarithmicBase()
???

	return (float) 0;
    
public floatgetLowerLimit()
The smallest value assignable to this control.

	return lowerLimit;
    
public floatgetUpperLimit()
The largest value assignable to this control.

	return upperLimit;
    
public floatgetValue()
Returns the value that the control currently represents.

	return (float) 0.0;
    
public booleanisLogarithmic()
???

	return logarithmic;
    
public floatsetDefaultValue(float value)
Sets the default value for the control.

	return (defaultValue = value);
    
public floatsetValue(float value)
Sets the value on the control and returns the value that was actually set.

	return value;