public class Switch extends Toggle
It is simply a toggle composite that contains a switch box and a label, based on a toggle model.
Label
,
SwitchBox
,
ToggleModel
EMPTY_ELEMENT_ARRAY
Constructor and Description |
---|
Switch(java.lang.String text)
Creates a switch with the text to display.
|
Switch(java.lang.String text,
java.lang.String group)
Creates a switch with the text to display and its group.
|
getLabel, getText, setBoundsContent, setPressed, setText, setWidget, update, validateContent
addOnStateChangeListener, gainFocus, getToggle, handleEvent, isChecked, isInState, lostFocus, removeOnStateChangeListener, requestFocus, requestFocus, setChecked, setGroup, toggle
contains, isAdjustedToChild, setAdjustedToChild
add, addClassSelector, getAttribute, getChild, getChildrenCount, getChildrenElements, getParentElement, getStyle, hasClassSelector, isTransparent, mergeStyle, removeAllClassSelectors, removeClassSelector, removeInstanceStyle, render, renderContent, setBounds, setClassSelectors, setEnabled, updateStyle, updateStyleOnly, validate
getFocus, getFocusIndex, getNext, getWidget, getWidgetAt, getWidgets, getWidgetsCount, hideNotify, iterator, remove, removeAllWidgets, requestFocusFrom, showNotify
getAbsoluteX, getAbsoluteX, getAbsoluteY, getAbsoluteY, getEventHandler, getHeight, getPanel, getParent, getPreferredHeight, getPreferredWidth, getRelativeX, getRelativeY, getWidth, getX, getY, hasFocus, invalidate, isEnabled, isShown, isValid, isVisible, repaint, repaint, revalidate, revalidateSubTree, setEventHandler, setLocation, setPreferredSize, setSize, setVisible
public Switch(java.lang.String text)
null
.text
- the text to display.java.lang.NullPointerException
- if the text is null
.public Switch(java.lang.String text, java.lang.String group)
null
.text
- the text to display.group
- the name of the toggle group.java.lang.NullPointerException
- if the text is null
.