javax.sound.sampled
Class FloatControl

java.lang.Object
  extended by javax.sound.sampled.Control
      extended by javax.sound.sampled.FloatControl

public abstract class FloatControl
extends Control

Since:
1.3

Nested Class Summary
static class FloatControl.Type
          An instance of this class describes a particular floating point control.
 
Constructor Summary
protected FloatControl(FloatControl.Type type, float min, float max, float prec, int update, float init, String units)
          Create a new FloatControl given its type and various parameters.
protected FloatControl(FloatControl.Type type, float min, float max, float prec, int update, float init, String units, String minLabel, String midLabel, String maxLabel)
          Create a new FloatControl given its type and various parameters.
 
Method Summary
 float getMaximum()
          Return the maximum value of this control.
 String getMaxLabel()
          Return the label for the minimum value of this control.
 String getMidLabel()
          Return the label for the midpoint of this control.
 float getMinimum()
          Return the minimum value of this control.
 String getMinLabel()
          Return the label for the minimum value of this control.
 float getPrecision()
          Return the precision of this control.
 String getUnits()
          Return the name of the units for this control.
 int getUpdatePeriod()
          Return the update period of this control.
 float getValue()
          Return the current value of this control.
 void setValue(float value)
          Set the new value of this control.
 void shift(float from, float to, int ms)
          This tells the control to start at the starting value and to shift its value incrementally to the final value over the given time interval, specified in microseconds.
 String toString()
          Return a string describing this control.
 
Methods inherited from class javax.sound.sampled.Control
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FloatControl

protected FloatControl(FloatControl.Type type,
                       float min,
                       float max,
                       float prec,
                       int update,
                       float init,
                       String units)
Create a new FloatControl given its type and various parameters. The minimum, maximum, and midpoint labels will all be the empty string.

Parameters:
type - the type
min - the minimum valuee
max - the maximum value
prec - the precision
update - the update period
init - the initial value
units - the description of the units

FloatControl

protected FloatControl(FloatControl.Type type,
                       float min,
                       float max,
                       float prec,
                       int update,
                       float init,
                       String units,
                       String minLabel,
                       String midLabel,
                       String maxLabel)
Create a new FloatControl given its type and various parameters.

Parameters:
type - the type
min - the minimum valuee
max - the maximum value
prec - the precision
update - the update period
init - the initial value
units - the description of the units
minLabel - the label for the minimum value
midLabel - the label for the midpoint
maxLabel - the label for the maximum value
Method Detail

getMaximum

public float getMaximum()
Return the maximum value of this control.


getMaxLabel

public String getMaxLabel()
Return the label for the minimum value of this control.


getMidLabel

public String getMidLabel()
Return the label for the midpoint of this control.


getMinimum

public float getMinimum()
Return the minimum value of this control.


getMinLabel

public String getMinLabel()
Return the label for the minimum value of this control.


getPrecision

public float getPrecision()
Return the precision of this control.


getUnits

public String getUnits()
Return the name of the units for this control.


getUpdatePeriod

public int getUpdatePeriod()
Return the update period of this control.


getValue

public float getValue()
Return the current value of this control.


setValue

public void setValue(float value)
Set the new value of this control.

Parameters:
value - the new value
Throws:
IllegalArgumentException - if the new value is greater than the maximum or less than the minimum.

shift

public void shift(float from,
                  float to,
                  int ms)
This tells the control to start at the starting value and to shift its value incrementally to the final value over the given time interval, specified in microseconds. The default implementation does not do this, but instead simply sets the value to the final value immediately.

Parameters:
from - the starting value
to - the final value
ms - the number of microseconds

toString

public String toString()
Return a string describing this control.

Overrides:
toString in class Control
Returns:
the String representing this Object, which may be null
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)