Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8112333

TableView - get selected/focused cell in row selection mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • fx2.0
    • fx2.0
    • javafx
    • 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.

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

              Created:
              Updated:
              Resolved:
              Imported: