/*
* @(#)FloatControl.java 1.17 05/11/17
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.sound.sampled;
/**
* A <code>FloatControl</code> object provides control over a range of
* floating-point values. Float controls are often
* represented in graphical user interfaces by continuously
* adjustable objects such as sliders or rotary knobs. Concrete subclasses
* of <code>FloatControl</code> implement controls, such as gain and pan, that
* affect a line's audio signal in some way that an application can manipulate.
* The <code>{@link FloatControl.Type}</code>
* inner class provides static instances of types that are used to
* identify some common kinds of float control.
* <p>
* The <code>FloatControl</code> abstract class provides methods to set and get
* the control's current floating-point value. Other methods obtain the possible
* range of values and the control's resolution (the smallest increment between
* returned values). Some float controls allow ramping to a
* new value over a specified period of time. <code>FloatControl</code> also
* includes methods that return string labels for the minimum, maximum, and midpoint
* positions of the control.
*
* @see Line#getControls
* @see Line#isControlSupported
*
* @author David Rivas
* @author Kara Kytle
* @version 1.17, 05/11/17
* @since 1.3
*/
public abstract class FloatControl extends Control {
// INSTANCE VARIABLES
// FINAL VARIABLES
/**
* The minimum supported value.
*/
private float minimum;
/**
* The maximum supported value.
*/
private float maximum;
/**
* The control's precision.
*/
private float precision;
/**
* The smallest time increment in which a value change
* can be effected during a value shift, in microseconds.
*/
private int updatePeriod;
/**
* A label for the units in which the control values are expressed,
* such as "dB" for decibels.
*/
private final String units;
/**
* A label for the minimum value, such as "Left."
*/
private final String minLabel;
/**
* A label for the maximum value, such as "Right."
*/
private final String maxLabel;
/**
* A label for the mid-point value, such as "Center."
*/
private final String midLabel;
// STATE VARIABLES
/**
* The current value.
*/
private float value;
// CONSTRUCTORS
=1= |