Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » TreeViewer CellEditor
TreeViewer CellEditor [message #464757] Thu, 15 March 2007 09:05 Go to next message
swetha  is currently offline swetha Friend
Messages: 10
Registered: July 2009
Junior Member
Hi,

I have a tree view , when I double click on tree item, the item must
be in editable mode..

If I set the cell editors like,
tree.setCellEditors(new CellEditor[] { new TextCellEditor(tree) });
tree.setCellModifier(new TreeCellModifier(tree));
tree.setColumnProperties(new String[] {"Customer"});

the problem is , on the selection (on single click)of item itself makes
the item in editing mode but I want only on double click...


Is there any way to the cell editor for selected tree item only, not for
the entire tree.. so that I can include this in mouseDoubleClick event of
tree..

Thanks in advance,
Swetha
Re: TreeViewer CellEditor [message #464765 is a reply to message #464757] Thu, 15 March 2007 09:26 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

3.2:http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jfa ce.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/sni ppets/viewers/Snippet021CellEditorsOnDoubleClick.java?view=m arkup

3.3:https://bugs.eclipse.org/bugs/show_bug.cgi?id=172646

Tom

swetha schrieb:
> Hi,
>
> I have a tree view , when I double click on tree item, the item must
> be in editable mode..
>
> If I set the cell editors like,
> tree.setCellEditors(new CellEditor[] { new TextCellEditor(tree) });
> tree.setCellModifier(new TreeCellModifier(tree));
> tree.setColumnProperties(new String[] {"Customer"});
>
> the problem is , on the selection (on single click)of item itself makes
> the item in editing mode but I want only on double click...
>
>
> Is there any way to the cell editor for selected tree item only, not for
> the entire tree.. so that I can include this in mouseDoubleClick event
> of tree..
>
> Thanks in advance,
> Swetha
>
>
>
>


--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
----------------------------------------------------
tom schindl Eclipse JFace Committer
Re: TreeViewer CellEditor [message #464830 is a reply to message #464765] Fri, 16 March 2007 04:42 Go to previous messageGo to next message
Swetha is currently offline SwethaFriend
Messages: 68
Registered: July 2009
Member
Hi,

I did the same as mentioned in Snippet provided by you...but it is not
behaving as expected..

In double click event it is not in editable mode..If I click on more
than 3 times then it is in editable mode,

I have run the snippet also, it is also behaving the same...

First it is executing the can modify method, then mouse double click
event,,,in mouse double click event we called setEnabled method...

If the order of execution is reverse... we can get it as expected..

Please help me ...

Thanks,
Swetha
Re: TreeViewer CellEditor [message #464849 is a reply to message #464830] Fri, 16 March 2007 09:06 Go to previous messageGo to next message
Swetha is currently offline SwethaFriend
Messages: 68
Registered: July 2009
Member
Hi,

Hi,
I did the same as mentioned in Snippet provided by you...but it is
not behaving as expected..

In double click event it is not in editable mode..If I click on more
than 3 times then it is in editable mode,

I have run the snippet also, it is also behaving the same... First it
is executing the can modify method, then mouse double click event,,,in
mouse double click event we called setEnabled method...

If the order of execution is reverse... we can get it as expected..

Please help me ...

Thanks,
Swetha
Re: TreeViewer CellEditor [message #464853 is a reply to message #464849] Fri, 16 March 2007 10:40 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

For me the snippet works as expected on 3.3M5. Please note that in the
snippet only the rows 0,2,4,... are editable.

Tom

Swetha schrieb:
> Hi,
>
> Hi,
> I did the same as mentioned in Snippet provided by you...but it is
> not behaving as expected..
>
> In double click event it is not in editable mode..If I click on more
> than 3 times then it is in editable mode,
>
> I have run the snippet also, it is also behaving the same... First it
> is executing the can modify method, then mouse double click event,,,in
> mouse double click event we called setEnabled method...
>
> If the order of execution is reverse... we can get it as expected..
>
> Please help me ...
>
> Thanks,
> Swetha
>
>


--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
----------------------------------------------------
tom schindl Eclipse JFace Committer
Previous Topic:RCP application without internal classes org.eclipse...
Next Topic:How to get Editor bounds?
Goto Forum:
  


Current Time: Wed Sep 18 04:54:02 GMT 2024

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

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

Back to the top