org.gnu.gtk
public class ToggleButton extends Button
See Also: CheckButton RadioButton Button
Constructor Summary | |
---|---|
ToggleButton()
Creates a new toggle button. | |
ToggleButton(Handle handle)
Construct a toggle button using a handle to a native resource. | |
ToggleButton(String label, boolean hasMnemonic)
Creates a new toggle button with a text label. |
Method Summary | |
---|---|
void | addListener(ToggleListener listener)
Register an object to handle button events.
|
Class | getEventListenerClass(String signal) |
EventType | getEventType(String signal) |
boolean | getInconsistent()
Return whether this is in the inconsistent state
|
boolean | getState()
Returns the state of the toggle button
|
static ToggleButton | getToggleButton(Handle handle)
Internal static factory method to be used by Java-Gnome only. |
static Type | getType()
Retrieve the runtime type used by the GLib library. |
void | removeListener(ToggleListener listener)
Removes a listener
|
void | setInconsistent(boolean isInconsistent)
Determines whether the toggle button should be in the half-on, or
inconsistent state. |
void | setState(boolean state)
Modifies the state of the toggle button
|
Parameters: label The text to be displayed on the button hasMnemonic If true, keyboeard accelerators will be interpreted.
See Also: ToggleListener
Returns: True if the 'inbetween' state is in use
See Also: ToggleButton
Returns: True if the button is on or 'pressed in'.
See Also: addListener
Parameters: isInconsistent If true, the button will appear in the in-between state.
Parameters: state If true, the button is in the 'on', or 'pressed in' state.