Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to create different CellEditors per row?
How to create different CellEditors per row? [message #334647] Mon, 23 February 2009 09:17 Go to next message
Eclipse UserFriend
Originally posted by: TheRealHawk.Freenet.de

Hi,

in my project I need to edit a lot of different objects - so I need to
implement a dialog for each object.
Because theere are a lot of properties on each object it takes some time to
create such a dialog.

So my idea was to implement a simple-dialog, which only shows a table and a
property and ints value per row.
--> This is no problem.

My problem is: How can I set different CellEditors for each value-column?

Currently I use a TableViewer and TableViewerColumns together with an
EdititingSupport for each column.

Markus
Re: How to create different CellEditors per row? [message #334649 is a reply to message #334647] Mon, 23 February 2009 10:23 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You simply need to make your EditingSupport return the appropriate
CellEditor or do I miss the point?

Tom

Markus Koch schrieb:
> Hi,
>
> in my project I need to edit a lot of different objects - so I need to
> implement a dialog for each object.
> Because theere are a lot of properties on each object it takes some time to
> create such a dialog.
>
> So my idea was to implement a simple-dialog, which only shows a table and a
> property and ints value per row.
> --> This is no problem.
>
> My problem is: How can I set different CellEditors for each value-column?
>
> Currently I use a TableViewer and TableViewerColumns together with an
> EdititingSupport for each column.
>
> Markus
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: How to create different CellEditors per row? [message #334650 is a reply to message #334649] Mon, 23 February 2009 14:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: TheRealHawk.Freenet.de

"Tom Schindl" <tom.schindl@bestsolution.at> schrieb im Newsbeitrag
news:gnttff$24f$1@build.eclipse.org...
> You simply need to make your EditingSupport return the appropriate
> CellEditor or do I miss the point?
>
> Tom
>
> Markus Koch schrieb:
>> Hi,
>>
>> in my project I need to edit a lot of different objects - so I need to
>> implement a dialog for each object.
>> Because theere are a lot of properties on each object it takes some time
>> to
>> create such a dialog.
>>
>> So my idea was to implement a simple-dialog, which only shows a table and
>> a
>> property and ints value per row.
>> --> This is no problem.
>>
>> My problem is: How can I set different CellEditors for each value-column?
>>
>> Currently I use a TableViewer and TableViewerColumns together with an
>> EdititingSupport for each column.
>>
>> Markus
>>
>>
>
>
> --
> B e s t S o l u t i o n . at
> ------------------------------------------------------------ --------
> Tom Schindl JFace-Committer
> ------------------------------------------------------------ --------

Yeah - thats it. :-)

Now I have another question: are there some default jface-classes for java
Beans?
e.g. ICellModifier or EdititingSupport or ITableLableProvider?
Of course I can implement them - but maybe there are some ready classes
that I can use?
Re: How to create different CellEditors per row? [message #334651 is a reply to message #334650] Mon, 23 February 2009 14:11 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
> Yeah - thats it. :-)
>
> Now I have another question: are there some default jface-classes for java
> Beans?
> e.g. ICellModifier or EdititingSupport or ITableLableProvider?
> Of course I can implement them - but maybe there are some ready classes
> that I can use?
>
>

No we don't have such stuff but you could take a look at
JFace-Databinding which I'd suggest to use. It provides specialized
LabelProviders for observed attributes of a bean and integration into
EditingSupport.

http://wiki.eclipse.org/JFace_Data_Binding/Snippets

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: How to create different CellEditors per row? [message #334652 is a reply to message #334651] Mon, 23 February 2009 14:49 Go to previous message
Eclipse UserFriend
Originally posted by: TheRealHawk.Freenet.de

"Tom Schindl" <tom.schindl@bestsolution.at> schrieb im Newsbeitrag
news:gnuar2$pm9$1@build.eclipse.org...
>
>> Yeah - thats it. :-)
>>
>> Now I have another question: are there some default jface-classes for
>> java
>> Beans?
>> e.g. ICellModifier or EdititingSupport or ITableLableProvider?
>> Of course I can implement them - but maybe there are some ready classes
>> that I can use?
>>
>>
>
> No we don't have such stuff but you could take a look at
> JFace-Databinding which I'd suggest to use. It provides specialized
> LabelProviders for observed attributes of a bean and integration into
> EditingSupport.
>
> http://wiki.eclipse.org/JFace_Data_Binding/Snippets
>
> Tom
>
> --
> B e s t S o l u t i o n . at
> ------------------------------------------------------------ --------
> Tom Schindl JFace-Committer
> ------------------------------------------------------------ --------

Thank you very much for the link - the examples are exactly what I'm looking
for.

Markus
Previous Topic:How to create a plug-in that uses reflection to find files with annotations ?
Next Topic:How does eclipse handle linked java files in an Ant build file?
Goto Forum:
  


Current Time: Tue Jul 30 20:28:10 GMT 2024

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

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

Back to the top