public abstract class ButtonBase extends Labeled
Type | Property and Description |
---|---|
ReadOnlyBooleanProperty |
armed
Indicates that the button has been "armed" such that a mouse release
will cause the button's action to be invoked.
|
<any> |
onAction
The button's action, which is invoked whenever the button is fired.
|
alignmentProperty, contentDisplayProperty, ellipsisStringProperty, fontProperty, graphicProperty, graphicTextGapProperty, labelPaddingProperty, lineSpacingProperty, mnemonicParsingProperty, textAlignmentProperty, textFillProperty, textOverrunProperty, textProperty, underlineProperty, wrapTextProperty
contextMenuProperty, skinClassNameProperty, skinProperty, tooltipProperty
Modifier and Type | Field and Description |
---|---|
private ReadOnlyBooleanWrapper |
armed |
private static PseudoClass |
ARMED_PSEUDOCLASS_STATE
*
Stylesheet Handling *
*
|
private <any> |
onAction |
Constructor and Description |
---|
ButtonBase()
Create a default ButtonBase with empty text.
|
ButtonBase(java.lang.String text)
Create a ButtonBase with the given text.
|
ButtonBase(java.lang.String text,
Node graphic)
Create a ButtonBase with the given text and graphic.
|
Modifier and Type | Method and Description |
---|---|
void |
arm()
Arms the button.
|
ReadOnlyBooleanProperty |
armedProperty()
Indicates that the button has been "armed" such that a mouse release
will cause the button's action to be invoked.
|
void |
disarm()
Disarms the button.
|
void |
executeAccessibleAction(AccessibleAction action,
java.lang.Object... parameters) |
abstract void |
fire()
Invoked when a user gesture indicates that an event for this
ButtonBase should occur. |
<any> |
getOnAction()
Gets the value of the property onAction.
|
boolean |
isArmed()
Gets the value of the property armed.
|
<any> |
onActionProperty()
The button's action, which is invoked whenever the button is fired.
|
private void |
setArmed(boolean value) |
void |
setOnAction(<any> value)
Sets the value of the property onAction.
|
alignmentProperty, contentDisplayProperty, ellipsisStringProperty, fontProperty, getAlignment, getClassCssMetaData, getContentBias, getContentDisplay, getControlCssMetaData, getEllipsisString, getFont, getGraphic, getGraphicTextGap, getInitialAlignment, getLabelPadding, getLineSpacing, getText, getTextAlignment, getTextFill, getTextOverrun, graphicProperty, graphicTextGapProperty, isMnemonicParsing, isUnderline, isWrapText, labelPaddingProperty, lineSpacingProperty, mnemonicParsingProperty, setAlignment, setContentDisplay, setEllipsisString, setFont, setGraphic, setGraphicTextGap, setLineSpacing, setMnemonicParsing, setText, setTextAlignment, setTextFill, setTextOverrun, setUnderline, setWrapText, textAlignmentProperty, textFillProperty, textOverrunProperty, textProperty, toString, underlineProperty, wrapTextProperty
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, createDefaultSkin, getBaselineOffset, getContextMenu, getControlChildren, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, loadSkinClass, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinClassNameProperty, skinProperty, tooltipProperty
public final ReadOnlyBooleanProperty armedProperty
arm
however
also takes into account whether the mouse is actually over the
button and pressed.isArmed()
public final <any> onActionProperty
fire()
method.getOnAction()
,
#setOnAction()
private ReadOnlyBooleanWrapper armed
private <any> onAction
private static final PseudoClass ARMED_PSEUDOCLASS_STATE
public ButtonBase()
public ButtonBase(java.lang.String text)
text
- null text is treated as the empty stringpublic ButtonBase(java.lang.String text, Node graphic)
text
- null text is treated as the empty stringgraphic
- a null graphic is acceptablepublic final ReadOnlyBooleanProperty armedProperty()
arm
however
also takes into account whether the mouse is actually over the
button and pressed.isArmed()
private void setArmed(boolean value)
public final boolean isArmed()
public final <any> onActionProperty()
fire()
method.getOnAction()
,
#setOnAction()
public final void setOnAction(<any> value)
public final <any> getOnAction()
public void arm()
Button
or toggling selection on a
CheckBox
or some other behavior) on the next expected UI
gesture.
Note: This function is intended to be used by experts, primarily
by those implementing new Skins or Behaviors. It is not common
for developers or designers to access this function directly.public void disarm()
arm()
.
Note: This function is intended to be used by experts, primarily
by those implementing new Skins or Behaviors. It is not common
for developers or designers to access this function directly.public abstract void fire()
ButtonBase
should occur.
If invoked, this method will be executed regardless of the status of
arm()
.
public void executeAccessibleAction(AccessibleAction action, java.lang.Object... parameters)
executeAccessibleAction
in class Control