Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Grid renderer to be aware of editor started or not.
Grid renderer to be aware of editor started or not. [message #49289] Wed, 13 February 2008 10:55 Go to next message
Eclipse User
Originally posted by: svo.ciklum.net

Hi,

We're working on our custom cell renderer for grid, and we need to be
aware of editor, if it's started or not, to make visual adjustments. How
can I get this information from renderer code, if we use GridTableViewer
for creating and maintaining the grid?

Regards,
Stanislav
Re: Grid renderer to be aware of editor started or not. [message #49331 is a reply to message #49289] Wed, 13 February 2008 10:58 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5244
Registered: July 2009
Senior Member
Stanislav Vodetskyi schrieb:
> Hi,
>
> We're working on our custom cell renderer for grid, and we need to be
> aware of editor, if it's started or not, to make visual adjustments. How
> can I get this information from renderer code, if we use GridTableViewer
> for creating and maintaining the grid?
>
> Regards,
> Stanislav

ColumnViewer#isEditorActive()?

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Grid renderer to be aware of editor started or not. [message #49361 is a reply to message #49331] Wed, 13 February 2008 11:28 Go to previous messageGo to next message
Eclipse User
Originally posted by: svo.ciklum.net

Hi,

Sorry, I was not clear enough. We need to know, if editing is started in
the cell, which is currently being processed by renderer. Moreover, we
are using 3.3 API - 'ViewerColumn.setEditingSupport()' to assign cell
editors.

Stanislav

Tom Schindl wrote:
> Stanislav Vodetskyi schrieb:
>> Hi,
>>
>> We're working on our custom cell renderer for grid, and we need to be
>> aware of editor, if it's started or not, to make visual adjustments.
>> How can I get this information from renderer code, if we use
>> GridTableViewer for creating and maintaining the grid?
>>
>> Regards,
>> Stanislav
>
> ColumnViewer#isEditorActive()?
>
> Tom
>
Re: Grid renderer to be aware of editor started or not. [message #49391 is a reply to message #49361] Wed, 13 February 2008 12:15 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5244
Registered: July 2009
Senior Member
Stanislav Vodetskyi schrieb:
> Hi,
>
> Sorry, I was not clear enough. We need to know, if editing is started in
> the cell, which is currently being processed by renderer. Moreover, we
> are using 3.3 API - 'ViewerColumn.setEditingSupport()' to assign cell
> editors.
>

So you need to know if the active editor is exactly in the cell?
I think you need to track this your own:

A) By overloading:
- EditingSupport#initializeCellEditorValue
- EditingSupport#saveCellEditorValue
and tracking the current activate cell-editor

B) Registering yourself as a listener to ColumnViewerEditor
and tracking the current activate cell-editor

C) Using reflection and accessing the private-var cell in
ColumnViewerEditor

D) If you have turned on Cell-Navigation you could:
1. Test if a CellEditor is active
2. Calling GridViewer#getFocusCell()

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Grid renderer to be aware of editor started or not. [message #49421 is a reply to message #49391] Wed, 13 February 2008 12:26 Go to previous message
Eclipse User
Originally posted by: svo.ciklum.net

Hi,

Thanks a lot! :)

Stanislav

