Skip to main content



      Home
Home » Eclipse Projects » JFace » CheckBoxTreeViewer and CellEditor combination is buggy
CheckBoxTreeViewer and CellEditor combination is buggy [message #678] Wed, 06 May 2009 06:05 Go to next message
Eclipse UserFriend
Hello together,

I'm posting this here because I can't find a JFace related newsgroup.
Today I've finished my work with a JFace TreeViewer with Check Boxes and a
Cell Editor for in-place editing and discoverd some issues. I'm on winxp
32.

no Double Click:
It uses a textfiled, so when you single click on a tree item, the
textfield will get focus and the tree can't react on double click's any
more! The windows behaviour is to wait 0,5 sec before editing, cause it
waits for double click.

text field stays:
when you delete the tree item just editing, the text field will stay in
the tree

text field reacts on checkbox click:
if you click a checkbox of a selected treeItem, thze edit mode will
activated, because a checkbox click fires a mouse-up event...
Re: CheckBoxTreeViewer and CellEditor combination is buggy [message #1454 is a reply to message #678] Wed, 06 May 2009 06:23 Go to previous messageGo to next message
Eclipse UserFriend
philipp huebner schrieb:
> Hello together,
>
> I'm posting this here because I can't find a JFace related newsgroup.
> Today I've finished my work with a JFace TreeViewer with Check Boxes and
> a Cell Editor for in-place editing and discoverd some issues. I'm on
> winxp 32.
>
> no Double Click:
> It uses a textfiled, so when you single click on a tree item, the
> textfield will get focus and the tree can't react on double click's any
> more! The windows behaviour is to wait 0,5 sec before editing, cause it
> waits for double click.

so what would you expect to happen on double click. Please note that our
Editing code has special handling when the editor is enabled and a
double click is happening in time of the defined double click => we are
then firing a double click which you get by attaching a
IDoubleClickListener on the viewer. If you want to mimic the Windows
behaviour I'd say you could customize
ColumnViewerEditorActivationStrategy to return false on single click and
then wait 0,5 sec and active the editor using viewer.editElement().

>
> text field stays:
> when you delete the tree item just editing, the text field will stay in
> the tree
>

Who is deleting/disposing the item? Looking at our code we are attaching
a dipose-listener on the current item which cancels the editing

> text field reacts on checkbox click:
> if you click a checkbox of a selected treeItem, thze edit mode will
> activated, because a checkbox click fires a mouse-up event...
>

I see. We need to see if the mouse event informs us about this being a
check-toggeling but we also pass on all informations to you in our
ColumnViewerEditorActivationStrategy. If no such information is passed
we might have to check the widget bounds to find out the click happened
on the checkbox and not at the widget-content.

Tom
Re: CheckBoxTreeViewer and CellEditor combination is buggy [message #1463 is a reply to message #1454] Wed, 06 May 2009 08:18 Go to previous messageGo to next message
Eclipse UserFriend
so what would you expect to happen on double click. Please note that our
Editing code has special handling when the editor is enabled and a
double click is happening in time of the defined double click => we are
then firing a double click which you get by attaching a
IDoubleClickListener on the viewer. If you want to mimic the Windows
behaviour I'd say you could customize
ColumnViewerEditorActivationStrategy to return false on single click and
then wait 0,5 sec and active the editor using viewer.editElement().

hmm. In my code i loose double clicks. I'll look at it deeper...
I started a thread waiting 0,5 sec.

Who is deleting/disposing the item? Looking at our code we are attaching
a dipose-listener on the current item which cancels the editing

I did sth similar.

I see. We need to see if the mouse event informs us about this being a
check-toggeling but we also pass on all informations to you in our
ColumnViewerEditorActivationStrategy. If no such information is passed
we might have to check the widget bounds to find out the click happened
on the checkbox and not at the widget-content.

i check the widget bounds.
Re: CheckBoxTreeViewer and CellEditor combination is buggy [message #1506 is a reply to message #1463] Wed, 06 May 2009 10:24 Go to previous messageGo to next message
Eclipse UserFriend
Philipp,

It might be best to attach a snippet to make sure we are talking about the
same thing.

Boris

"philipp huebner" <philipp.huebner@teraport.de> wrote in message
news:1504da33cfde960ed93a15e823b53ad5$1@www.eclipse.org...
>
>
> so what would you expect to happen on double click. Please note that our
> Editing code has special handling when the editor is enabled and a
> double click is happening in time of the defined double click => we are
> then firing a double click which you get by attaching a
> IDoubleClickListener on the viewer. If you want to mimic the Windows
> behaviour I'd say you could customize
> ColumnViewerEditorActivationStrategy to return false on single click and
> then wait 0,5 sec and active the editor using viewer.editElement().
>
> hmm. In my code i loose double clicks. I'll look at it deeper...
> I started a thread waiting 0,5 sec.
>
> Who is deleting/disposing the item? Looking at our code we are attaching
> a dipose-listener on the current item which cancels the editing
>
> I did sth similar.
>
> I see. We need to see if the mouse event informs us about this being a
> check-toggeling but we also pass on all informations to you in our
> ColumnViewerEditorActivationStrategy. If no such information is passed
> we might have to check the widget bounds to find out the click happened
> on the checkbox and not at the widget-content.
>
> i check the widget bounds.
>
Re: CheckBoxTreeViewer and CellEditor combination is buggy [message #1646 is a reply to message #1506] Thu, 07 May 2009 07:26 Go to previous messageGo to next message
Eclipse UserFriend
I create it like this:

PatternFilter patternFilter = new PatternFilter();
filteredTree = new CustomFilteredTree(getContainer(), SWT.MULTI
| SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.CHECK,
patternFilter);

selectionViewer = (CustomContainerCheckedTreeViewer) filteredTree
.getViewer();
selectionViewer.setAutoExpandLevel(TreeViewer.ALL_LEVELS);
setCurrentViewer(selectionViewer);

cp = new AdapterFactoryContentProvider(adapterFactory);
selectionViewer.setContentProvider(cp);

// Cell Editor can be activated here
treeEditor = new CommandBasedAdapterFactoryTreeEditor(selectionViewer
.getTree(), adapterFactory, editingDomain);
Re: CheckBoxTreeViewer and CellEditor combination is buggy [message #1669 is a reply to message #1646] Thu, 07 May 2009 08:38 Go to previous messageGo to next message
Eclipse UserFriend
dispose: which code implements a dispose listener? not mine. I use
standandrd api which ends in a dangling textfield?!?
Re: CheckBoxTreeViewer and CellEditor combination is buggy [message #1680 is a reply to message #1669] Thu, 07 May 2009 08:46 Go to previous message
Eclipse UserFriend
Hi,

ColumnViewerEditor adds the listener on the item. What version of JFace
are you using.

The code you showed us is not enough what we need is a real snippet we
can use to see the problems in action.

Use one of our existing ones [1] and modify it so that we can see the
problems you are having at our local workstations.

Tom

[1]http://wiki.eclipse.org/JFaceSnippets

philipp huebner schrieb:
> dispose: which code implements a dispose listener? not mine. I use
> standandrd api which ends in a dangling textfield?!?
>
Previous Topic:JFace Data Binding/Getting started
Next Topic:System.out.println into a TableViewer
Goto Forum:
  


Current Time: Mon Jun 16 10:07:19 EDT 2025

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

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

Back to the top