Issue in triggering editing activation with ColumnViewerEditorActivationStrategy [message #44845] |
Mon, 17 December 2007 01:05  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
------------------------------------------------------------ --------
|
|
|
Powered by
FUDForum. Page generated in 0.04680 seconds