pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: TableView.CellRenderer action panel
Date Tue, 07 Jul 2009 21:07:22 GMT
> So the question is, is there a simpler way to attach listeners to  
> cellrenderer components?

No. Since the renderers aren't really "there" (they are not part of  
the component hierarchy), they don't receive mouse events. You can do  
this by listening for mouse events on the TableView itself and  
translating to the renderer space. When the table view is in a scroll  
pane, you can use the getScrollTop() and getScrollLeft() methods of  
ScrollPane to determine the offset into the table view's coordinate  
space.

Alternatively, if you are finding that you need to embed components in  
your table view, maybe you should consider using a TablePane instead.  
If the data is static (or nearly so) and you don't have a large number  
of rows, TablePane may be a better alternative.



Mime
View raw message