Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [Databinding] Use converter when binding to TableViewer
[Databinding] Use converter when binding to TableViewer [message #327788] Thu, 01 May 2008 19:00 Go to next message
Eclipse UserFriend
Originally posted by: tskaufma.gmail.com

Hello,

I have a model which has java.util.Date objects and I've created a custom
converter for Date to String conversion.

I would like to use my converter with a TableViewer. I currently use the
ObservableListContentProvider and ObservableMapLabelProvider classes to fill
the TableViewer. Is there some easy way to attach the converter this setup?

If not, is there a per-column label provider for use with Databinding so I
only have to write a custom label provider for my Date columns?

Thanks,
Trevor Kaufman
Re: [Databinding] Use converter when binding to TableViewer [message #327791 is a reply to message #327788] Thu, 01 May 2008 19:57 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Sure ColumnLabelProvider?

Tom

Trevor Kaufman schrieb:
> Hello,
>
> I have a model which has java.util.Date objects and I've created a
> custom converter for Date to String conversion.
>
> I would like to use my converter with a TableViewer. I currently use the
> ObservableListContentProvider and ObservableMapLabelProvider classes to
> fill the TableViewer. Is there some easy way to attach the converter
> this setup?
>
> If not, is there a per-column label provider for use with Databinding so
> I only have to write a custom label provider for my Date columns?
>
> Thanks,
> Trevor Kaufman


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: [Databinding] Use converter when binding to TableViewer [message #327798 is a reply to message #327791] Thu, 01 May 2008 22:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tskaufma.gmail.com

Hello Tom,

ColumnLabelProvider is a per column, yes, but there is no
ObservableColumnLabelProvider that I can find.. and
ObservableMapLabelProvider doesn't implement ColumnLabelProvider.

If I switch to a per column system, I'd only want to write custom label
providers for my Date columns and use an Obversable label provider for the
other columns.

Hope that clarifies my issue,
Trevor Kaufman

"Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
news:fvd7bt$eln$1@build.eclipse.org...
> Sure ColumnLabelProvider?
>
> Tom
>
> Trevor Kaufman schrieb:
>> Hello,
>>
>> I have a model which has java.util.Date objects and I've created a custom
>> converter for Date to String conversion.
>>
>> I would like to use my converter with a TableViewer. I currently use the
>> ObservableListContentProvider and ObservableMapLabelProvider classes to
>> fill the TableViewer. Is there some easy way to attach the converter this
>> setup?
>>
>> If not, is there a per-column label provider for use with Databinding so
>> I only have to write a custom label provider for my Date columns?
>>
>> Thanks,
>> Trevor Kaufman
>
>
> --
> B e s t S o l u t i o n . at
> ------------------------------------------------------------ --------
> Tom Schindl JFace-Committer
> ------------------------------------------------------------ --------
Re: [Databinding] Use converter when binding to TableViewer [message #327800 is a reply to message #327798] Fri, 02 May 2008 10:22 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/

Tom

Trevor Kaufman schrieb:
> Hello Tom,
>
> ColumnLabelProvider is a per column, yes, but there is no
> ObservableColumnLabelProvider that I can find.. and
> ObservableMapLabelProvider doesn't implement ColumnLabelProvider.
>
> If I switch to a per column system, I'd only want to write custom label
> providers for my Date columns and use an Obversable label provider for
> the other columns.
>
> Hope that clarifies my issue,
> Trevor Kaufman
>
> "Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
> news:fvd7bt$eln$1@build.eclipse.org...
>> Sure ColumnLabelProvider?
>>
>> Tom
>>
>> Trevor Kaufman schrieb:
>>> Hello,
>>>
>>> I have a model which has java.util.Date objects and I've created a
>>> custom converter for Date to String conversion.
>>>
>>> I would like to use my converter with a TableViewer. I currently use
>>> the ObservableListContentProvider and ObservableMapLabelProvider
>>> classes to fill the TableViewer. Is there some easy way to attach the
>>> converter this setup?
>>>
>>> If not, is there a per-column label provider for use with Databinding
>>> so I only have to write a custom label provider for my Date columns?
>>>
>>> Thanks,
>>> Trevor Kaufman
>>
>>
>> --
>> B e s t S o l u t i o n . at
>> ------------------------------------------------------------ --------
>> Tom Schindl JFace-Committer
>> ------------------------------------------------------------ --------
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Previous Topic:[Fwd: compile plugins using commandline]
Next Topic:Databinding and Date Selection Widgets
Goto Forum:
  


Current Time: Mon Jul 29 21:03:43 GMT 2024

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

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

Back to the top