FileDocCategorySizeDatePackage
BooleanControl.javaAPI DocAndroid 1.5 API2219Wed May 06 22:41:02 BST 2009javax.sound.sampled

BooleanControl

public abstract class BooleanControl extends Control

Fields Summary
private boolean
value
private String
trueStateLabel
private String
falseStateLabel
Constructors Summary
protected BooleanControl(Type type, boolean initialValue, String trueStateLabel, String falseStateLabel)

        super(type);
        this.value = initialValue;
        this.trueStateLabel = trueStateLabel;
        this.falseStateLabel = falseStateLabel;
    
protected BooleanControl(Type type, boolean initialValue)

        this(type, initialValue, "true", "false"); //$NON-NLS-1$ //$NON-NLS-2$
    
Methods Summary
public java.lang.StringgetStateLabel(boolean state)

        if (state) {
            return this.trueStateLabel;
        } else {
            return this.falseStateLabel;
        }
    
public booleangetValue()

        return this.value;
    
public voidsetValue(boolean value)

        this.value = value;
    
public java.lang.StringtoString()

        return getType() + " Control with current value: " + getStateLabel(value); //$NON-NLS-1$