title: Updating TableView row appearance
body: <p>I'm having some dificulties to change the appearance of some TableView rows. The line should show the text with a stroke and in red. Actually, I can show it in red color but still can't do the stroke. This is the css class I'm using to change the appearance of the line:</p>
  
  <pre><code>.itemCancelado {
      -fx-strikethrough: true;
      -fx-text-fill: red;
  }
  </code></pre>
  
  <p>This style class is added when the user mark the item as canceled:</p>
  
  <pre><code>public class ItemCanceladoCellFactory implements Callback&lt;TableColumn, TableCell&gt; {
      @Override
      public TableCell call(TableColumn tableColumn) {
          return new TableCell&lt;ItemBean, Object&gt;() {
              @Override
              public void updateItem(Object item, boolean empty) {
                  super.updateItem(item, empty);
                  setText(empty ? "" : getItem().toString());
                  setGraphic(null);
                  int indice=getIndex();
                  ItemBean bean=null;
                  if(indice&lt;getTableView().getItems().size())
                      bean = getTableView().getItems().get(indice);
                  if (bean != null &amp;&amp; bean.isCancelado())
                      getStyleClass().add("itemCancelado");
              }
          };
      }
  }
  </code></pre>
  
  <p>There is another problem here, the row marked as canceled only changes the color when the user adds or removes an element from observable list. Is there a way I can force the update of the TableView?</p>
  
  <h1>EDITED INFORMATION</h1>
  
  <p>I changed the ItemBean class to use BooleanProperty and it solved partially:</p>
  
  <pre><code>public class ItemBean {
      ...
      private BooleanProperty cancelado = new SimpleBooleanProperty(false);
      ...
      public Boolean getCancelado() {
          return cancelado.get();
      }
  
      public void setCancelado(Boolean cancelado){
          this.cancelado.set(cancelado);
      }
  
      public BooleanProperty canceladoProperty(){
          return cancelado;
      }
  }
  </code></pre>
  
  <p>Unfortunately, only the column "cancelado" (that will be hided or removed when this finally work) changes the appearance:</p>
  
  <p><img src="https://i.stack.imgur.com/G3ys7.png" alt="cancelado column changes the appearance"></p>
  
  <p>here I configure the columns and the table:</p>
  
  <pre><code>public class ControladorPainelPreVenda extends ControladorPainel {
  
      @FXML
      private TableView&lt;ItemBean&gt; tabelaItens;
      private ObservableList&lt;ItemBean&gt; itens = FXCollections.observableArrayList();
      ...
  
      private void configurarTabela() {
          colunaCodigo.setCellValueFactory(new MultiPropertyValueFactory&lt;ItemBean, String&gt;("produto.id"));
          colunaCodigo.setCellFactory(new ItemCanceladoCellFactory());
          colunaDescricao.setCellValueFactory(new MultiPropertyValueFactory&lt;ItemBean, String&gt;("produto.descricao"));
          colunaDescricao.setCellFactory(new ItemCanceladoCellFactory());
          colunaLinha.setCellValueFactory(new MultiPropertyValueFactory&lt;ItemBean, String&gt;("produto.nomeLinha"));
          colunaLinha.setCellFactory(new ItemCanceladoCellFactory());
          colunaQuantidade.setCellValueFactory(new PropertyValueFactory&lt;ItemBean, BigDecimal&gt;("quantidade"));
          colunaQuantidade.setCellFactory(new ItemCanceladoCellFactory());
          colunaValorLiquido.setCellValueFactory(new PropertyValueFactory&lt;ItemBean, BigDecimal&gt;("valorLiquido"));
          colunaValorLiquido.setCellFactory(new ItemCanceladoCellFactory());
          colunaValorTotal.setCellValueFactory(new PropertyValueFactory&lt;ItemBean, BigDecimal&gt;("valorTotal"));
          colunaValorTotal.setCellFactory(new ItemCanceladoCellFactory());
          colunaCancelado.setCellValueFactory(new PropertyValueFactory&lt;ItemBean, Boolean&gt;("cancelado"));
          colunaCancelado.setCellFactory(new ItemCanceladoCellFactory());
          tabelaItens.setItems(itens);
      }
      ...
  }
  </code></pre>
  
  <p>How can I update all columns?</p>