@Override public void handle(MouseEvent t) { // move circle back to origin TranslateTransition move = new TranslateTransition(new Duration(200), (Circle) (t.getSource())); move.setToX(translateX); move.setToY(translateY); move.playFromStart(); }
/* */ public void handle(MouseEvent paramAnonymousMouseEvent) { /* 270 */ Rectangle localRectangle1 = (Rectangle) paramAnonymousMouseEvent.getSource(); /* 271 */ TableColumn localTableColumn = (TableColumn) localRectangle1.getProperties().get("TableColumn"); /* 272 */ NestedTableColumnHeader localNestedTableColumnHeader = (NestedTableColumnHeader) localRectangle1.getProperties().get("TableColumnHeader"); /* */ /* 274 */ if (!localNestedTableColumnHeader.isColumnResizingEnabled()) return; /* */ /* 276 */ if ((paramAnonymousMouseEvent.getClickCount() == 2) && (paramAnonymousMouseEvent.isPrimaryButtonDown())) /* */ { /* 279 */ localNestedTableColumnHeader.resizeToFit(localTableColumn, -1); /* */ } /* */ else /* */ { /* 283 */ Rectangle localRectangle2 = (Rectangle) paramAnonymousMouseEvent.getSource(); /* 284 */ double d = localNestedTableColumnHeader .getTableHeaderRow() .sceneToLocal( localRectangle2.localToScene(localRectangle2.getBoundsInLocal())) .getMinX() + 2.0D; /* 285 */ localNestedTableColumnHeader.dragAnchorX = paramAnonymousMouseEvent.getSceneX(); /* 286 */ localNestedTableColumnHeader.columnResizingStarted(d); /* */ } /* 288 */ paramAnonymousMouseEvent.consume(); /* */ }
@Override public void handle(MouseEvent t) { // set origin coordinates originX = t.getSceneX(); originY = t.getSceneY(); translateX = ((Circle) (t.getSource())).getTranslateX(); translateY = ((Circle) (t.getSource())).getTranslateY(); }
/* * * Listener dell'immagine con la lente d'ingrandimento , serve a mostrare le informazioni complete relative * a quell'offerta * */ public void visualizzaOffertePernotto(MouseEvent event) { ImageView o = (ImageView) event.getSource(); // // accessoCatalogoView.mostraOfferta(accessoCatalogoModel.findOff(o.getId(),TipoOfferta.OffertaPernotto)); accessoCatalogoView.mostraOfferta( DAOFactory.getDAOFactory(TipoOfferta.OffertaPernotto).getOffertaDAO().findOff(o.getId())); }
public void playerTurn(MouseEvent event) { int spot = -1; String playerMarker = player.getPlayerMarker(); if (event.getSource().equals(lblSpot1)) { lblSpot1.setText(playerMarker); spot = 0; lblSpot1.setDisable(true); } else if (event.getSource() == lblSpot2) { lblSpot2.setText(playerMarker); spot = 1; lblSpot2.setDisable(true); } else if (event.getSource() == lblSpot3) { lblSpot3.setText(playerMarker); spot = 2; lblSpot3.setDisable(true); } else if (event.getSource() == lblSpot4) { lblSpot4.setText(playerMarker); spot = 3; lblSpot4.setDisable(true); } else if (event.getSource() == lblSpot5) { lblSpot5.setText(playerMarker); spot = 4; lblSpot5.setDisable(true); } else if (event.getSource() == lblSpot6) { lblSpot6.setText(playerMarker); spot = 5; lblSpot6.setDisable(true); } else if (event.getSource() == lblSpot7) { lblSpot7.setText(playerMarker); spot = 6; lblSpot7.setDisable(true); } else if (event.getSource() == lblSpot8) { lblSpot8.setText(playerMarker); spot = 7; lblSpot8.setDisable(true); } else if (event.getSource() == lblSpot9) { lblSpot9.setText(playerMarker); spot = 8; lblSpot9.setDisable(true); } playboard.placeMarker(spot, playerInternalMarker); playboard.showBoardStatus(); if (playboard.checkForWin(playerInternalMarker)) { endGame("Human"); } else { computerMove(false); } }
@Override public void handle(MouseEvent t) { // calculate offset double offsetX = t.getSceneX() - originX; double offsetY = t.getSceneY() - originY; double newTranslateX = translateX + offsetX; double newTranslateY = translateY + offsetY; // follow mouse ((Circle) (t.getSource())).setTranslateX(newTranslateX); ((Circle) (t.getSource())).setTranslateY(newTranslateY); }
@FXML public void onBackButtonClicked(MouseEvent event) throws IOException { Scene currentScene = ((Node) event.getSource()).getScene(); Stage currentStage = (Stage) currentScene.getWindow(); FXMLLoader loader = new FXMLLoader(getClass().getResource("OptionsMenu.fxml"), tusca_db.Tusca_db.BUNDLE); Parent root = (Parent) loader.load(); Scene scene = new Scene(root, currentStage.getScene().getWidth(), currentStage.getScene().getHeight()); currentStage.setScene(scene); }
private synchronized void fireOnClick(MouseEvent event) { System.out.println("fire on click"); Sphere s = (Sphere) event.getSource(); Coordinate3D c = (Coordinate3D) s.getUserData(); LedColor color = getColor(c); for (CubeInputListener l : listeners) { System.out.println("notifying l for " + color); l.onPixelChange(c.getX(), c.getY(), c.getZ(), color != LedColor.ON); l.flush(); } }
/* */ public void handle(MouseEvent paramAnonymousMouseEvent) { /* 307 */ Rectangle localRectangle = (Rectangle) paramAnonymousMouseEvent.getSource(); /* 308 */ TableColumn localTableColumn = (TableColumn) localRectangle.getProperties().get("TableColumn"); /* 309 */ NestedTableColumnHeader localNestedTableColumnHeader = (NestedTableColumnHeader) localRectangle.getProperties().get("TableColumnHeader"); /* */ /* 311 */ if (!localNestedTableColumnHeader.isColumnResizingEnabled()) return; /* */ /* 313 */ localNestedTableColumnHeader.columnResizingComplete( localTableColumn, paramAnonymousMouseEvent); /* 314 */ paramAnonymousMouseEvent.consume(); /* */ }
/* */ public void handle(MouseEvent paramAnonymousMouseEvent) { /* 320 */ Rectangle localRectangle = (Rectangle) paramAnonymousMouseEvent.getSource(); /* 321 */ TableColumn localTableColumn = (TableColumn) localRectangle.getProperties().get("TableColumn"); /* 322 */ NestedTableColumnHeader localNestedTableColumnHeader = (NestedTableColumnHeader) localRectangle.getProperties().get("TableColumnHeader"); /* */ /* 324 */ localRectangle.setCursor( (localNestedTableColumnHeader.isColumnResizingEnabled()) && (localRectangle.isHover()) && (localTableColumn.isResizable()) ? Cursor.H_RESIZE : Cursor.DEFAULT); /* */ }
@Override public void handle(MouseEvent t) { try { TableCell c = (TableCell) t.getSource(); int index = c.getIndex(); System.out.println("id = " + recordList.get(index).getId()); System.out.println("name = " + recordList.get(index).getName()); System.out.println("board width = " + recordList.get(index).getBoardWidth()); System.out.println("board height = " + recordList.get(index).getBoardHeight()); int id = recordList.get(index).getId(); runControllerThread(id); } catch (Exception e) { } }
@Override public void handle(MouseEvent event) { DeckEntry deckEntry = (DeckEntry) event.getSource(); NotificationProxy.sendNotification(GameNotification.SET_ACTIVE_DECK, deckEntry.getDeck()); }