ButtonState Class

ButtonState Class

This Package | All Packages

public final class ButtonState

Enumerator to be used with the drawButton* functions.

Fields
Name Description
ALL All viable flags in the bit mask.
CHECKED Button has a checked or latched appearance.
FLAT Button has a flat, two-dimensional appearance.
INACTIVE Button is disabled.
NORMAL Button is drawn normally.
PUSHED Button is pressed.

Methods
Name Description
ensureValid(int value) Throws an exception if the given value is not possible for this class.
valid(int value) Determines whether the given value is allowed by this class.

Fields

ButtonState.ALL

Syntax
public static final int ALL;
Description
All viable flags in the bit mask.

ButtonState.CHECKED

Syntax
public static final int CHECKED;
Description
Button has a checked or latched appearance.

ButtonState.FLAT

Syntax
public static final int FLAT;
Description
Button has a flat, two-dimensional appearance.

ButtonState.INACTIVE

Syntax
public static final int INACTIVE;
Description
Button is disabled.

ButtonState.NORMAL

Syntax
public static final int NORMAL;
Description
Button is drawn normally.

ButtonState.PUSHED

Syntax
public static final int PUSHED;
Description
Button is pressed.

Methods

ButtonState.ensureValid

Syntax
public static void ensureValid( int value );
Parameters
value
The value to check.
Description

Throws an exception if the given value is not possible for this class.

ButtonState.valid

Syntax
public static boolean valid( int value );
Parameters
value
The value to check.
Return Value

Returns true if the value is valid; otherwise, returns false.

Description

Determines whether the given value is allowed by this class.