Custom TreeCell with cell factory, and background threads
<ol>
<li>How do I make it so the <code>TreeView</code> is populated with <code>ProgressIndicator</code>s while stuff is happening, but without blocking the thread, using a cell factory?</li>
<li>How does <code>TreeItem.setGraphic()</code> differ from <code>TreeCell.setGraphic()</code>?</li>
<li>When I instantiate the <code>TreeItem</code>, I need to set the graphic to a <code>ProgressIndicator</code>, but I'm not sure whether this ought to happen while creating the <code>TreeItem</code> or from the <code>TreeCell.updateItem</code> dumped out by the factory.</li>
<li>I think when using cell factories, <em>all</em> graphical stuff needs to happen there, thus <code>TreeItem.setGraphic</code> is merely a convenience, and I should figure out my problem from within <code>updateItem</code>.</li>
</ol>

<p>I'm doing the file explorer example.  Each item in the <code>TreeView</code> has the value set to a <code>sun.nio.fs.WindowsPath</code>, and is implemented by inheriting from <code>TreeItem</code>.  I override <code>isLeaf()</code> and <code>getChildren()</code>.  The problem is <code>isLeaf()</code> can take a long time on network drives when I'm not plugged into the network.  </p>

<p>So this is what I'm doing to create a new tree item with a path value (not using cell factory yet):</p>

<ol>
<li>Start new thread (using Clojure futures) to check if the path value is a path or file using <code>isRegularFile()</code>.  The result from this is available later when dereferencing the future.</li>
<li>Instantiate instance of anonymous <code>TreeItem</code> derivative (using Clojure proxy).</li>
<li>Call <code>setGraphic()</code> on the new <code>TreeItem</code> instance with a <code>ProgressIndicator()</code>.</li>
<li>Start another thread which checks the result of the first thread.  When the first thread is finished, then based on the value of the leaf function, the first thread sets the appropriate file or folder icon, and calls <code>addEventHandler()</code> with local anonymous functions that change the graphic based on expanded or collapsed.</li>
<li>Return the new instance of <code>TreeItem</code> (from step 2) before either of the new threads is finished.</li>
</ol>

<p>This works and has the effect of putting a swirly graphic at each network drive while <code>isLeaf</code> is running.  But I'm not sure how to do all this when both TreeItem and TreeCell seem to have a <code>setGraphic()</code> function; I'm not sure who "owns" what.  I think the <code>TreeView</code> owns the both the items and the cells, and calling <code>setGraphic()</code> on a <code>TreeItem</code> somehow references the default cell's graphic, when not using a custom cell factory.</p>

<p>I need to figure out how to access the isLeaf value from the cell factory <code>updateItem()</code>, etc. etc.</p>