title: update CheckBoxTreeCell styles from outside process
body: <p>I am building my first javafx (2.2) application.  The user selects a number of tasks to execute, by selecting checkboxes in a treeview.</p>
  
  <p>I am trying to figure out how, after a task completes, to change the style of the related TreeCell.</p>
  
  <pre><code>public class WorkbenchSscce extends Application {
  
      public static void main(String...args) {
  
          launch(args);
      }
  
      @Override
      public void start(Stage stage) throws Exception {
  
          final CheckBoxTreeItem&lt;String&gt; rootNode = new CheckBoxTreeItem&lt;&gt;("parent");
          final CheckBoxTreeItem&lt;String&gt; taskOne = new CheckBoxTreeItem&lt;&gt;("task one");
          final CheckBoxTreeItem&lt;String&gt; taskTwo = new CheckBoxTreeItem&lt;&gt;("task two");
          rootNode.getChildren().addAll(taskOne, taskTwo);
  
          TreeView&lt;String&gt; treeView = new TreeView&lt;&gt;(rootNode);
          treeView.setEditable(true);
          treeView.setCellFactory(CheckBoxTreeCell.&lt;String&gt;forTreeView());
          treeView.setShowRoot(false);
  
          Button executeButton = new Button("Execute");
          executeButton.setOnMouseClicked(new EventHandler&lt;MouseEvent&gt;() {
  
              @Override
              public void handle(MouseEvent mouseEvent) {
  
                  if (taskOne.isSelected()) {
                      executeTask(1);
                      /**
                       * ?????
                       * give the TreeCell for taskOne a green background, to indicate it is complete
                       * ?????
                       */
                  }
                  if (taskTwo.isSelected()) {
                      executeTask(2);
                      /**
                       * ?????
                       * give the TreeCell for taskTwo a green background, to indicate it is complete
                       * ?????
                       */
                  }
              }
          });
          VBox box = new VBox();
          box.getChildren().addAll(treeView, executeButton);
          Scene scene = new Scene(box);
          stage.setScene(scene);
          stage.show();
      }
  
      public void executeTask(int input) {
  
          // do something
      }
  }
  </code></pre>
  
  <p>I can see how to style the CheckBoxTreeCells at creation time.</p>
  
  <p>I see how to change styles when <em>user</em> events happen to the TreeView (using EventListeners).  </p>
  
  <p>But I can't see how to style a tree cell when the source of the event is internal to the application.  See comments in the MouseEvent handler above.</p>