title: javafx diffrent ComboBoxTableCell for every row in a column
body: <p>I am trying to convert a swing gui to javafx and run into a problem.</p>
  
  <p>I have a jtable (tobe converted to tableview) that contains a nr of columns that have a combobox as "DefaultCellEditor". The combobox Values (String[]) are set dynamically depending on the row index of the jtable.</p>
  
  <p>Or in other words the table has a column in which every row has a combobox with diffrent content.</p>
  
  <p>Now I know e.g. how i can set the same combobox as editor for every cell in a column, but (apperently) no idea on how to put diffrent content in those comboboxes depending on row_index.</p>
  
  <p>In swing i create my table like this:</p>
  
  <pre><code>jTable2 = new javax.swing.JTable(model)
  {
  //  Determine editor to be used by row
  public TableCellEditor getCellEditor(int row, int column)
  {
      int modelColumn = convertColumnIndexToModel( column );
      if (Data_Source.ReturnCellEditor(row, column)!=null){
          return Data_Source.ReturnCellEditor(row, column);
      }
      else{
          return super.getCellEditor(row, column);
      }
  }
  @Override
  public Class&lt;?&gt; getColumnClass(int columnIndex) {
      if (columnIndex == 0)
      return Boolean.class;
      return super.getColumnClass(columnIndex);
  }
  </code></pre>
  
  <p>And from their i have a Method that just returns e.g. combobox-Object (Cast to DefaultCellEditor) dependend on row and column id.</p>
  
  <p>Can anyone help me find a Solution that does something simular in a javafx tableview??</p>
  
  <p>Thank You!</p>
  
  <p>EDIT1:</p>
  
  <p>As for brain's suggestion, I tried my best to make a custom cell factory... but i am still missing something. This way the getIndex() is always -1 ...</p>
  
  <pre><code>    public class TestCell&lt;S, T&gt; extends TableCell&lt;S, T&gt; implements Callback&lt;TableColumn&lt;S, T&gt;, TableCell&lt;S, T&gt;&gt;  {
  
      public TestCell() {
      }
  
  
  
  
          @Override
      public TableCell&lt;S, T&gt; call(TableColumn&lt;S, T&gt; p) {
          TableCell&lt;S, T&gt; cell = new TableCell&lt;S, T&gt;() {
              @Override
              protected void updateItem(Object item, boolean empty) {
                  System.out.println("updateItem");
  
              }
          };
          System.out.println(data.getCoverComboContent(getIndex()));
          return (TableCell&lt;S, T&gt;) new ComboBoxTableCell&lt;&gt;(data.getCoverComboContent(getIndex()));
      }
  }
  </code></pre>