TableView - get selected/focused cell in row selection mode

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • fx2.0
    • Affects Version/s: fx2.0
    • Component/s: javafx
    • Environment:

      Vista, b23

      When the table selection is in row mode, we don't get the clicked/selected/focused cell.

      e.g. right click with mouse opens a detail popup which needs the cell for data display...


      Example with mouse clicked event:

              table.setOnMouseClicked(new EventHandler<MouseEvent>()
              {
      @Override
      public void handle(MouseEvent event)
      {
      System.out.println("Clicked: " + ((TablePosition)table.getSelectionModel().getSelectedCells().get(0)).getColumn());
      System.out.println("Clicked-2: " + table.getFocusModel().getFocusedCell().getColumn());
      table.edit(0, 0);
      }
              
              });


      The cell is always -1.

            Assignee:
            Jonathan Giles
            Reporter:
            René Jahn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: