Home » Eclipse Projects » Eclipse Platform » Focus traversal and editable table cells
Focus traversal and editable table cells [message #320908] |
Wed, 03 October 2007 13:43  |
Eclipse User |
|
|
|
Originally posted by: eclipse6.rizzoweb.com
I've got a table with several editable columns, one of which uses a
CheckboxCellEditor. Because the CheckboxCellEditor has no Control, when
the focus is traversed into it, it just vanishes and no further keyboard
focus traversal works.
I'm trying to understand the new APIs in this area (TableViewerEditor,
ColumnViewerEditorActivationStrategy, etc) but they are poorly
documented and the snippets don't provide much help.
Any advice on getting sensible keyboard traversal of cell editors when a
CheckboxCellEditor (or other "invisible" CellEditor) is involved?
TIA,
Eric
|
|
| |
Re: Focus traversal and editable table cells [message #320925 is a reply to message #320910] |
Wed, 03 October 2007 17:34   |
Eclipse User |
|
|
|
Originally posted by: eclipse6.rizzoweb.com
Tom Schindl wrote:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=198502 Maybe you could
> mimic this your own somehow. As you notice the trick is to add a
> TraverseListener to the Tree/Table.
I tried looking at the final patch, but it is difficult to interpret
without actually applying it (which requires a check-out of JFace from
HEAD, IIUC). Can you give more detail about what is required to
implement the same thing in 3.3?
Thanks,
Eric
> Eric Rizzo schrieb:
>> I've got a table with several editable columns, one of which uses a
>> CheckboxCellEditor. Because the CheckboxCellEditor has no Control,
>> when the focus is traversed into it, it just vanishes and no further
>> keyboard focus traversal works.
>> I'm trying to understand the new APIs in this area (TableViewerEditor,
>> ColumnViewerEditorActivationStrategy, etc) but they are poorly
>> documented and the snippets don't provide much help.
>>
>> Any advice on getting sensible keyboard traversal of cell editors when
>> a CheckboxCellEditor (or other "invisible" CellEditor) is involved?
>>
>> TIA,
>> Eric
>
>
|
|
|
Re: Focus traversal and editable table cells [message #320935 is a reply to message #320925] |
Thu, 04 October 2007 02:53   |
Eclipse User |
|
|
|
The trick is fairly simple but you may have to use reflection because I
think some of the methods you'll have to access are package scoped:
1. Attach a TraverseListener to your Table/Tree
2. In the TraverseListener check the current editor and if it is a
CheckBoxCellEditor move open the next editor (from the out-side easily
with TableViewer/TreeViewer#editElement)
Tom
Eric Rizzo schrieb:
> Tom Schindl wrote:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=198502 Maybe you could
>> mimic this your own somehow. As you notice the trick is to add a
>> TraverseListener to the Tree/Table.
>
> I tried looking at the final patch, but it is difficult to interpret
> without actually applying it (which requires a check-out of JFace from
> HEAD, IIUC). Can you give more detail about what is required to
> implement the same thing in 3.3?
>
> Thanks,
> Eric
>
>
>> Eric Rizzo schrieb:
>>> I've got a table with several editable columns, one of which uses a
>>> CheckboxCellEditor. Because the CheckboxCellEditor has no Control,
>>> when the focus is traversed into it, it just vanishes and no further
>>> keyboard focus traversal works.
>>> I'm trying to understand the new APIs in this area
>>> (TableViewerEditor, ColumnViewerEditorActivationStrategy, etc) but
>>> they are poorly documented and the snippets don't provide much help.
>>>
>>> Any advice on getting sensible keyboard traversal of cell editors
>>> when a CheckboxCellEditor (or other "invisible" CellEditor) is involved?
>>>
>>> TIA,
>>> Eric
>>
>>
--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
|
|
|
Re: Focus traversal and editable table cells [message #320976 is a reply to message #320935] |
Thu, 04 October 2007 13:57   |
Eclipse User |
|
|
|
Originally posted by: eclipse6.rizzoweb.com
Tom Schindl wrote:
> The trick is fairly simple but you may have to use reflection because I
> think some of the methods you'll have to access are package scoped:
>
> 1. Attach a TraverseListener to your Table/Tree
> 2. In the TraverseListener check the current editor and if it is a
> CheckBoxCellEditor move open the next editor (from the out-side easily
> with TableViewer/TreeViewer#editElement)
Unfortunately, that won't do - the checkbox cell should not be skipped
with keyboard traversal, I need it to actually hold the focus (and
respond to Space or Enter key by toggling the value).
I have to say, even with the new 3.3 table editing APIs, inline editable
tables feel like a bastard child of SWT/JFace. My client has pretty
basic requirements but I am having a very hard time finding solutions
that work even close to what they expect. I suspect that the reason this
kind of thing is not as easy or straightforward as the rest of SWT/JFace
is because there aren't any totally editable tables in the Eclipse
"core" plugins themselves. Since no Eclipse developers are doing
editable tables it sort-of explains why the functinality is not all
there. Sad, though - my client is somewhat losing faith in Eclipse UI
libraries because of these limitations, despite all the good things that
are provided in SWT+JFace+Forms.
Eric
> Eric Rizzo schrieb:
>> Tom Schindl wrote:
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=198502 Maybe you could
>>> mimic this your own somehow. As you notice the trick is to add a
>>> TraverseListener to the Tree/Table.
>>
>> I tried looking at the final patch, but it is difficult to interpret
>> without actually applying it (which requires a check-out of JFace from
>> HEAD, IIUC). Can you give more detail about what is required to
>> implement the same thing in 3.3?
>>
>> Thanks,
>> Eric
>>
>>
>>> Eric Rizzo schrieb:
>>>> I've got a table with several editable columns, one of which uses a
>>>> CheckboxCellEditor. Because the CheckboxCellEditor has no Control,
>>>> when the focus is traversed into it, it just vanishes and no further
>>>> keyboard focus traversal works.
>>>> I'm trying to understand the new APIs in this area
>>>> (TableViewerEditor, ColumnViewerEditorActivationStrategy, etc) but
>>>> they are poorly documented and the snippets don't provide much help.
>>>>
>>>> Any advice on getting sensible keyboard traversal of cell editors
>>>> when a CheckboxCellEditor (or other "invisible" CellEditor) is
>>>> involved?
>>>>
>>>> TIA,
>>>> Eric
>>>
>>>
>
>
|
|
| |
Re: Focus traversal and editable table cells [message #320981 is a reply to message #320978] |
Thu, 04 October 2007 14:37   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------070009030607020702010906
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Tom,
For the properties view, we've had to use your combo with true false
approach. I was hoping to make double click be a simple way to toggle
it, but that doesn't work.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=182196
I just added a vote for it.
Tom Schindl wrote:
> Eric Rizzo schrieb:
>> Tom Schindl wrote:
>>> The trick is fairly simple but you may have to use reflection
>>> because I think some of the methods you'll have to access are
>>> package scoped:
>>>
>>> 1. Attach a TraverseListener to your Table/Tree
>>> 2. In the TraverseListener check the current editor and if it is a
>>> CheckBoxCellEditor move open the next editor (from the out-side
>>> easily with TableViewer/TreeViewer#editElement)
>>
>> Unfortunately, that won't do - the checkbox cell should not be
>> skipped with keyboard traversal, I need it to actually hold the focus
>> (and respond to Space or Enter key by toggling the value).
>>
>
> But it isn't skipped only because you are adding a TraverseListener
> the editor is still active! At least the last time I tried my patch it
> worked this way in Snippet26.
>
>> I have to say, even with the new 3.3 table editing APIs, inline
>> editable tables feel like a bastard child of SWT/JFace. My client has
>> pretty basic requirements but I am having a very hard time finding
>> solutions that work even close to what they expect. I suspect that
>> the reason this kind of thing is not as easy or straightforward as
>> the rest of SWT/JFace is because there aren't any totally editable
>> tables in the Eclipse "core" plugins themselves. Since no Eclipse
>> developers are doing editable tables it sort-of explains why the
>> functinality is not all there. Sad, though - my client is somewhat
>> losing faith in Eclipse UI libraries because of these limitations,
>> despite all the good things that are provided in SWT+JFace+Forms.
>>
>
> I'm sad that we couldn't address all your needs in 3.3 but we are
> improving or at least are trying to. Where are the other problems you
> are facing with editing that makes you think inline-Editing is a
> bastard child of JFace. If you point out the areas we should improve
> I'm more than willing to do so (although JFace is not my daytime job
> I'm one of guys responsible to push it further).
>
> Maybe you could think of an alternate implementation of
> CheckboxCellEditor (e.g. a true/false DropDown comes to my mind or a
> reimplementation of CheckBoxCellEditor with Button() now that you can
> adjust line heights in Tables/Trees.
>
> Tom
>
--------------070009030607020702010906
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Tom,<br>
<br>
For the properties view, we've had to use your combo with true false
approach. I was hoping to make double click be a simple way to toggle
it, but that doesn't work.<br>
<blockquote><a
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182196">https://bugs.eclipse.org/bugs/show_bug.cgi?id=182196</a><br>
</blockquote>
I just added a vote for it.<br>
<br>
<br>
Tom Schindl wrote:
<blockquote cite="mid:fe3ard$v2o$1@build.eclipse.org" type="cite">Eric
Rizzo schrieb:
<br>
<blockquote type="cite">Tom Schindl wrote:
<br>
<blockquote type="cite">The trick is fairly simple but you may have
to use reflection because I think some of the methods you'll have to
access are package scoped:
<br>
<br>
1. Attach a TraverseListener to your Table/Tree
<br>
2. In the TraverseListener check the current editor and if it is a
CheckBoxCellEditor move open the next editor (from the out-side easily
with TableViewer/TreeViewer#editElement)
<br>
</blockquote>
<br>
Unfortunately, that won't do - the checkbox cell should not be skipped
with keyboard traversal, I need it to actually hold the focus (and
respond to Space or Enter key by toggling the value).
<br>
<br>
</blockquote>
<br>
But it isn't skipped only because you are adding a TraverseListener the
editor is still active! At least the last time I tried my patch it
worked this way in Snippet26.
<br>
<br>
<blockquote type="cite">I have to say, even with the new 3.3 table
editing APIs, inline editable tables feel like a bastard child of
SWT/JFace. My client has pretty basic requirements but I am having a
very hard time finding solutions that work even close to what they
expect. I suspect that the reason this kind of thing is not as easy or
straightforward as the rest of SWT/JFace is because there aren't any
totally editable tables in the Eclipse "core" plugins themselves. Since
no Eclipse developers are doing editable tables it sort-of explains why
the functinality is not all there. Sad, though - my client is somewhat
losing faith in Eclipse UI libraries because of these limitations,
despite all the good things that are provided in SWT+JFace+Forms.
<br>
<br>
</blockquote>
<br>
I'm sad that we couldn't address all your needs in 3.3 but we are
improving or at least are trying to. Where are the other problems you
are facing with editing that makes you think inline-Editing is a
bastard child of JFace. If you point out the areas we should improve
I'm more than willing to do so (although JFace is not my daytime job
I'm one of guys responsible to push it further).
<br>
<br>
Maybe you could think of an alternate implementation of
CheckboxCellEditor (e.g. a true/false DropDown comes to my mind or a
reimplementation of CheckBoxCellEditor with Button() now that you can
adjust line heights in Tables/Trees.
<br>
<br>
Tom
<br>
<br>
</blockquote>
<br>
</body>
</html>
--------------070009030607020702010906--
|
|
| |
Re: Focus traversal and editable table cells [message #320992 is a reply to message #320981] |
Thu, 04 October 2007 15:31   |
Eclipse User |
|
|
|
I've just uploaded a snippet and improved the patch for Bug 198502. The
trick is that one needs a CellFocusManager to make the whole thing work.
Tom
Ed Merks schrieb:
> Tom,
>
> For the properties view, we've had to use your combo with true false
> approach. I was hoping to make double click be a simple way to toggle
> it, but that doesn't work.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=182196
>
> I just added a vote for it.
>
>
> Tom Schindl wrote:
>> Eric Rizzo schrieb:
>>> Tom Schindl wrote:
>>>> The trick is fairly simple but you may have to use reflection
>>>> because I think some of the methods you'll have to access are
>>>> package scoped:
>>>>
>>>> 1. Attach a TraverseListener to your Table/Tree
>>>> 2. In the TraverseListener check the current editor and if it is a
>>>> CheckBoxCellEditor move open the next editor (from the out-side
>>>> easily with TableViewer/TreeViewer#editElement)
>>>
>>> Unfortunately, that won't do - the checkbox cell should not be
>>> skipped with keyboard traversal, I need it to actually hold the focus
>>> (and respond to Space or Enter key by toggling the value).
>>>
>>
>> But it isn't skipped only because you are adding a TraverseListener
>> the editor is still active! At least the last time I tried my patch it
>> worked this way in Snippet26.
>>
>>> I have to say, even with the new 3.3 table editing APIs, inline
>>> editable tables feel like a bastard child of SWT/JFace. My client has
>>> pretty basic requirements but I am having a very hard time finding
>>> solutions that work even close to what they expect. I suspect that
>>> the reason this kind of thing is not as easy or straightforward as
>>> the rest of SWT/JFace is because there aren't any totally editable
>>> tables in the Eclipse "core" plugins themselves. Since no Eclipse
>>> developers are doing editable tables it sort-of explains why the
>>> functinality is not all there. Sad, though - my client is somewhat
>>> losing faith in Eclipse UI libraries because of these limitations,
>>> despite all the good things that are provided in SWT+JFace+Forms.
>>>
>>
>> I'm sad that we couldn't address all your needs in 3.3 but we are
>> improving or at least are trying to. Where are the other problems you
>> are facing with editing that makes you think inline-Editing is a
>> bastard child of JFace. If you point out the areas we should improve
>> I'm more than willing to do so (although JFace is not my daytime job
>> I'm one of guys responsible to push it further).
>>
>> Maybe you could think of an alternate implementation of
>> CheckboxCellEditor (e.g. a true/false DropDown comes to my mind or a
>> reimplementation of CheckBoxCellEditor with Button() now that you can
>> adjust line heights in Tables/Trees.
>>
>> Tom
>>
>
--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
|
|
| | |
Re: Focus traversal and editable table cells [message #321003 is a reply to message #320978] |
Thu, 04 October 2007 18:02   |
Eclipse User |
|
|
|
Originally posted by: eclipse6.rizzoweb.com
Tom Schindl wrote:
> Eric Rizzo schrieb:
>> I have to say, even with the new 3.3 table editing APIs, inline
>> editable tables feel like a bastard child of SWT/JFace. My client has
>> pretty basic requirements but I am having a very hard time finding
>> solutions that work even close to what they expect. I suspect that the
>> reason this kind of thing is not as easy or straightforward as the
>> rest of SWT/JFace is because there aren't any totally editable tables
>> in the Eclipse "core" plugins themselves. Since no Eclipse developers
>> are doing editable tables it sort-of explains why the functinality is
>> not all there. Sad, though - my client is somewhat losing faith in
>> Eclipse UI libraries because of these limitations, despite all the
>> good things that are provided in SWT+JFace+Forms.
>>
>
> I'm sad that we couldn't address all your needs in 3.3 but we are
> improving or at least are trying to. Where are the other problems you
> are facing with editing that makes you think inline-Editing is a bastard
> child of JFace. If you point out the areas we should improve I'm more
> than willing to do so (although JFace is not my daytime job I'm one of
> guys responsible to push it further).
I really appreciate the receptive attitude. The bottom line is that we
need a table (lots of them, actually) with various kinds of editable
columns (Text, Combo, Checkbox, and "clickable icon" (similar to
DialogCellEditor but without the Button)) that is also fully functional
using the keyboard. The client currently has this mostly implemented in
Swing and I am disappointed to not be able to implement the same thing
without patches, hokey reflection code, and hours upon hours of
digging/debugging through the SWT and JFace source code. Even with all
of that, I'm still not there yet (still have to try your latest patch
and snippet - thanks again).
In other words, cell editing works for checkboxes only through
simulation with coordinated LabelProvider, and it totally breaks tabbing
traversal through the cells. Same goes for any cell editor that doesn't
really have a Control to use (although I've managed to work around the
clickable icon case).
I think you're latest snippet might demonstrate what I need - I'll let
you know.
> Maybe you could think of an alternate implementation of
> CheckboxCellEditor (e.g. a true/false DropDown comes to my mind or a
> reimplementation of CheckBoxCellEditor with Button() now that you can
> adjust line heights in Tables/Trees.
I've suggested the drop-down alternative, but the UI designers would
prefer a checkbox and are still willing to pay to work towards that.
Using a Button has the problem that the button look ugly when it renders
next to the column label (a "cehckbox" image) and it requires two clicks
to change the value (my client has an aversion to what they consider
"too many" clicks required to do anything).
Hope this helps to expose the limitations - I think keyboard navigation
and activation is the key here; it works for Text and Combo, but not for
all types of editors.
Eric
|
|
| | | | | | | | |
Re: Focus traversal and editable table cells [message #326782 is a reply to message #326780] |
Tue, 01 April 2008 08:57  |
Eclipse User |
|
|
|
Could you please file a bug against Platform/UI and prefix the summary
with [Snippets].
Tom
Matthias Schoettle schrieb:
> Tom Schindl wrote:
>> I've added the snippet to our collection.
>>
>> Tom
>>
>
> Thank you for this great snippet. It helped me to enable tabbing over my
> CheckBoxCellEditor. Unfortunately I always get a beep-sound (like
> Display.beep()) when tabbing over this editor. This also happens with
> your snippet. Do you know why this happens?
>
> Thanks,
> Matthias
--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
|
|
|
Goto Forum:
Current Time: Wed Mar 19 15:04:39 EDT 2025
Powered by FUDForum. Page generated in 0.05051 seconds
|