You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Duto <ol...@pasteur.fr> on 2010/08/01 20:22:10 UTC

PushButton in cell of TableView

I need to know if in the future it's possible to add a PushButton on cell of
TableView. I already done but the button never receive the events ? Or maybe
there is a workaround ?

Best regards

Duto
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/PushButton-in-cell-of-TableView-tp1013752p1013752.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: PushButton in cell of TableView

Posted by Greg Brown <gk...@mac.com>.
Unfortunately it was for an internal app, so I can't share that. But the basic approach is to register a mouse listener on the table view and call getRowAt() to determine which row the mouse is over. You can then call getRowBounds() to determine where to put the popup.

On Aug 2, 2010, at 10:40 AM, Duto wrote:

> 
> I code sample or screenshots or video of your approch ?
> 
> thx in advance  
> 
> Duto
> -- 
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/PushButton-in-cell-of-TableView-tp1013752p1016100.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.


Re: PushButton in cell of TableView

Posted by Duto <ol...@pasteur.fr>.
I code sample or screenshots or video of your approch ?

thx in advance  

Duto
-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/PushButton-in-cell-of-TableView-tp1013752p1016100.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: PushButton in cell of TableView

Posted by Greg Brown <gk...@mac.com>.
Ah, OK. I have recently built an application that uses a similar UI. I display the modifier buttons in a popup window as the user mouses over the table. The buttons are aligned with the row the mouse is currently over. This avoids the need to embed the buttons in the table view and is also visually less "noisy", since the buttons are not repeated for each row.

Might that approach work for you?


On Aug 2, 2010, at 9:02 AM, Olivier Dutrieux wrote:

> Very thanks for your support Greg,
> 
> See on attach file what I need to do : A screenshot is more easy to understood than my bad english :)
> 
> Best regards
> 
> Duto
> 
> Le 02/08/2010 14:07, Greg Brown a écrit :
>> No - as in Swing, Pivot renderers are used for painting only. They don't receive user input.
>> 
>> Can you describe what you are trying to do more specifically? Maybe there is another way you can address it.
>> 
>> On Aug 1, 2010, at 2:22 PM, Duto wrote:
>> 
>>> I need to know if in the future it's possible to add a PushButton on cell of
>>> TableView. I already done but the button never receive the events ? Or maybe
>>> there is a workaround ?
>>> 
>>> Best regards
>>> 
>>> Duto
>>> -- 
>>> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/PushButton-in-cell-of-TableView-tp1013752p1013752.html
>>> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
> <sample.png>


Re: PushButton in cell of TableView

Posted by Olivier Dutrieux <ol...@pasteur.fr>.
  Very thanks for your support Greg,

See on attach file what I need to do : A screenshot is more easy to 
understood than my bad english :)

Best regards

Duto

Le 02/08/2010 14:07, Greg Brown a écrit :
> No - as in Swing, Pivot renderers are used for painting only. They don't receive user input.
>
> Can you describe what you are trying to do more specifically? Maybe there is another way you can address it.
>
> On Aug 1, 2010, at 2:22 PM, Duto wrote:
>
>> I need to know if in the future it's possible to add a PushButton on cell of
>> TableView. I already done but the button never receive the events ? Or maybe
>> there is a workaround ?
>>
>> Best regards
>>
>> Duto
>> -- 
>> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/PushButton-in-cell-of-TableView-tp1013752p1013752.html
>> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: PushButton in cell of TableView

Posted by Greg Brown <gk...@mac.com>.
No - as in Swing, Pivot renderers are used for painting only. They don't receive user input.

Can you describe what you are trying to do more specifically? Maybe there is another way you can address it.

On Aug 1, 2010, at 2:22 PM, Duto wrote:

> 
> I need to know if in the future it's possible to add a PushButton on cell of
> TableView. I already done but the button never receive the events ? Or maybe
> there is a workaround ?
> 
> Best regards
> 
> Duto
> -- 
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/PushButton-in-cell-of-TableView-tp1013752p1013752.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.