Skip to main content



      Home
Home » Eclipse Projects » Nebula » Issue in triggering editing activation with ColumnViewerEditorActivationStrategy
Issue in triggering editing activation with ColumnViewerEditorActivationStrategy [message #44845] Mon, 17 December 2007 01:05 Go to next message
Eclipse UserFriend
Hello,

In our RCP application we are making use of GridTableViewer for the grid
represntation. And few columns in the grid are editable. We are making use
of 'ColumnViewerEditorActivationStrategy' to trigger the editing
activation.

I need to enter the editing mode in cell on key pressed(which am able to
using the below code...)
ColumnViewerEditorActivationStrategy actSupport = new
ColumnViewerEditorActivationStrategy(gridViewer) {
protected boolean isEditorActivationEvent(
ColumnViewerEditorActivationEvent event) {
return ( event.eventType ==
ColumnViewerEditorActivationEvent.KEY_PRESSED);
}
};

And using this 'actSupport am creating the GridViewerEditor.

Problem here is, the first keystroke is used to make the cell to enter
into editing mode, because of which am loosing the first key entered and
all the characters after 2nd will be entered in the cell. Is there anyway
to trigger the actvation in cell on any key pressed event, without loosing
the first character?!


Thanks & Regards,
Supreetha H R
Re: Issue in triggering editing activation with ColumnViewerEditorActivationStrategy [message #44912 is a reply to message #44845] Mon, 17 December 2007 03:51 Go to previous message
Eclipse UserFriend
The triggering event is passed on to the
CellEditor#activate(ColumnViewerEditorActivationEvent) whose default
implementation is to simply activate the editor. You'll have to subclass
e.g. TextCellEditor and do something meaningful in this method.

Tom

Supreetha H R schrieb:
> Hello,
>
> In our RCP application we are making use of GridTableViewer for the grid
> represntation. And few columns in the grid are editable. We are making
> use of 'ColumnViewerEditorActivationStrategy' to trigger the editing
> activation.
> I need to enter the editing mode in cell on key pressed(which am able to
> using the below code...)
> ColumnViewerEditorActivationStrategy actSupport =
> new
> ColumnViewerEditorActivationStrategy(gridViewer) {
> protected boolean isEditorActivationEvent(
> ColumnViewerEditorActivationEvent event) {
> return ( event.eventType ==
> ColumnViewerEditorActivationEvent.KEY_PRESSED);
> }
> };
>
> And using this 'actSupport am creating the GridViewerEditor.
>
> Problem here is, the first keystroke is used to make the cell to enter
> into editing mode, because of which am loosing the first key entered and
> all the characters after 2nd will be entered in the cell. Is there
> anyway to trigger the actvation in cell on any key pressed event,
> without loosing the first character?!
>
> Thanks & Regards,
> Supreetha H R
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Issue in triggering editing activation with ColumnViewerEditorActivationStrategy [message #587025 is a reply to message #44845] Mon, 17 December 2007 03:51 Go to previous message
Eclipse UserFriend
The triggering event is passed on to the
CellEditor#activate(ColumnViewerEditorActivationEvent) whose default
implementation is to simply activate the editor. You'll have to subclass
e.g. TextCellEditor and do something meaningful in this method.

Tom

Supreetha H R schrieb:
> Hello,
>
> In our RCP application we are making use of GridTableViewer for the grid
> represntation. And few columns in the grid are editable. We are making
> use of 'ColumnViewerEditorActivationStrategy' to trigger the editing
> activation.
> I need to enter the editing mode in cell on key pressed(which am able to
> using the below code...)
> ColumnViewerEditorActivationStrategy actSupport =
> new
> ColumnViewerEditorActivationStrategy(gridViewer) {
> protected boolean isEditorActivationEvent(
> ColumnViewerEditorActivationEvent event) {
> return ( event.eventType ==
> ColumnViewerEditorActivationEvent.KEY_PRESSED);
> }
> };
>
> And using this 'actSupport am creating the GridViewerEditor.
>
> Problem here is, the first keystroke is used to make the cell to enter
> into editing mode, because of which am loosing the first key entered and
> all the characters after 2nd will be entered in the cell. Is there
> anyway to trigger the actvation in cell on any key pressed event,
> without loosing the first character?!
>
> Thanks & Regards,
> Supreetha H R
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Previous Topic:Right click event if not fired on DialogCellEditor
Next Topic:How to override keyboard navigation in the Grid?
Goto Forum:
  


Current Time: Tue Jun 17 03:17:22 EDT 2025

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

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

Back to the top