javax.sound.sampled
public abstract class FloatControl extends Control
Modifier and Type | Class and Description |
---|---|
static class |
FloatControl.Type
An instance of this class describes a particular floating point control.
|
Modifier | Constructor and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected FloatControl(FloatControl.Type type, float min, float max, float prec, int update, float init, String units)
type
- the typemin
- the minimum valueemax
- the maximum valueprec
- the precisionupdate
- the update periodinit
- the initial valueunits
- the description of the unitsprotected FloatControl(FloatControl.Type type, float min, float max, float prec, int update, float init, String units, String minLabel, String midLabel, String maxLabel)
type
- the typemin
- the minimum valueemax
- the maximum valueprec
- the precisionupdate
- the update periodinit
- the initial valueunits
- the description of the unitsminLabel
- the label for the minimum valuemidLabel
- the label for the midpointmaxLabel
- the label for the maximum valuepublic float getMaximum()
public String getMaxLabel()
public String getMidLabel()
public float getMinimum()
public String getMinLabel()
public float getPrecision()
public int getUpdatePeriod()
public float getValue()
public void setValue(float value)
value
- the new valueIllegalArgumentException
- if the new value is greater than the
maximum or less than the minimum.public void shift(float from, float to, int ms)
from
- the starting valueto
- the final valuems
- the number of microsecondspublic String toString()
toString
in class Control
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)