public class ToggleButton extends Button
Modifier and Type | Class and Description |
---|---|
static interface |
ToggleButton.Toggled
Signal indicating the Button has changed state.
|
Button.Clicked
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent
Constructor and Description |
---|
ToggleButton()
Constructs a new ToggleButton
|
ToggleButton(String label)
Constructs a new ToggleButton with a label.
|
Modifier and Type | Method and Description |
---|---|
void |
connect(ToggleButton.Toggled handler)
Hook up a
ToggleButton.Toggled signal handler. |
boolean |
getActive()
Returns the current state of the ToggleButton
|
void |
setActive(boolean active)
Set the state of the ToggleButon.
|
connect, emitClicked, getAlignmentX, getAlignmentY, getImage, getLabel, getRelatedAction, getRelief, setAlignment, setFocusOnClick, setImage, setLabel, setRelatedAction, setRelief
add, getChildren, remove, setBorderWidth
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll
public ToggleButton()
public ToggleButton(String label)
The label may contain underscores (_
) to indicate
the mnemonic for the Button.
public void connect(ToggleButton.Toggled handler)
ToggleButton.Toggled
signal handler.public boolean getActive()
true
if the ToggleButton is pressed,
false
otherwise.public void setActive(boolean active)
active
- The new state of the ToggleButton