Allow editing of cell in table only on double-click [message #651901] |
Tue, 01 February 2011 18:31  |
Eclipse User |
|
|
|
Hi,
I have a table that allows its cells to be modified by the user. The
problem is that the cell becomes editable as soon as the user clicks on
a row which is not desirable: I would prefer that a single-click select
the rows and that a double-click allows to edit the cell. Is that
possible with RAP? It seems that I could prevent editing on a single
click by overrinding ColumnViewerEditorActivationStrategy but in RAP I
don't have the number of time a button was clicked. Am I missing
something simple here?
Thanks for any tips,
Jean Bovet
|
|
|
|
Re: Allow editing of cell in table only on double-click [message #652135 is a reply to message #651972] |
Wed, 02 February 2011 12:50  |
Eclipse User |
|
|
|
Ah, perfect, that works like a charm. Thanks.
Jean
On 2011-02-02 02:17:53 -0800, Ivan Furnadjiev said:
> Hi Jean,
> you have to create your own class that extends
> ColumnViewerEditorActivationStrategy and override the method
> isEditorActivationEvent.
> Look at ColumnViewerEditorActivationStrategy#isEditorActivationEvent
> and replace ColumnViewerEditorActivationEvent#MOUSE_CLICK_SELECTION
> with ColumnViewerEditorActivationEvent#MOUSE_DOUBLE_CLICK_SELECTI ON.
> This should work.
> Best,
> Ivan
>
> On 2/2/2011 1:31 AM, Jean Bovet wrote:
>> Hi,
>>
>> I have a table that allows its cells to be modified by the user. The
>> problem is that the cell becomes editable as soon as the user clicks on
>> a row which is not desirable: I would prefer that a single-click select
>> the rows and that a double-click allows to edit the cell. Is that
>> possible with RAP? It seems that I could prevent editing on a single
>> click by overrinding ColumnViewerEditorActivationStrategy but in RAP I
>> don't have the number of time a button was clicked. Am I missing
>> something simple here?
>>
>> Thanks for any tips,
>>
>> Jean Bovet
|
|
|
Powered by
FUDForum. Page generated in 0.10645 seconds