public abstract class BooleanControl extends Control
| Modifier and Type | Class and Description |
|---|---|
static class |
BooleanControl.Type
A Type specialized to represent a boolean control.
|
| Modifier | Constructor and Description |
|---|---|
protected |
BooleanControl(BooleanControl.Type type,
boolean init)
Create a new boolean control, with the indicated Type and initial
value.
|
protected |
BooleanControl(BooleanControl.Type type,
boolean init,
String trueLabel,
String falseLabel)
Create a new boolean control, with the indicated Type, initial
value, and labels.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getStateLabel(boolean state)
Return the label corresponding to the indicated state.
|
boolean |
getValue()
Return the current value of thhe control.
|
void |
setValue(boolean value)
Set the value of the control as indicated.
|
String |
toString()
Return a string describing this control.
|
protected BooleanControl(BooleanControl.Type type, boolean init)
type - the typeinit - the initial valueprotected BooleanControl(BooleanControl.Type type, boolean init, String trueLabel, String falseLabel)
type - the typeinit - the initial valuetrueLabel - the label for the true statefalseLabel - the label for the false statepublic String getStateLabel(boolean state)
state - the statepublic boolean getValue()
public void setValue(boolean value)
value - the new valuepublic String toString()
toString in class ControlObject.getClass(),
Object.hashCode(),
Class.getName(),
Integer.toHexString(int)