public class ToggleBoxImpl extends ToggleBox<ChuiOutputManager> implements AutoResizable<ToggleBoxConfig>
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
|
canMovetoTop, 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, copyColors, copyState, createMouseHoverAction, deactivateDirectManipulation, debug, destroy, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, findMouseSource, focusTraversable, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, initialHeight, initialWidth, insets, isCurrent, isDirectManipulationActive, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectAncestorChange, reflectLocationChange, refresh, registerWidgetStateListener, repaint, repaint, repaint, requestFocus, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, unrealize, unregisterWidgetStateListener, updateSizeWorker, widgetStateChanged, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createMnemonic, getColumnMnemonic, getMnemonicCharacter, getMnemonicKeyCode, getMnemonicLabel, isMnemonicSupported, setColumnMnemonic, updateMnemonic
defaultMousePtr, enforceDefaultMousePtr, getLegacyWidget, getTriggerWidget, getTriggerWidget, hasFocus, ignoreEnable, isDirectManipulable, isDroppable, isInitialValueLayout, isLegacyFocus, maySwitchFocus, parent, refreshWidget, requestFocus, requestFocus, systemFocusGrabbed, validateDisplayValue
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
- Config reference capturing the config state before
the owner's config was modified.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.