public class ButtonImpl extends Button<ChuiOutputManager> implements AutoResizable<ButtonConfig>
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
private boolean |
supportsMnemonic
The flag indicating whether this button supports mnemonic or not.
|
config, widgetFocused
insets, location, LOG, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
ButtonImpl(WidgetId id,
Container<ChuiOutputManager> owner,
java.lang.String text)
This constructor creates a button with a given text label.
|
ButtonImpl(WidgetId id,
WidgetConfig cfg)
Special constructor used to restore component using given configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draw the button.
|
boolean |
isAutoResize()
Get the AUTO-RESIZE status
|
boolean |
isMnemonicSupported()
Check whether this button supports mnemonics.
|
void |
requestFocus()
Request focus.
|
void |
setSupportsMnemonic()
Set the mnemonics support for this button.
|
void |
updateSize(ButtonConfig beforeUpdate)
Update widget's size after config update
|
addListener, afterConfigUpdate, checkKey, config, destroy, getColon, getColumnLabelText, getCommand, getLabelInstance, getLabelText, getMnemonic, getTo, handleBasicEvents, height, initButtonText, initialize, isForceLabel, isNoLabels, isRightAligned, postprocessConfig, processEvent, processKeyEvent, setCommand, setHidden, setLabelInstance, setMnemonic, setNoLabels, setText, setTextLabel, setVisible, setWasVisible, textLabel, wasVisible, width
dimension, forceCursorOnFocus, getDefaultEvent, handleCursorKeys, ignoreAction, manageSystemActions, minimumSize, onFocusGained, onFocusLost, onKeyPressed, onKeyTyped, processKeyEventCommon, refresh, setActionCode
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, createMouseHoverAction, deactivateDirectManipulation, debug, 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, prepParentLocation, processDirectManipulationEvent, processFocusEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setEnabled, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, unrealize, updateSizeWorker, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, defaultMousePtr, dimension, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, insets, isDirectManipulable, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, minimumSize, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, processDirectManipulationEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, repaint, requestSync, resizeTo, screen, screenLocation, screenPhysicalLocation, setEnabled, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, supportsCustomMousePointer, topLevelWindow, unrealize, window
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
createMnemonic, getColumnMnemonic, getMnemonicCharacter, getMnemonicKeyCode, getMnemonicLabel, setColumnMnemonic, updateMnemonic
private boolean supportsMnemonic
ButtonImpl(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
button.text
- The string to be used as the button text.public ButtonImpl(WidgetId id, WidgetConfig cfg)
id
- The widget's ID.cfg
- Configuration data.public void setSupportsMnemonic()
setSupportsMnemonic
in class Button<ChuiOutputManager>
public void draw()
draw
in interface Widget<ChuiOutputManager>
draw
in class AbstractButton<ChuiOutputManager,ButtonConfig>
public void requestFocus()
requestFocus
in interface Widget<ChuiOutputManager>
requestFocus
in class Button<ChuiOutputManager>
public boolean isAutoResize()
isAutoResize
in interface AutoResizable<ButtonConfig>
true
is AUTO-RESIZE is enabledpublic void updateSize(ButtonConfig beforeUpdate)
updateSize
in interface AutoResizable<ButtonConfig>
beforeUpdate
- previous value of the widget's configpublic boolean isMnemonicSupported()
isMnemonicSupported
in interface MnemonicTrait<ChuiOutputManager>
isMnemonicSupported
in class Button<ChuiOutputManager>
true
if this button supports mnemonic.