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.
- Since:
- 4.0.3
-
Method Detail
-
connect
public void connect(ToggleButton.Toggled handler)
Hook up a ToggleButton.Toggled
signal handler.
- Since:
- 4.0.3
-
getActive
public boolean getActive()
Returns the current state of the ToggleButton
- Returns:
- returns
true
if the ToggleButton is pressed,
false
otherwise. - Since:
- 4.0.3
-
setActive
public void setActive(boolean active)
Set the state of the ToggleButon.
- Parameters:
active
- The new state of the ToggleButton- Since:
- 4.0.3