Package javafx.scene.control

Examples of javafx.scene.control.Button.addEventHandler()


      if (file != null) {
        final Group btnGraphic = createButtonGraphic(0.2);
        final Button zoomButton = new Button();
        zoomButton.setTooltip(new Tooltip(imageFullSizeToolTip));
        zoomButton.setGraphic(btnGraphic);
        zoomButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent e) {
            Image image;
            try {
            image = new Image(new FileInputStream(file));
View Full Code Here


   *            the web view to reload
   * @return the created button
   */
  protected Button createReloadButton(final WebView webView) {
    final Button reloadBtn = new Button(RS.rbLabel(KEY.RELOAD));
    reloadBtn.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent event) {
        webView.getEngine().reload();
      }
    });
View Full Code Here

    grid.add(headerLaser, 1, 4);
      final Button laserCalibrate = new Button(); //new Button(RS.rbLabel("laser.calibration"));
      laserCalibrate.setGraphic(RS.imgView(RS.IMG_LASER_CALIBRATE));
      laserCalibrate.setMaxWidth(125d);
      laserCalibrate.setWrapText(true);
      laserCalibrate.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {
      @Override
      public void handle(final MouseEvent event) {
        if (GuiUtil.isPrimaryPress(event)) {
          controlBar.createCommandService(Command.SERVO_LASER_CALIBRATE, true);
        }
View Full Code Here

      // });
      final Button btn = new Button(message);
      btn.setPrefSize(NOTIFY_WINDOW_WIDTH, NOTIFY_WINDOW_HEIGHT);
      btn.setWrapText(true);
      if (mouseEventHandler != null) {
        btn.addEventHandler(MouseEvent.ANY, mouseEventHandler);
      }
      btn.addEventHandler(MouseEvent.ANY, new EventHandler<MouseEvent>() {
        @Override
        public void handle(final MouseEvent event) {
          if (event.getEventType() == MouseEvent.MOUSE_CLICKED) {
View Full Code Here

      btn.setPrefSize(NOTIFY_WINDOW_WIDTH, NOTIFY_WINDOW_HEIGHT);
      btn.setWrapText(true);
      if (mouseEventHandler != null) {
        btn.addEventHandler(MouseEvent.ANY, mouseEventHandler);
      }
      btn.addEventHandler(MouseEvent.ANY, new EventHandler<MouseEvent>() {
        @Override
        public void handle(final MouseEvent event) {
          if (event.getEventType() == MouseEvent.MOUSE_CLICKED) {
            closeNotification();
          } else if (event.getEventType() == MouseEvent.MOUSE_ENTERED) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.