| 
 | Java™ Platform Standard Ed. 6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.sound.sampled.Control
javax.sound.sampled.BooleanControl
public abstract class BooleanControl
A BooleanControl provides the ability to switch between
 two possible settings that affect a line's audio.  The settings are boolean
 values (true and false).  A graphical user interface
 might represent the control by a two-state button, an on/off switch, two
 mutually exclusive buttons, or a checkbox (among other possibilities).
 For example, depressing a button might activate a
 MUTE
 As with other Control
| Nested Class Summary | |
|---|---|
| static class | BooleanControl.TypeAn instance of the BooleanControl.Typeclass identifies one kind of
 boolean control. | 
| Constructor Summary | |
|---|---|
| protected  | BooleanControl(BooleanControl.Type type,
               boolean initialValue)Constructs a new boolean control object with the given parameters. | 
| protected  | BooleanControl(BooleanControl.Type type,
               boolean initialValue,
               String trueStateLabel,
               String falseStateLabel)Constructs a new boolean control object with the given parameters. | 
| Method Summary | |
|---|---|
|  String | getStateLabel(boolean state)Obtains the label for the specified state. | 
|  boolean | getValue()Obtains this control's current value. | 
|  void | setValue(boolean value)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 | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
protected BooleanControl(BooleanControl.Type type,
                         boolean initialValue,
                         String trueStateLabel,
                         String falseStateLabel)
type - the type of control represented this float control objectinitialValue - the initial control valuetrueStateLabel - the label for the state represented by true,
 such as "true" or "on."falseStateLabel - the label for the state represented by false,
 such as "false" or "off."
protected BooleanControl(BooleanControl.Type type,
                         boolean initialValue)
true and false states
 default to "true" and "false."
type - the type of control represented by this float control objectinitialValue - the initial control value| Method Detail | 
|---|
public void setValue(boolean value)
value - desired new value.public boolean getValue()
public String getStateLabel(boolean state)
true, or "false" or "off" for false.public String toString()
toString in class Control| 
 | Java™ Platform Standard Ed. 6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.