|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.sound.sampled.Control
javax.sound.sampled.BooleanControl
public abstract class BooleanControl
BooleanControl 能够在影响行音频的两个可能的设置之间切换。这些设置都是 boolean 值(true 和 false)。图形用户界面可以表示由两个状态按钮、一个 on/off 开关、两个互斥按钮或一个复选框(在其他几种可能性之间)组成的控件。例如,按下一个按钮可能激活 控件,以抑制行音频。
MUTE
与其他 子类一样,将提供一个为适合在用户界面中显示的值返回字符串标签的方法。
Control
| 嵌套类摘要 | |
|---|---|
static class |
BooleanControl.Type
BooleanControl.Type 类的实例标识一种 boolean 控件。 |
| 构造方法摘要 | |
|---|---|
protected |
BooleanControl(BooleanControl.Type type,
boolean initialValue)
构造一个具有给定参数的新 boolean 控件对象。 |
protected |
BooleanControl(BooleanControl.Type type,
boolean initialValue,
String trueStateLabel,
String falseStateLabel)
构造一个具有给定参数的新 boolean 控件对象。 |
| 方法摘要 | |
|---|---|
String |
getStateLabel(boolean state)
获得指定状态的标签。 |
boolean |
getValue()
获得此控件的当前值。 |
void |
setValue(boolean value)
设置控件的当前值。 |
String |
toString()
提供控件的字符串表示形式 |
| 从类 javax.sound.sampled.Control 继承的方法 |
|---|
getType |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
protected BooleanControl(BooleanControl.Type type,
boolean initialValue,
String trueStateLabel,
String falseStateLabel)
type - 此 float 控件对象表示的控件类型initialValue - 初始控件值trueStateLabel - 由 true 表示的状态标签,如 "true" 或 "on"。falseStateLabel - 由 false 表示的状态标签,如 "false" 或 "off"。
protected BooleanControl(BooleanControl.Type type,
boolean initialValue)
true 和 false 状态的标签默认为 "true" 和 "false"。
type - 由此 float 控件对象表示的控件类型initialValue - 初始控件值| 方法详细信息 |
|---|
public void setValue(boolean value)
value - 所需的新值。public boolean getValue()
public String getStateLabel(boolean state)
true 的标签 "true" 或 "on",或指示 false 的标签 "false" 或 "off"。public String toString()
Control 中的 toString
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。