java-gnome version 4.1.2

org.gnome.gtk
Class Switch

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.freedesktop.bindings.Proxy
          extended by org.gnome.glib.Object
              extended by org.gnome.gtk.Widget
                  extended by org.gnome.gtk.Switch

public class Switch
extends Widget

Switch is a widget that has two states: on or off. The user can control which state should be active by clicking the empty area, or by dragging the handle.

Since:
4.1.2
Author:
Guillaume Mazoyer

Nested Class Summary
static interface Switch.NotifyActivated
          The callback invoked when the Switch is activated.
 
Nested classes/interfaces inherited from class org.gnome.gtk.Widget
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.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent
 
Constructor Summary
Switch()
          Create a new Switch widget.
 
Method Summary
 void connect(Switch.NotifyActivated handler)
          Hookup the Switch.NotifyActivated signal that will be emitted when the Switch will be activated.
 boolean isActive()
          Returns the current state of the Switch.
 void setActive(boolean value)
          Sets the state of the Switch.
 
Methods inherited from class org.gnome.gtk.Widget
activate, addEvents, 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
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Switch

public Switch()
Create a new Switch widget.

Since:
4.1.2
Method Detail

connect

public void connect(Switch.NotifyActivated handler)
Hookup the Switch.NotifyActivated signal that will be emitted when the Switch will be activated.

Since:
4.1.2

isActive

public boolean isActive()
Returns the current state of the Switch.

Since:
4.1.2

setActive

public void setActive(boolean value)
Sets the state of the Switch.

Since:
4.1.2


java-gnome