public class ToggleBoxImpl extends ToggleBox<ChuiOutputManager> implements AutoResizable<ToggleBoxConfig>
Widget.ZOrderClass
config, widgetFocused
insets, location, LOG, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
ToggleBoxImpl(WidgetId id,
Container<ChuiOutputManager> owner,
java.lang.String text)
This constructor creates a toggle-box with a given text label.
|
ToggleBoxImpl(WidgetId id,
WidgetConfig cfg)
Special constructor used to restore component using given configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
afterConfigUpdate(ToggleBoxConfig beforeUpdate)
The method is called after the configuration associated with
the implementor changes.
|
void |
draw()
Draw the button.
|
private void |
drawCheckBox(boolean highlighted,
Color pf,
Color dc)
Draws check box itself ("[X]" or "[ ]").
|
boolean |
isAutoResize()
Get the AUTO-RESIZE status
|
void |
updateSize(ToggleBoxConfig beforeUpdate)
Update widget's size after config update
|
check, getMnemonic, getText, getValue, handleBasicEvents, height, initialize, isModified, isToggleKey, processKeyEvent, setMnemonic, setText, setTextLabel, setValue, width
config, dimension, forceCursorOnFocus, getDefaultEvent, handleCursorKeys, ignoreAction, manageSystemActions, minimumSize, onFocusGained, onFocusLost, onKeyPressed, onKeyTyped, processKeyEventCommon, refresh, setActionCode, textLabel
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, createMouseHoverAction, deactivateDirectManipulation, debug, destroy, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, findMouseSource, focusTraversable, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCustomMousePointer, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, insets, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, repaint, requestFocus, requestSync, resetBitmap, resizeTo, resolveFont, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, unrealize, updateSizeWorker, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createMnemonic, getColumnMnemonic, getMnemonicCharacter, getMnemonicKeyCode, getMnemonicLabel, isMnemonicSupported, setColumnMnemonic, updateMnemonic
defaultMousePtr, enforceDefaultMousePtr, getLegacyWidget, isDirectManipulable
ToggleBoxImpl(WidgetId id, Container<ChuiOutputManager> owner, java.lang.String text)
id
- The widget's ID.owner
- The parent container, frame or dialog which will include this toggle-box.text
- The string to be used as the toggle box text label.public ToggleBoxImpl(WidgetId id, WidgetConfig cfg)
id
- The widget's ID.cfg
- Configuration data.public void draw()
draw
in interface Widget<ChuiOutputManager>
draw
in class AbstractButton<ChuiOutputManager,ToggleBoxConfig>
public void afterConfigUpdate(ToggleBoxConfig beforeUpdate)
afterConfigUpdate
in interface ConfigOwner<ToggleBoxConfig>
afterConfigUpdate
in class ToggleBox<ChuiOutputManager>
beforeUpdate
- public boolean isAutoResize()
isAutoResize
in interface AutoResizable<ToggleBoxConfig>
true
is AUTO-RESIZE is enabledpublic void updateSize(ToggleBoxConfig beforeUpdate)
updateSize
in interface AutoResizable<ToggleBoxConfig>
beforeUpdate
- previous value of the widget's configprivate void drawCheckBox(boolean highlighted, Color pf, Color dc)
highlighted
- Indicates whether the button is highlighted.pf
- The color used inside this check box under focus.dc
- The color which corresponds DCOLOR attribute for this radio
button.