pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Möbius <dmoeb...@scoop-gmbh.de>
Subject Displaying a button in a TableView
Date Fri, 09 Apr 2010 10:06:03 GMT
In my applications it is a _very frequent_ requirement to display  
detail info when the user clicks a certain table cell. Somewhat like  
master/detail, but the details shouldn't show up if the whole table  
_row_ is selected but a particular _cell_. If the user clicks another  
cell, other details should be shown. Also, the user should get some  
visual feedback that some of the cells are "clickable", while others  
are not.

So I would preferably use a LinkButton for those kind of cells, but it  
seems there's no easy way to display a LinkButton as a cell in a  
TableView. I can write a custom CellRenderer that extends LinkButton  
and it displays correctly, but there is no behaviour: the button  
doesn't "hover" on mouse-over, and actions attached to it do not fire.

Apparently, Pivot is following the "rubber stamp" cell renderer  
approach of Swing, which is good for performance, but makes it hard to  
embed real components inside a TableView.

I already tried the common Swing trick to set the LinkButton as cell  
editor and to enter edit mode automatically when the mouse enters the  
table (and to cancel the edit when the mouse leaves the LinkButton).  
But this doesn't work very well. Is there an easier way?

Thanks in advance.
Dirk Möbius

View raw message