/*
   *
   *   Listener dell'immagine con la lente d'ingrandimento , serve a mostrare le informazioni complete relative
   *   a quell'offerta
   * */
  public void visualizzaOfferteEvento(MouseEvent event) {

    ImageView o = (ImageView) event.getSource();

    //
    // accessoCatalogoView.mostraOfferta(accessoCatalogoModel.findOff(o.getId(),TipoOfferta.OffertaEvento));

    accessoCatalogoView.mostraOfferta(
        DAOFactory.getDAOFactory(TipoOfferta.OffertaEvento).getOffertaDAO().findOff(o.getId()));
  }
Пример #2
0
  public void reactOnMouseClick(
      GridPane grid,
      String[] listOfImageAsk,
      Image imgYes,
      Image imgNo,
      ImageView imageViewSourceRef) {
    System.out.println("Level Factor is " + levelFactor);
    String id = imageViewSourceRef.getId();
    System.out.println(id);
    int columnIndex = grid.getColumnIndex(imageViewSourceRef);
    int rowIndex = grid.getRowIndex(imageViewSourceRef);

    if (ifTheRightPictureClicked(id, listOfImageAsk)) {
      grid.add(new ImageView(imgYes), columnIndex, rowIndex);
      correctImageCounter = correctImageCounter + 1;
      System.out.println("Correct image counter is " + correctImageCounter);
      if (correctImageCounter == levelFactor) {
        levelSuccess();
      }
    } else wrongImageClicked(grid, imgNo, columnIndex, rowIndex);
  }