public abstract class Box extends StyledWidget
EMPTY_ELEMENT_ARRAY
Constructor and Description |
---|
Box() |
Modifier and Type | Method and Description |
---|---|
boolean |
isChecked()
Gets whether or not the box is checked.
|
boolean |
isInState(State state)
Gets whether or not the element is in the given state.
|
void |
setChecked(boolean checked)
Sets the state of the toggle and repaint it if its style changes.
|
void |
setPressed(boolean pressed)
Sets the pressed state of the box.
|
void |
updateState(boolean checked)
Sets the state of the toggle without repainting it.
|
addClassSelector, contains, gainFocus, getAttribute, getChild, getChildrenCount, getChildrenElements, getContentBounds, getParentElement, getStyle, hasClassSelector, isTransparent, lostFocus, mergeStyle, removeAllClassSelectors, removeClassSelector, removeInstanceStyle, render, setClassSelectors, setEnabled, updateStyle, updateStyleOnly, validate
getAbsoluteX, getAbsoluteX, getAbsoluteY, getAbsoluteY, getEventHandler, getHeight, getPanel, getParent, getPreferredHeight, getPreferredWidth, getRelativeX, getRelativeY, getWidgetAt, getWidth, getX, getY, handleEvent, hasFocus, hideNotify, invalidate, isEnabled, isShown, isValid, isVisible, repaint, repaint, requestFocus, requestFocus, revalidate, revalidateSubTree, setBounds, setEventHandler, setLocation, setPreferredSize, setSize, setVisible, showNotify
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
renderContent, validateContent
public void updateState(boolean checked)
checked
- the new state of the toggle.public void setChecked(boolean checked)
checked
- the new state of the toggle.public void setPressed(boolean pressed)
pressed
- the new pressed state of the box.public boolean isChecked()
true
if the box is checked otherwise false
.public boolean isInState(State state)
Element
isInState
in interface Element
isInState
in class StyledWidget
state
- the state to check.true
if the element is in the given state, false
otherwise.