modules/controls/src/main/java/javafx/scene/control/Button.java

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization


  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene.control;
  27 
  28 import javafx.beans.property.BooleanProperty;
  29 import javafx.beans.property.BooleanPropertyBase;
  30 import javafx.event.ActionEvent;
  31 import javafx.scene.AccessibleRole;
  32 import javafx.scene.Node;
  33 
  34 import javafx.css.PseudoClass;
  35 import com.sun.javafx.scene.control.skin.ButtonSkin;
  36 
  37 /**
  38  * <p>A simple button control.  The button control can contain
  39  * text and/or a graphic.  A button control has three different modes</p>
  40  * <ul>
  41  * <li> Normal: A normal push button. </li>
  42  * <li> Default: A default Button is the button that receives a keyboard VK_ENTER press, if no other node in the scene consumes it.</li>
  43  * <li> Cancel: A Cancel Button is the button that receives a keyboard VK_ESC press, if no other node in the scene consumes it.</li>
  44  * </ul>
  45  *
  46  * <p>When a button is pressed and released a {@link ActionEvent} is sent.
  47  * Your application can perform some action based on this event by implementing an
  48  * {@link javafx.event.EventHandler} to process the {@link ActionEvent}.  Buttons can also respond to
  49  * mouse events by implementing an {@link javafx.event.EventHandler} to process the {@link javafx.scene.input.MouseEvent}
  50  * </p>
  51  *
  52  * <p>
  53  * MnemonicParsing is enabled by default for Button.
  54  * </p>
  55  *




  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene.control;
  27 
  28 import javafx.beans.property.BooleanProperty;
  29 import javafx.beans.property.BooleanPropertyBase;
  30 import javafx.event.ActionEvent;
  31 import javafx.scene.AccessibleRole;
  32 import javafx.scene.Node;
  33 
  34 import javafx.css.PseudoClass;
  35 import javafx.scene.control.skin.ButtonSkin;
  36 
  37 /**
  38  * <p>A simple button control.  The button control can contain
  39  * text and/or a graphic.  A button control has three different modes</p>
  40  * <ul>
  41  * <li> Normal: A normal push button. </li>
  42  * <li> Default: A default Button is the button that receives a keyboard VK_ENTER press, if no other node in the scene consumes it.</li>
  43  * <li> Cancel: A Cancel Button is the button that receives a keyboard VK_ESC press, if no other node in the scene consumes it.</li>
  44  * </ul>
  45  *
  46  * <p>When a button is pressed and released a {@link ActionEvent} is sent.
  47  * Your application can perform some action based on this event by implementing an
  48  * {@link javafx.event.EventHandler} to process the {@link ActionEvent}.  Buttons can also respond to
  49  * mouse events by implementing an {@link javafx.event.EventHandler} to process the {@link javafx.scene.input.MouseEvent}
  50  * </p>
  51  *
  52  * <p>
  53  * MnemonicParsing is enabled by default for Button.
  54  * </p>
  55  *