public class ToggleBox extends ToggleWrapper
It is simply a toggle wrapper that contains a box, based on a toggle model.
Box
,
ToggleModel
EMPTY_ELEMENT_ARRAY
Constructor and Description |
---|
ToggleBox(Box box)
Creates a toggle box.
|
ToggleBox(ToggleModel toggleModel,
Box box)
Creates a toggle box.
|
ToggleBox(ToggleModel toggleModel,
Box box,
java.lang.String group)
Creates a toggle box.
|
Modifier and Type | Method and Description |
---|---|
protected void |
setPressed(boolean pressed)
Sets the pressed state of the toggle.
|
void |
setWidget(Widget widget)
Sets the only child of this composite.
|
void |
update()
Something has changed.
|
addOnStateChangeListener, gainFocus, getToggle, handleEvent, isChecked, isInState, lostFocus, removeOnStateChangeListener, requestFocus, requestFocus, setChecked, setGroup, toggle
contains, isAdjustedToChild, setAdjustedToChild, setBoundsContent, validateContent
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEventHandler, getHeight, getWidth, getX, getY, hideNotify, isShown, repaint, repaint, setEventHandler, showNotify
public ToggleBox(Box box)
The box state is updated along with the state of the toggle.
box
- the widget representing the state of the toggle.java.lang.NullPointerException
- if a parameter is null
.State.Checked
public ToggleBox(ToggleModel toggleModel, Box box)
The box state is updated along with the state of the toggle.
toggleModel
- the toggle model.box
- the widget representing the state of the toggle.java.lang.NullPointerException
- if a parameter is null
.State.Checked
public ToggleBox(ToggleModel toggleModel, Box box, java.lang.String group)
The box state is updated along with the state of the toggle.
toggleModel
- the toggle model.box
- the widget representing the state of the toggle.group
- the name of the toggle group.java.lang.NullPointerException
- if a parameter is null
.State.Checked
public void setWidget(Widget widget)
Wrapper
public void update()
GenericListener
update
in interface GenericListener
update
in class ToggleWrapper
protected void setPressed(boolean pressed)
ToggleWrapper
setPressed
in class ToggleWrapper
pressed
- the new pressed state of the toggle.