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,
java.lang.String trueLabel,
java.lang.String falseLabel)
Create a new boolean control, with the indicated Type, initial
value, and labels.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.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.
|
java.lang.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, java.lang.String trueLabel, java.lang.String falseLabel)
type - the typeinit - the initial valuetrueLabel - the label for the true statefalseLabel - the label for the false statepublic java.lang.String getStateLabel(boolean state)
state - the statepublic boolean getValue()
public void setValue(boolean value)
value - the new value