public class CaptionButton extends GuiButton
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Runnable |
clickHandler
Optional click handler.
|
private GuiDriver |
gd
The graphics driver.
|
private double |
height
The button's height, in character units.
|
private CaptionButtonType |
type
The button type.
|
private double |
width
The button's width, in character units.
|
config, widgetFocusedinsets, location, LOG, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
CaptionButton(WidgetId id,
CaptionButtonType type)
Create a new button with the specified type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw()
Draw this caption button, depending on its type.
|
boolean |
focusTraversable()
Caption buttons are not focus traversable.
|
CaptionButtonType |
getType()
Returns the button type.
|
double |
height()
Get the button's
height. |
boolean |
isFocusable()
Checks whether this widget can receive focus generally.
|
protected int[] |
mouseActions()
Determine the mouse actions processed by this widget.
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Notification of a mouse clicked event occurred for this widget.
|
boolean |
raiseLegacyMouseEvents()
Check if the widget implementation can raise legacy, 4GL-style, mouse events.
|
void |
setClickHandler(java.lang.Runnable handler)
Sets the optional click handler for the button.
|
void |
setDimension(double width,
double height)
Set the button's dimension.
|
double |
width()
Get the button's
width. |
isMouseOver, isPressed, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleasedaddListener, afterConfigUpdate, checkKey, config, destroy, getColon, getColumnLabelText, getCommand, getLabelInstance, getLabelText, getMnemonic, getTo, handleBasicEvents, initButtonText, initialize, isForceLabel, isMnemonicSupported, isNoLabels, isRightAligned, postprocessConfig, processEvent, processKeyEvent, requestFocus, setCommand, setHidden, setLabelInstance, setMnemonic, setNoLabels, setSupportsMnemonic, setText, setTextLabel, setVisible, setWasVisible, textLabel, wasVisibledimension, 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, copyColors, copyState, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, findMouseSource, 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, hasTooltip, hidden, hide, highlighted, initialHeight, initialWidth, insets, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, reflectAncestorChange, reflectLocationChanged, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, repaint, requestFocus, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setEnabled, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalDimensionInt, setPhysicalLocation, setSensitiveForUIB, setState, setWindow, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, triggerLocationChanged, unrealize, unregisterWidgetListener, updateSizeWorker, updateSystemParent, widgetRealized, widgetStateChanged, windowclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, defaultMousePtr, dimension, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getIdForTrigger, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreEnable, initialHeight, initialWidth, insets, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isDroppable, isEnabled, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, minimumSize, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processFocusEvent, processKeyListeners, processMnemonic, refreshWidget, registerWidgetListener, repaint, repaint, repaint, requestFocus, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setEnabled, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setWindow, show, startTrigger, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unrealize, unregisterWidgetListener, validateDisplayValue, widgetStateChanged, windowcreateMnemonic, getColumnMnemonic, getMnemonicCharacter, getMnemonicKeyCode, getMnemonicLabel, setColumnMnemonic, updateMnemonicprivate CaptionButtonType type
private GuiDriver gd
private double width
private double height
private java.lang.Runnable clickHandler
CaptionButton(WidgetId id, CaptionButtonType type)
id - The widget's ID.type - The button type.public CaptionButtonType getType()
public boolean focusTraversable()
focusTraversable in interface Widget<GuiOutputManager>focusTraversable in class AbstractWidget<GuiOutputManager>public void draw()
draw in interface Widget<GuiOutputManager>draw in class AbstractButton<GuiOutputManager,ButtonConfig>public void setDimension(double width,
double height)
width - The button's width, in character unitsheight - The button's height, in character unitspublic double width()
width.width in interface Widget<GuiOutputManager>width in class Button<GuiOutputManager>public double height()
height.height in interface Widget<GuiOutputManager>height in class Button<GuiOutputManager>public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class AbstractWidget<GuiOutputManager>e - The mouse event.public boolean raiseLegacyMouseEvents()
raiseLegacyMouseEvents in interface Widget<GuiOutputManager>raiseLegacyMouseEvents in class AbstractWidget<GuiOutputManager>false.public void setClickHandler(java.lang.Runnable handler)
handler - Click handler.protected int[] mouseActions()
mouseActions in class GuiButtonpublic boolean isFocusable()
isFocusable in interface Widget<GuiOutputManager>isFocusable in class AbstractWidget<GuiOutputManager>false.