title: SWT - Table Row - Changing font color
body: <p>Is it possible to change the font color for a row based on a value in one of the columns?</p>
  
  <p>My table has a column that displays a status.  The value of the column is going to either be Failed or Success.  </p>
  
  <p>If it is Success I would like for that rows font be green.  If the status equals Failed, I want that rows font be red. </p>
  
  <p>Is this possible, if so where would I put the logic.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is my Table Viewer code, I am not going to show all the columns, just a couple</p>
  
  <pre><code>private void createColumns() {
  
    String[] titles = { "ItemId", "RevId", "PRL", "Dataset Name", "Printer/Profile" , "Success/Fail" };
    int[] bounds = { 100, 75, 75, 150, 200, 100 };
  
    TableViewerColumn col = createTableViewerColumn(titles[0], bounds[0], 0);
    col.setLabelProvider(new ColumnLabelProvider() {
       public String getText(Object element) {
          if(element instanceof AplotResultsDataModel.ResultsData) {
             return ((AplotResultsDataModel.ResultsData)element).getItemId();
          }          
          return super.getText(element); 
       }
    }); 
  
    col = createTableViewerColumn(titles[1], bounds[1], 1);
    col.setLabelProvider(new ColumnLabelProvider() {
       public String getText(Object element) {
          if(element instanceof AplotResultsDataModel.ResultsData) {
             return ((AplotResultsDataModel.ResultsData)element).getRevId();
          }          
          return super.getText(element); 
       }
    });    --ETC
  </code></pre>