|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.Container
org.gnu.gtk.Bin
org.gnu.gtk.Button
org.gnu.gtk.ToggleButton
public class ToggleButton
A ToggleButton is a button that changes and retains its on or off state each time it is selected with the mouse. When in the on state, it will appear to be pressed in.
CheckButton
,
RadioButton
,
Button
Constructor Summary | |
---|---|
ToggleButton()
Creates a new toggle button. |
|
ToggleButton(org.gnu.glib.Handle handle)
Construct a toggle button using a handle to a native resource. |
|
ToggleButton(java.lang.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. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
EventType |
getEventType(java.lang.String signal)
|
boolean |
getInconsistent()
Return whether this is in the inconsistent state |
boolean |
getState()
Returns the state of the toggle button |
static ToggleButton |
getToggleButton(org.gnu.glib.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 |
Methods inherited from class org.gnu.gtk.Button |
---|
addListener, click, enter, getButton, getFocusOnClick, getImage, getLabel, getRelief, getUseStock, getUseUnderline, getXAlignment, getYAlignment, leave, press, release, removeListener, setAlignment, setFocusOnClick, setImage, setLabel, setRelief, setUseStock, setUseUnderline |
Methods inherited from class org.gnu.gtk.Bin |
---|
getChild |
Methods inherited from class org.gnu.gtk.Container |
---|
add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getIntChildProperty, getResizeMode, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, setResizeMode |
Methods inherited from class org.gnu.gtk.GtkObject |
---|
destroy, sink |
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToggleButton()
public ToggleButton(org.gnu.glib.Handle handle)
public ToggleButton(java.lang.String label, boolean hasMnemonic)
label
- The text to be displayed on the buttonhasMnemonic
- If true, keyboeard accelerators will be interpreted.Method Detail |
---|
public static ToggleButton getToggleButton(org.gnu.glib.Handle handle)
public void setState(boolean state)
state
- If true, the button is in the 'on', or 'pressed in' state.public boolean getState()
public void setInconsistent(boolean isInconsistent)
getState()
.
isInconsistent
- If true, the button will appear in the in-between state.public boolean getInconsistent()
setInconsistent(boolean)
public void addListener(ToggleListener listener)
ToggleListener
public void removeListener(ToggleListener listener)
addListener(ToggleListener)
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Button
public EventType getEventType(java.lang.String signal)
getEventType
in class Button
public static Type getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |