FileDocCategorySizeDatePackage
FloatControl.javaAPI DocAndroid 1.5 API4277Wed May 06 22:41:02 BST 2009javax.sound.sampled

FloatControl

public abstract class FloatControl extends Control

Fields Summary
private float
value
private float
maximum
private float
minimum
private String
units
private String
minLabel
private String
midLabel
private String
maxLabel
private float
precision
private int
updatePeriod
Constructors Summary
protected FloatControl(Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units, String minLabel, String midLabel, String maxLabel)

        super(type);
        this.maximum = maximum;
        this.maxLabel = maxLabel;
        this.midLabel = midLabel;
        this.minLabel = minLabel;
        this.minimum = minimum;
        this.precision = precision;
        this.units = units;
        this.updatePeriod = updatePeriod;
        this.value = initialValue;
    
protected FloatControl(Type type, float minimum, float maximum, float precision, int updatePeriod, float initialValue, String units)

        this(type, minimum, maximum, precision, updatePeriod, initialValue,
                units, "", "", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    
Methods Summary
public java.lang.StringgetMaxLabel()

        return this.maxLabel;
    
public floatgetMaximum()

        return this.maximum;
    
public java.lang.StringgetMidLabel()

        return this.midLabel;
    
public java.lang.StringgetMinLabel()

        return this.minLabel;
    
public floatgetMinimum()

        return this.minimum;
    
public floatgetPrecision()

        return this.precision;
    
public java.lang.StringgetUnits()

        return this.units;
    
public intgetUpdatePeriod()

        return this.updatePeriod;
    
public floatgetValue()

        return this.value;
    
public voidsetValue(float newValue)

        if (newValue > maximum || newValue < minimum) {
            // sound.0F=value does not fall within the allowable range
            throw new IllegalArgumentException(Messages.getString("sound.0F")); //$NON-NLS-1$
        }
        this.value = newValue;
    
public voidshift(float from, float to, int microseconds)

        setValue(to);
    
public java.lang.StringtoString()

        return getType() + " with current value: "+ value + " " + units  //$NON-NLS-1$ //$NON-NLS-2$
            + " (range: " + minimum + " - " + maximum + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$