Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Allow editing of cell in table only on double-click
Allow editing of cell in table only on double-click [message #651901] Tue, 01 February 2011 23:31 Go to next message
Jean Bovet is currently offline Jean BovetFriend
Messages: 34
Registered: September 2009
Member
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 #651972 is a reply to message #651901] Wed, 02 February 2011 10:17 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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
>
Re: Allow editing of cell in table only on double-click [message #652135 is a reply to message #651972] Wed, 02 February 2011 17:50 Go to previous message
Jean Bovet is currently offline Jean BovetFriend
Messages: 34
Registered: September 2009
Member
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
Previous Topic:RAP 1.4 M5 - Keybindings
Next Topic:Ask about required bundle
Goto Forum:
  


Current Time: Thu Apr 25 19:21:01 GMT 2024

Powered by FUDForum. Page generated in 0.02991 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top