title: How do I add a Tooltip to a rectangular region of a JavaFX Canvas
body: <p>In my JavaFX app I have a <code>TableView</code> with multiple columns, one of which displays data in a graphical form. To do this I have created a <code>CanvasCell</code> object that creates and manages its own <code>Canvas</code> to deal with the drawing. The drawing part works just fine.</p>
  
  <p>I'd now like to put <code>Tooltips</code> over some regions within the <code>Canvas</code>/<code>Cell</code>. There may be multiple <code>Tooltips</code> per <code>Cell</code> (which prevents me from adding the <code>Tooltip</code> at the <code>Cell</code> level) and they should only trigger in specific regions of the graph. However, I'm not managing to get it functioning at all. I don't seem to understand the interactions of Display Node hierarchy well enough (read "at all") to be able to place the <code>Tooltip</code> anywhere where it will actually work.</p>
  
  <p>Documentation for JavaFX is sparse and Google + SO has come up blank for all searches that I've tried. Is there anyone who knows how to do this sort of thing or should I just write it off as "not an option" for now.</p>
  
  <p>For info, the <code>CanvasCell</code> calls a <code>draw()</code> function inside an extended <code>Canvas</code> object on <code>updateItem()</code>. The code in which I've tried to create a <code>Tooltip</code> sits inside that <code>draw()</code> function and looks like:</p>
  
  <pre><code>    Rectangle rect = new Rectangle(leftVal, topVal, width, height);
      gc.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight());
      Tooltip tooltip = new Tooltip("Tooltip Text");
      Tooltip.install(rect, tooltip);
  </code></pre>
  
  <p>but that code was written more in hope than anything else and doesn't generate anything useful in the interface.</p>
  
  <p>If someone can point me in the right direction, I will be very grateful.</p>