| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public abstract class EnumControl extends Control
A EnumControl
provides control over a set of
discrete possible values, each represented by an object. In a
graphical user interface, such a control might be represented
by a set of buttons, each of which chooses one value or setting. For
example, a reverb control might provide several preset reverberation
settings, instead of providing continuously adjustable parameters
of the sort that would be represented by {@link FloatControl}
objects.
Controls that provide a choice between only two settings can often be implemented
instead as a {@link BooleanControl}
, and controls that provide
a set of values along some quantifiable dimension might be implemented
instead as a FloatControl
with a coarse resolution.
However, a key feature of EnumControl
is that the returned values
are arbitrary objects, rather than numerical or boolean values. This means that each
returned object can provide further information. As an example, the settings
of a {@link EnumControl.Type#REVERB REVERB}
control are instances of
{@link ReverbType}
that can be queried for the parameter values
used for each setting.
Nested Class Summary | |
---|---|
static class |
An instance of the EnumControl.Type inner class identifies one kind of
enumerated control. |
Nested classes/interfaces inherited from class javax.sound.sampled.Control |
---|
Control.Type |
Constructor Summary | |
---|---|
protected |
EnumControl(EnumControl.Type type, Object[] values, Object value) Constructs a new enumerated control object with the given parameters. |
Method Summary | |
---|---|
Object |
getValue() Obtains this control's current value. |
Object[] |
Returns the set of possible values for this control. |
void |
Sets the current value for the control. |
String |
toString() Provides a string representation of the control. |
Methods inherited from class javax.sound.sampled.Control |
---|
getType, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected EnumControl(EnumControl.Type type, Object[] values, Object value)
type
- the type of control represented this enumerated control objectvalues
- the set of possible values for the controlvalue
- the initial control valueMethod Detail |
---|
public Object getValue()
public Object[] getValues()
public void setValue(Object value)
value
- the desired new valuepublic String toString()
toString
in class Control
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |