isSelected always returns 'false' for TableColumn cell factories

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • 7u6
    • Affects Version/s: fx2.1
    • Component/s: javafx
    • Environment:

      Javafx 2.1, Netbeans 7.1.2

      In this cell factory for a TableView column:

      public class NameFormatCell extends TableCell<Room,String> {

           public NameFormatCell() { }
             
           @Override protected void updateItem(final String item, boolean empty) {
               
               super.updateItem(item, empty);
               
               if (item != null) {
                   setText(item);
                   
                   setTextFill(isSelected() ? Color.WHITE : Color.BLACK);
                   setFont(Font.font("Segoe UI", FontWeight.BOLD, 18));
               }
           }
       }

      The cell always displays in Black, even if the row is selected in the TableView.

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

              Created:
              Updated:
              Resolved:
              Imported: