Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » CheckBoxCellEditor in TreeViewer(Question about positioning a CheckBoxCellEditor in an arbitary cell)
icon5.gif  CheckBoxCellEditor in TreeViewer [message #500407] Wed, 25 November 2009 23:45 Go to next message
Ioannis Anagnostopoulos is currently offline Ioannis AnagnostopoulosFriend
Messages: 2
Registered: November 2009
Location: Aberdeen UK
Junior Member

Hello,

It took me a while to realize that if someone needed different CellEditors per cell, TreeViewer was the only solution (unless if I am wrong again Confused ). So having constructed a TreeViewer I assign different kind of cell editors for the cells of a second column while I use the cells of the first column as text labels. The whole TreeViewer has the look of a table with column headers etc. Up to know I have used TextCellEditor and ComboBoxCellEditor and it works great.

However, my problem now is that the CheckBoxCellEditor does not want to appear at all and I am not sure if CheckBoxCellEditor is supposed to be used as such. I can see that the getValue of my subclassed EdittingSupport interface returns TRUE (since I have forcefully set the CheckBox to true earlier) but funny enough the setValue when I click on the cell returns always false. I am just about to give up and create a TRUE/FALSE ComboBoxCellEditor but before I hope that someone of you could provide some insight.

Thanks in advance
Yiannis
Re: CheckBoxCellEditor in TreeViewer [message #500413 is a reply to message #500407] Thu, 26 November 2009 01:46 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Ioannis Anagnostopoulos schrieb:
> Hello,
>
> It took me a while to realize that if someone needed different
> CellEditors per cell, TreeViewer was the only solution (unless if I am
> wrong again :? ). So having constructed a TreeViewer I assign different
> kind of cell editors for the cells of a second column while I use the

No this is not true. With the EditingSupport-API you can have different
cell-editors all over the place including TableViewer.

> cells of the first column as text labels. The whole TreeViewer has the
> look of a table with column headers etc. Up to know I have used
> TextCellEditor and ComboBoxCellEditor and it works great.
> However, my problem now is that the CheckBoxCellEditor does not want to
> appear at all and I am not sure if CheckBoxCellEditor is supposed to be
> used as such. I can see that the getValue of my subclassed

CheckBoxCellEditor is a very special beast because. I'd suggest you take
a look at
http://wiki.eclipse.org/JFaceSnippets#Snippet061FakedNativeC ellEditor
which shows another CheckBox-Editor in action.

> EdittingSupport interface returns TRUE (since I have forcefully set the
> CheckBox to true earlier) but funny enough the setValue when I click on
> the cell returns always false. I am just about to give up and create a
> TRUE/FALSE ComboBoxCellEditor but before I hope that someone of you
> could provide some insight.
>
> Thanks in advance
> Yiannis

Tom
Re: CheckBoxCellEditor in TreeViewer [message #500515 is a reply to message #500413] Thu, 26 November 2009 13:48 Go to previous message
Ioannis Anagnostopoulos is currently offline Ioannis AnagnostopoulosFriend
Messages: 2
Registered: November 2009
Location: Aberdeen UK
Junior Member

Hello Tom,

Your help is much appreciated. I did work through the Snippet your provided and I can see "check boxes". Do you think that in the future there will be a less hacked approach to this problem?

Kind Regards
Yiannis

[Updated on: Thu, 26 November 2009 15:51]

Report message to a moderator

Previous Topic:Listener for viewer refresh or sort
Next Topic:problem with AggregateValidationStatus
Goto Forum:
  


Current Time: Fri Apr 26 13:52:09 GMT 2024

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

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

Back to the top