Tom Schindl wrote:
> Stanislav Vodetskyi schrieb:
>> Hi,
>>
>> Sorry, I was not clear enough. We need to know, if editing is started
>> in the cell, which is currently being processed by renderer. Moreover,
>> we are using 3.3 API - 'ViewerColumn.setEditingSupport()' to assign
>> cell editors.
>>
>
> So you need to know if the active editor is exactly in the cell?
> I think you need to track this your own:
>
> A) By overloading:
> - EditingSupport#initializeCellEditorValue
> - EditingSupport#saveCellEditorValue
> and tracking the current activate cell-editor
>
> B) Registering yourself as a listener to ColumnViewerEditor
> and tracking the current activate cell-editor
>
> C) Using reflection and accessing the private-var cell in
> ColumnViewerEditor
>
> D) If you have turned on Cell-Navigation you could:
> 1. Test if a CellEditor is active
> 2. Calling GridViewer#getFocusCell()
>
> Tom
>
Re: Grid renderer to be aware of editor started or not. [message #588555 is a reply to message #49289] Wed, 13 February 2008 10:58 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5244
Registered: July 2009
Senior Member
Stanislav Vodetskyi schrieb:
> Hi,
>
> We're working on our custom cell renderer for grid, and we need to be
> aware of editor, if it's started or not, to make visual adjustments. How
> can I get this information from renderer code, if we use GridTableViewer
> for creating and maintaining the grid?
>
> Regards,
> Stanislav

ColumnViewer#isEditorActive()?

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Grid renderer to be aware of editor started or not. [message #588567 is a reply to message #49331] Wed, 13 February 2008 11:28 Go to previous message
blutkind  is currently offline blutkind
Messages: 25
Registered: July 2009
Junior Member
Hi,

Sorry, I was not clear enough. We need to know, if editing is started in
the cell, which is currently being processed by renderer. Moreover, we
are using 3.3 API - 'ViewerColumn.setEditingSupport()' to assign cell
editors.

Stanislav

Tom Schindl wrote:
> Stanislav Vodetskyi schrieb:
>> Hi,
>>
>> We're working on our custom cell renderer for grid, and we need to be
>> aware of editor, if it's started or not, to make visual adjustments.
>> How can I get this information from renderer code, if we use
>> GridTableViewer for creating and maintaining the grid?
>>
>> Regards,
>> Stanislav
>
> ColumnViewer#isEditorActive()?
>
> Tom
>
Re: Grid renderer to be aware of editor started or not. [message #588571 is a reply to message #49361] Wed, 13 February 2008 12:15 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5244
Registered: July 2009
Senior Member
Stanislav Vodetskyi schrieb:
> Hi,
>
> Sorry, I was not clear enough. We need to know, if editing is started in
> the cell, which is currently being processed by renderer. Moreover, we
> are using 3.3 API - 'ViewerColumn.setEditingSupport()' to assign cell
> editors.
>

So you need to know if the active editor is exactly in the cell?
I think you need to track this your own:

A) By overloading:
- EditingSupport#initializeCellEditorValue
- EditingSupport#saveCellEditorValue
and tracking the current activate cell-editor

B) Registering yourself as a listener to ColumnViewerEditor
and tracking the current activate cell-editor

C) Using reflection and accessing the private-var cell in
ColumnViewerEditor

D) If you have turned on Cell-Navigation you could:
1. Test if a CellEditor is active
2. Calling GridViewer#getFocusCell()

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Grid renderer to be aware of editor started or not. [message #588578 is a reply to message #49391] Wed, 13 February 2008 12:26 Go to previous message
blutkind  is currently offline blutkind
Messages: 25
Registered: July 2009
Junior Member
Hi,

Thanks a lot! :)

Stanislav

Tom Schindl wrote:
> Stanislav Vodetskyi schrieb:
>> Hi,
>>
>> Sorry, I was not clear enough. We need to know, if editing is started
>> in the cell, which is currently being processed by renderer. Moreover,
>> we are using 3.3 API - 'ViewerColumn.setEditingSupport()' to assign
>> cell editors.
>>
>
> So you need to know if the active editor is exactly in the cell?
> I think you need to track this your own:
>
> A) By overloading:
> - EditingSupport#initializeCellEditorValue
> - EditingSupport#saveCellEditorValue
> and tracking the current activate cell-editor
>
> B) Registering yourself as a listener to ColumnViewerEditor
> and tracking the current activate cell-editor
>
> C) Using reflection and accessing the private-var cell in
> ColumnViewerEditor
>
> D) If you have turned on Cell-Navigation you could:
> 1. Test if a CellEditor is active
> 2. Calling GridViewer#getFocusCell()
>
> Tom
>
Previous Topic:Grid renderer to be aware of editor started or not.
Next Topic:CDateTime Enhancment? Style setting to make past dates not selectable
Goto Forum:
  


Current Time: Fri Jul 25 16:53:31 EDT 2014

Powered by FUDForum. Page generated in 0.02428 seconds