< prev index next >
modules/javafx.controls/src/main/java/javafx/scene/control/ButtonBase.java
Print this page
*** 89,98 ****
--- 89,99 ----
* will cause the button's action to be invoked. This is subtly different
* from pressed. Pressed indicates that the mouse has been
* pressed on a Node and has not yet been released. {@code arm} however
* also takes into account whether the mouse is actually over the
* button and pressed.
+ * @return the property to indicate that the button has been "armed"
*/
public final ReadOnlyBooleanProperty armedProperty() { return armed.getReadOnlyProperty(); }
private void setArmed(boolean value) { armed.set(value); }
public final boolean isArmed() { return armedProperty().get(); }
private ReadOnlyBooleanWrapper armed = new ReadOnlyBooleanWrapper() {
*** 114,123 ****
--- 115,126 ----
/**
* The button's action, which is invoked whenever the button is fired. This
* may be due to the user clicking on the button with the mouse, or by
* a touch event, or by a key press, or if the developer programmatically
* invokes the {@link #fire()} method.
+ * @return the property to represent the button's action, which is invoked
+ * whenever the button is fired
*/
public final ObjectProperty<EventHandler<ActionEvent>> onActionProperty() { return onAction; }
public final void setOnAction(EventHandler<ActionEvent> value) { onActionProperty().set(value); }
public final EventHandler<ActionEvent> getOnAction() { return onActionProperty().get(); }
private ObjectProperty<EventHandler<ActionEvent>> onAction = new ObjectPropertyBase<EventHandler<ActionEvent>>() {
*** 147,168 ****
* Arms the button. An armed button will fire an action (whether that be
* the action of a {@link Button} or toggling selection on a
* {@link CheckBox} or some other behavior) on the next expected UI
* gesture.
*
! * @expert 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 arm() {
setArmed(true);
}
/**
* Disarms the button. See {@link #arm()}.
*
! * @expert 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() {
setArmed(false);
--- 150,171 ----
* Arms the button. An armed button will fire an action (whether that be
* the action of a {@link Button} or toggling selection on a
* {@link 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 arm() {
setArmed(true);
}
/**
* Disarms the button. See {@link #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 void disarm() {
setArmed(false);
< prev index next >