Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » GridTableViewer - JFace Databinding - Dates
GridTableViewer - JFace Databinding - Dates [message #57463] Mon, 11 August 2008 09:16 Go to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 98
Registered: July 2009
Member
Hello there.

Is there a way to change the display format of a Date or Calendar object
in the GridTableViewer. Right now it seems that a date.toString() is done.

How can this value be displayed in a locale specific format?

Thanks in advance.

Peter
Re: GridTableViewer - JFace Databinding - Dates [message #57488 is a reply to message #57463] Mon, 11 August 2008 09:33 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You need to set your own ColumnLabelProvider#getText(Object) or
ITableLabelProvider#getText(int,Object) and check the instance for Date
and use SimpleDateFormat. The default LabelProvider always simply calls
the given objects toString method.

Tom

Peter Pfeifer schrieb:
> Hello there.
>
> Is there a way to change the display format of a Date or Calendar object
> in the GridTableViewer. Right now it seems that a date.toString() is done.
>
> How can this value be displayed in a locale specific format?
>
> Thanks in advance.
>
> Peter


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: GridTableViewer - JFace Databinding - Dates [message #57513 is a reply to message #57488] Mon, 11 August 2008 09:41 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Sorry i didn't read the header correctly you are using an
ObservableLabelProvider right? Which automatically does a toString().

I've written custom ones who are using MessageFormat. You can fetch them
from:
http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/

With this you can write something like this:

new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");

If you are using EMF I've written even better ones who also support
..-notation when you want to access nested attribute (but it depends on
org.apache.lang and the use of EObject):

http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a

new ObservableColumnLabelProvider(map,"${0} (${1.name})

See
http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
Method: createTreeViewer how to use it you could easily customize it to
use JavaBean lookup.

Tom

Tom Schindl schrieb:
> You need to set your own ColumnLabelProvider#getText(Object) or
> ITableLabelProvider#getText(int,Object) and check the instance for Date
> and use SimpleDateFormat. The default LabelProvider always simply calls
> the given objects toString method.
>
> Tom
>
> Peter Pfeifer schrieb:
>> Hello there.
>>
>> Is there a way to change the display format of a Date or Calendar
>> object in the GridTableViewer. Right now it seems that a
>> date.toString() is done.
>>
>> How can this value be displayed in a locale specific format?
>>
>> Thanks in advance.
>>
>> Peter
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: GridTableViewer - JFace Databinding - Dates [message #57537 is a reply to message #57513] Mon, 11 August 2008 10:08 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 98
Registered: July 2009
Member
Hi Tom.

Thanks that helped me a lot!

Are there any new changes on the grid/gridviewer itself? You posted a
very cool screenshot a few weeks ago. Are these changes on the
grid/gridviewer?

Peter

Tom Schindl schrieb:
> Sorry i didn't read the header correctly you are using an
> ObservableLabelProvider right? Which automatically does a toString().
>
> I've written custom ones who are using MessageFormat. You can fetch them
> from:
> http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/
>
>
> With this you can write something like this:
>
> new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");
>
> If you are using EMF I've written even better ones who also support
> .-notation when you want to access nested attribute (but it depends on
> org.apache.lang and the use of EObject):
>
> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a
>
>
> new ObservableColumnLabelProvider(map,"${0} (${1.name})
>
> See
> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
>
> Method: createTreeViewer how to use it you could easily customize it to
> use JavaBean lookup.
>
> Tom
>
> Tom Schindl schrieb:
>> You need to set your own ColumnLabelProvider#getText(Object) or
>> ITableLabelProvider#getText(int,Object) and check the instance for
>> Date and use SimpleDateFormat. The default LabelProvider always simply
>> calls the given objects toString method.
>>
>> Tom
>>
>> Peter Pfeifer schrieb:
>>> Hello there.
>>>
>>> Is there a way to change the display format of a Date or Calendar
>>> object in the GridTableViewer. Right now it seems that a
>>> date.toString() is done.
>>>
>>> How can this value be displayed in a locale specific format?
>>>
>>> Thanks in advance.
>>>
>>> Peter
>>
>>
>
>
Re: GridTableViewer - JFace Databinding - Dates [message #57562 is a reply to message #57537] Mon, 11 August 2008 10:12 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi Peter,

No not yet. I'm currently maintaining a fork locally until I've finished
my work completely (I was only holiday the last 4 weeks) and then merge
it back to nebula. There are still some minor issues with the
Header-Controls.

I'll post a message when the sources are available.

Tom

Peter Pfeifer schrieb:
> Hi Tom.
>
> Thanks that helped me a lot!
>
> Are there any new changes on the grid/gridviewer itself? You posted a
> very cool screenshot a few weeks ago. Are these changes on the
> grid/gridviewer?
>
> Peter
>
> Tom Schindl schrieb:
>> Sorry i didn't read the header correctly you are using an
>> ObservableLabelProvider right? Which automatically does a toString().
>>
>> I've written custom ones who are using MessageFormat. You can fetch
>> them from:
>> http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/
>>
>>
>> With this you can write something like this:
>>
>> new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");
>>
>> If you are using EMF I've written even better ones who also support
>> .-notation when you want to access nested attribute (but it depends on
>> org.apache.lang and the use of EObject):
>>
>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a
>>
>>
>> new ObservableColumnLabelProvider(map,"${0} (${1.name})
>>
>> See
>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
>>
>> Method: createTreeViewer how to use it you could easily customize it
>> to use JavaBean lookup.
>>
>> Tom
>>
>> Tom Schindl schrieb:
>>> You need to set your own ColumnLabelProvider#getText(Object) or
>>> ITableLabelProvider#getText(int,Object) and check the instance for
>>> Date and use SimpleDateFormat. The default LabelProvider always
>>> simply calls the given objects toString method.
>>>
>>> Tom
>>>
>>> Peter Pfeifer schrieb:
>>>> Hello there.
>>>>
>>>> Is there a way to change the display format of a Date or Calendar
>>>> object in the GridTableViewer. Right now it seems that a
>>>> date.toString() is done.
>>>>
>>>> How can this value be displayed in a locale specific format?
>>>>
>>>> Thanks in advance.
>>>>
>>>> Peter
>>>
>>>
>>
>>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: GridTableViewer - JFace Databinding - Dates [message #57612 is a reply to message #57562] Mon, 11 August 2008 10:24 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 98
Registered: July 2009
Member
Hi.

That's good news. I eagerly waiting for it.

Thanks for all your work!

Peter

Tom Schindl schrieb:
> Hi Peter,
>
> No not yet. I'm currently maintaining a fork locally until I've finished
> my work completely (I was only holiday the last 4 weeks) and then merge
> it back to nebula. There are still some minor issues with the
> Header-Controls.
>
> I'll post a message when the sources are available.
>
> Tom
>
> Peter Pfeifer schrieb:
>> Hi Tom.
>>
>> Thanks that helped me a lot!
>>
>> Are there any new changes on the grid/gridviewer itself? You posted a
>> very cool screenshot a few weeks ago. Are these changes on the
>> grid/gridviewer?
>>
>> Peter
>>
>> Tom Schindl schrieb:
>>> Sorry i didn't read the header correctly you are using an
>>> ObservableLabelProvider right? Which automatically does a toString().
>>>
>>> I've written custom ones who are using MessageFormat. You can fetch
>>> them from:
>>> http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/
>>>
>>>
>>> With this you can write something like this:
>>>
>>> new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");
>>>
>>> If you are using EMF I've written even better ones who also support
>>> .-notation when you want to access nested attribute (but it depends
>>> on org.apache.lang and the use of EObject):
>>>
>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a
>>>
>>>
>>> new ObservableColumnLabelProvider(map,"${0} (${1.name})
>>>
>>> See
>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
>>>
>>> Method: createTreeViewer how to use it you could easily customize it
>>> to use JavaBean lookup.
>>>
>>> Tom
>>>
>>> Tom Schindl schrieb:
>>>> You need to set your own ColumnLabelProvider#getText(Object) or
>>>> ITableLabelProvider#getText(int,Object) and check the instance for
>>>> Date and use SimpleDateFormat. The default LabelProvider always
>>>> simply calls the given objects toString method.
>>>>
>>>> Tom
>>>>
>>>> Peter Pfeifer schrieb:
>>>>> Hello there.
>>>>>
>>>>> Is there a way to change the display format of a Date or Calendar
>>>>> object in the GridTableViewer. Right now it seems that a
>>>>> date.toString() is done.
>>>>>
>>>>> How can this value be displayed in a locale specific format?
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> Peter
>>>>
>>>>
>>>
>>>
>
>
Re: GridTableViewer - JFace Databinding - Dates [message #57637 is a reply to message #57612] Mon, 11 August 2008 17:28 Go to previous messageGo to next message
Emil Crumhorn is currently offline Emil CrumhornFriend
Messages: 169
Registered: July 2009
Senior Member
Hope you don't mind a little thread hijack (Peter said it was ok ;) ),

Tom, do you know the status on the GridViewer in SWT.VIRTUAL? I see the
source has a bunch of TODO's listed for it. I'm not sure what's involved,
but as the grid seems to work really well in normal SWT.VIRTUAL without a
viewer, it seems it's almost there (?). I would really love a virtual
viewer!

Any ideas?
Emil


"Peter Pfeifer" <peter.pfeifer@mic-cust.com> wrote in message
news:g7p403$gh2$1@build.eclipse.org...
> Hi.
>
> That's good news. I eagerly waiting for it.
>
> Thanks for all your work!
>
> Peter
>
> Tom Schindl schrieb:
>> Hi Peter,
>>
>> No not yet. I'm currently maintaining a fork locally until I've finished
>> my work completely (I was only holiday the last 4 weeks) and then merge
>> it back to nebula. There are still some minor issues with the
>> Header-Controls.
>>
>> I'll post a message when the sources are available.
>>
>> Tom
>>
>> Peter Pfeifer schrieb:
>>> Hi Tom.
>>>
>>> Thanks that helped me a lot!
>>>
>>> Are there any new changes on the grid/gridviewer itself? You posted a
>>> very cool screenshot a few weeks ago. Are these changes on the
>>> grid/gridviewer?
>>>
>>> Peter
>>>
>>> Tom Schindl schrieb:
>>>> Sorry i didn't read the header correctly you are using an
>>>> ObservableLabelProvider right? Which automatically does a toString().
>>>>
>>>> I've written custom ones who are using MessageFormat. You can fetch
>>>> them from:
>>>> http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/
>>>>
>>>> With this you can write something like this:
>>>>
>>>> new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");
>>>>
>>>> If you are using EMF I've written even better ones who also support
>>>> .-notation when you want to access nested attribute (but it depends on
>>>> org.apache.lang and the use of EObject):
>>>>
>>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a
>>>>
>>>> new ObservableColumnLabelProvider(map,"${0} (${1.name})
>>>>
>>>> See
>>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
>>>> Method: createTreeViewer how to use it you could easily customize it to
>>>> use JavaBean lookup.
>>>>
>>>> Tom
>>>>
>>>> Tom Schindl schrieb:
>>>>> You need to set your own ColumnLabelProvider#getText(Object) or
>>>>> ITableLabelProvider#getText(int,Object) and check the instance for
>>>>> Date and use SimpleDateFormat. The default LabelProvider always simply
>>>>> calls the given objects toString method.
>>>>>
>>>>> Tom
>>>>>
>>>>> Peter Pfeifer schrieb:
>>>>>> Hello there.
>>>>>>
>>>>>> Is there a way to change the display format of a Date or Calendar
>>>>>> object in the GridTableViewer. Right now it seems that a
>>>>>> date.toString() is done.
>>>>>>
>>>>>> How can this value be displayed in a locale specific format?
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Peter
>>>>>
>>>>>
>>>>
>>>>
>>
Re: GridTableViewer - JFace Databinding - Dates [message #57680 is a reply to message #57637] Mon, 11 August 2008 19:24 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi Emil,

Frankly I don't know when I finished my current work (with the
header/footer stuff) I can take a look into it. I'd also like to
introduce a feature to pool images and dispose them for rows not visible
this should make it possible for the Grid to deal with thousands of
different images.

Tom

Emil Crumhorn schrieb:
> Hope you don't mind a little thread hijack (Peter said it was ok ;) ),
>
> Tom, do you know the status on the GridViewer in SWT.VIRTUAL? I see the
> source has a bunch of TODO's listed for it. I'm not sure what's involved,
> but as the grid seems to work really well in normal SWT.VIRTUAL without a
> viewer, it seems it's almost there (?). I would really love a virtual
> viewer!
>
> Any ideas?
> Emil
>
>
> "Peter Pfeifer" <peter.pfeifer@mic-cust.com> wrote in message
> news:g7p403$gh2$1@build.eclipse.org...
>> Hi.
>>
>> That's good news. I eagerly waiting for it.
>>
>> Thanks for all your work!
>>
>> Peter
>>
>> Tom Schindl schrieb:
>>> Hi Peter,
>>>
>>> No not yet. I'm currently maintaining a fork locally until I've finished
>>> my work completely (I was only holiday the last 4 weeks) and then merge
>>> it back to nebula. There are still some minor issues with the
>>> Header-Controls.
>>>
>>> I'll post a message when the sources are available.
>>>
>>> Tom
>>>
>>> Peter Pfeifer schrieb:
>>>> Hi Tom.
>>>>
>>>> Thanks that helped me a lot!
>>>>
>>>> Are there any new changes on the grid/gridviewer itself? You posted a
>>>> very cool screenshot a few weeks ago. Are these changes on the
>>>> grid/gridviewer?
>>>>
>>>> Peter
>>>>
>>>> Tom Schindl schrieb:
>>>>> Sorry i didn't read the header correctly you are using an
>>>>> ObservableLabelProvider right? Which automatically does a toString().
>>>>>
>>>>> I've written custom ones who are using MessageFormat. You can fetch
>>>>> them from:
>>>>> http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/
>>>>>
>>>>> With this you can write something like this:
>>>>>
>>>>> new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");
>>>>>
>>>>> If you are using EMF I've written even better ones who also support
>>>>> .-notation when you want to access nested attribute (but it depends on
>>>>> org.apache.lang and the use of EObject):
>>>>>
>>>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a
>>>>>
>>>>> new ObservableColumnLabelProvider(map,"${0} (${1.name})
>>>>>
>>>>> See
>>>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
>>>>> Method: createTreeViewer how to use it you could easily customize it to
>>>>> use JavaBean lookup.
>>>>>
>>>>> Tom
>>>>>
>>>>> Tom Schindl schrieb:
>>>>>> You need to set your own ColumnLabelProvider#getText(Object) or
>>>>>> ITableLabelProvider#getText(int,Object) and check the instance for
>>>>>> Date and use SimpleDateFormat. The default LabelProvider always simply
>>>>>> calls the given objects toString method.
>>>>>>
>>>>>> Tom
>>>>>>
>>>>>> Peter Pfeifer schrieb:
>>>>>>> Hello there.
>>>>>>>
>>>>>>> Is there a way to change the display format of a Date or Calendar
>>>>>>> object in the GridTableViewer. Right now it seems that a
>>>>>>> date.toString() is done.
>>>>>>>
>>>>>>> How can this value be displayed in a locale specific format?
>>>>>>>
>>>>>>> Thanks in advance.
>>>>>>>
>>>>>>> Peter
>>>>>>
>>>>>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: GridTableViewer - JFace Databinding - Dates [message #591630 is a reply to message #57463] Mon, 11 August 2008 09:33 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You need to set your own ColumnLabelProvider#getText(Object) or
ITableLabelProvider#getText(int,Object) and check the instance for Date
and use SimpleDateFormat. The default LabelProvider always simply calls
the given objects toString method.

Tom

Peter Pfeifer schrieb:
> Hello there.
>
> Is there a way to change the display format of a Date or Calendar object
> in the GridTableViewer. Right now it seems that a date.toString() is done.
>
> How can this value be displayed in a locale specific format?
>
> Thanks in advance.
>
> Peter


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: GridTableViewer - JFace Databinding - Dates [message #591639 is a reply to message #57488] Mon, 11 August 2008 09:41 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Sorry i didn't read the header correctly you are using an
ObservableLabelProvider right? Which automatically does a toString().

I've written custom ones who are using MessageFormat. You can fetch them
from:
http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/

With this you can write something like this:

new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");

If you are using EMF I've written even better ones who also support
..-notation when you want to access nested attribute (but it depends on
org.apache.lang and the use of EObject):

http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a

new ObservableColumnLabelProvider(map,"${0} (${1.name})

See
http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
Method: createTreeViewer how to use it you could easily customize it to
use JavaBean lookup.

Tom

Tom Schindl schrieb:
> You need to set your own ColumnLabelProvider#getText(Object) or
> ITableLabelProvider#getText(int,Object) and check the instance for Date
> and use SimpleDateFormat. The default LabelProvider always simply calls
> the given objects toString method.
>
> Tom
>
> Peter Pfeifer schrieb:
>> Hello there.
>>
>> Is there a way to change the display format of a Date or Calendar
>> object in the GridTableViewer. Right now it seems that a
>> date.toString() is done.
>>
>> How can this value be displayed in a locale specific format?
>>
>> Thanks in advance.
>>
>> Peter
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: GridTableViewer - JFace Databinding - Dates [message #591647 is a reply to message #57513] Mon, 11 August 2008 10:08 Go to previous message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 98
Registered: July 2009
Member
Hi Tom.

Thanks that helped me a lot!

Are there any new changes on the grid/gridviewer itself? You posted a
very cool screenshot a few weeks ago. Are these changes on the
grid/gridviewer?

Peter

Tom Schindl schrieb:
> Sorry i didn't read the header correctly you are using an
> ObservableLabelProvider right? Which automatically does a toString().
>
> I've written custom ones who are using MessageFormat. You can fetch them
> from:
> http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/
>
>
> With this you can write something like this:
>
> new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");
>
> If you are using EMF I've written even better ones who also support
> .-notation when you want to access nested attribute (but it depends on
> org.apache.lang and the use of EObject):
>
> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a
>
>
> new ObservableColumnLabelProvider(map,"${0} (${1.name})
>
> See
> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
>
> Method: createTreeViewer how to use it you could easily customize it to
> use JavaBean lookup.
>
> Tom
>
> Tom Schindl schrieb:
>> You need to set your own ColumnLabelProvider#getText(Object) or
>> ITableLabelProvider#getText(int,Object) and check the instance for
>> Date and use SimpleDateFormat. The default LabelProvider always simply
>> calls the given objects toString method.
>>
>> Tom
>>
>> Peter Pfeifer schrieb:
>>> Hello there.
>>>
>>> Is there a way to change the display format of a Date or Calendar
>>> object in the GridTableViewer. Right now it seems that a
>>> date.toString() is done.
>>>
>>> How can this value be displayed in a locale specific format?
>>>
>>> Thanks in advance.
>>>
>>> Peter
>>
>>
>
>
Re: GridTableViewer - JFace Databinding - Dates [message #591650 is a reply to message #57537] Mon, 11 August 2008 10:12 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi Peter,

No not yet. I'm currently maintaining a fork locally until I've finished
my work completely (I was only holiday the last 4 weeks) and then merge
it back to nebula. There are still some minor issues with the
Header-Controls.

I'll post a message when the sources are available.

Tom

Peter Pfeifer schrieb:
> Hi Tom.
>
> Thanks that helped me a lot!
>
> Are there any new changes on the grid/gridviewer itself? You posted a
> very cool screenshot a few weeks ago. Are these changes on the
> grid/gridviewer?
>
> Peter
>
> Tom Schindl schrieb:
>> Sorry i didn't read the header correctly you are using an
>> ObservableLabelProvider right? Which automatically does a toString().
>>
>> I've written custom ones who are using MessageFormat. You can fetch
>> them from:
>> http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/
>>
>>
>> With this you can write something like this:
>>
>> new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");
>>
>> If you are using EMF I've written even better ones who also support
>> .-notation when you want to access nested attribute (but it depends on
>> org.apache.lang and the use of EObject):
>>
>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a
>>
>>
>> new ObservableColumnLabelProvider(map,"${0} (${1.name})
>>
>> See
>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
>>
>> Method: createTreeViewer how to use it you could easily customize it
>> to use JavaBean lookup.
>>
>> Tom
>>
>> Tom Schindl schrieb:
>>> You need to set your own ColumnLabelProvider#getText(Object) or
>>> ITableLabelProvider#getText(int,Object) and check the instance for
>>> Date and use SimpleDateFormat. The default LabelProvider always
>>> simply calls the given objects toString method.
>>>
>>> Tom
>>>
>>> Peter Pfeifer schrieb:
>>>> Hello there.
>>>>
>>>> Is there a way to change the display format of a Date or Calendar
>>>> object in the GridTableViewer. Right now it seems that a
>>>> date.toString() is done.
>>>>
>>>> How can this value be displayed in a locale specific format?
>>>>
>>>> Thanks in advance.
>>>>
>>>> Peter
>>>
>>>
>>
>>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: GridTableViewer - JFace Databinding - Dates [message #591660 is a reply to message #57562] Mon, 11 August 2008 10:24 Go to previous message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 98
Registered: July 2009
Member
Hi.

That's good news. I eagerly waiting for it.

Thanks for all your work!

Peter

Tom Schindl schrieb:
> Hi Peter,
>
> No not yet. I'm currently maintaining a fork locally until I've finished
> my work completely (I was only holiday the last 4 weeks) and then merge
> it back to nebula. There are still some minor issues with the
> Header-Controls.
>
> I'll post a message when the sources are available.
>
> Tom
>
> Peter Pfeifer schrieb:
>> Hi Tom.
>>
>> Thanks that helped me a lot!
>>
>> Are there any new changes on the grid/gridviewer itself? You posted a
>> very cool screenshot a few weeks ago. Are these changes on the
>> grid/gridviewer?
>>
>> Peter
>>
>> Tom Schindl schrieb:
>>> Sorry i didn't read the header correctly you are using an
>>> ObservableLabelProvider right? Which automatically does a toString().
>>>
>>> I've written custom ones who are using MessageFormat. You can fetch
>>> them from:
>>> http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/
>>>
>>>
>>> With this you can write something like this:
>>>
>>> new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");
>>>
>>> If you are using EMF I've written even better ones who also support
>>> .-notation when you want to access nested attribute (but it depends
>>> on org.apache.lang and the use of EObject):
>>>
>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a
>>>
>>>
>>> new ObservableColumnLabelProvider(map,"${0} (${1.name})
>>>
>>> See
>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
>>>
>>> Method: createTreeViewer how to use it you could easily customize it
>>> to use JavaBean lookup.
>>>
>>> Tom
>>>
>>> Tom Schindl schrieb:
>>>> You need to set your own ColumnLabelProvider#getText(Object) or
>>>> ITableLabelProvider#getText(int,Object) and check the instance for
>>>> Date and use SimpleDateFormat. The default LabelProvider always
>>>> simply calls the given objects toString method.
>>>>
>>>> Tom
>>>>
>>>> Peter Pfeifer schrieb:
>>>>> Hello there.
>>>>>
>>>>> Is there a way to change the display format of a Date or Calendar
>>>>> object in the GridTableViewer. Right now it seems that a
>>>>> date.toString() is done.
>>>>>
>>>>> How can this value be displayed in a locale specific format?
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> Peter
>>>>
>>>>
>>>
>>>
>
>
Re: GridTableViewer - JFace Databinding - Dates [message #591669 is a reply to message #57612] Mon, 11 August 2008 17:28 Go to previous message
Emil Crumhorn is currently offline Emil CrumhornFriend
Messages: 169
Registered: July 2009
Senior Member
Hope you don't mind a little thread hijack (Peter said it was ok ;) ),

Tom, do you know the status on the GridViewer in SWT.VIRTUAL? I see the
source has a bunch of TODO's listed for it. I'm not sure what's involved,
but as the grid seems to work really well in normal SWT.VIRTUAL without a
viewer, it seems it's almost there (?). I would really love a virtual
viewer!

Any ideas?
Emil


"Peter Pfeifer" <peter.pfeifer@mic-cust.com> wrote in message
news:g7p403$gh2$1@build.eclipse.org...
> Hi.
>
> That's good news. I eagerly waiting for it.
>
> Thanks for all your work!
>
> Peter
>
> Tom Schindl schrieb:
>> Hi Peter,
>>
>> No not yet. I'm currently maintaining a fork locally until I've finished
>> my work completely (I was only holiday the last 4 weeks) and then merge
>> it back to nebula. There are still some minor issues with the
>> Header-Controls.
>>
>> I'll post a message when the sources are available.
>>
>> Tom
>>
>> Peter Pfeifer schrieb:
>>> Hi Tom.
>>>
>>> Thanks that helped me a lot!
>>>
>>> Are there any new changes on the grid/gridviewer itself? You posted a
>>> very cool screenshot a few weeks ago. Are these changes on the
>>> grid/gridviewer?
>>>
>>> Peter
>>>
>>> Tom Schindl schrieb:
>>>> Sorry i didn't read the header correctly you are using an
>>>> ObservableLabelProvider right? Which automatically does a toString().
>>>>
>>>> I've written custom ones who are using MessageFormat. You can fetch
>>>> them from:
>>>> http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/
>>>>
>>>> With this you can write something like this:
>>>>
>>>> new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");
>>>>
>>>> If you are using EMF I've written even better ones who also support
>>>> .-notation when you want to access nested attribute (but it depends on
>>>> org.apache.lang and the use of EObject):
>>>>
>>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a
>>>>
>>>> new ObservableColumnLabelProvider(map,"${0} (${1.name})
>>>>
>>>> See
>>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
>>>> Method: createTreeViewer how to use it you could easily customize it to
>>>> use JavaBean lookup.
>>>>
>>>> Tom
>>>>
>>>> Tom Schindl schrieb:
>>>>> You need to set your own ColumnLabelProvider#getText(Object) or
>>>>> ITableLabelProvider#getText(int,Object) and check the instance for
>>>>> Date and use SimpleDateFormat. The default LabelProvider always simply
>>>>> calls the given objects toString method.
>>>>>
>>>>> Tom
>>>>>
>>>>> Peter Pfeifer schrieb:
>>>>>> Hello there.
>>>>>>
>>>>>> Is there a way to change the display format of a Date or Calendar
>>>>>> object in the GridTableViewer. Right now it seems that a
>>>>>> date.toString() is done.
>>>>>>
>>>>>> How can this value be displayed in a locale specific format?
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Peter
>>>>>
>>>>>
>>>>
>>>>
>>
Re: GridTableViewer - JFace Databinding - Dates [message #591676 is a reply to message #57637] Mon, 11 August 2008 19:24 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi Emil,

Frankly I don't know when I finished my current work (with the
header/footer stuff) I can take a look into it. I'd also like to
introduce a feature to pool images and dispose them for rows not visible
this should make it possible for the Grid to deal with thousands of
different images.

Tom

Emil Crumhorn schrieb:
> Hope you don't mind a little thread hijack (Peter said it was ok ;) ),
>
> Tom, do you know the status on the GridViewer in SWT.VIRTUAL? I see the
> source has a bunch of TODO's listed for it. I'm not sure what's involved,
> but as the grid seems to work really well in normal SWT.VIRTUAL without a
> viewer, it seems it's almost there (?). I would really love a virtual
> viewer!
>
> Any ideas?
> Emil
>
>
> "Peter Pfeifer" <peter.pfeifer@mic-cust.com> wrote in message
> news:g7p403$gh2$1@build.eclipse.org...
>> Hi.
>>
>> That's good news. I eagerly waiting for it.
>>
>> Thanks for all your work!
>>
>> Peter
>>
>> Tom Schindl schrieb:
>>> Hi Peter,
>>>
>>> No not yet. I'm currently maintaining a fork locally until I've finished
>>> my work completely (I was only holiday the last 4 weeks) and then merge
>>> it back to nebula. There are still some minor issues with the
>>> Header-Controls.
>>>
>>> I'll post a message when the sources are available.
>>>
>>> Tom
>>>
>>> Peter Pfeifer schrieb:
>>>> Hi Tom.
>>>>
>>>> Thanks that helped me a lot!
>>>>
>>>> Are there any new changes on the grid/gridviewer itself? You posted a
>>>> very cool screenshot a few weeks ago. Are these changes on the
>>>> grid/gridviewer?
>>>>
>>>> Peter
>>>>
>>>> Tom Schindl schrieb:
>>>>> Sorry i didn't read the header correctly you are using an
>>>>> ObservableLabelProvider right? Which automatically does a toString().
>>>>>
>>>>> I've written custom ones who are using MessageFormat. You can fetch
>>>>> them from:
>>>>> http://publicsvn.bestsolution.at/repos/java/at.bestsolution. dataforms/trunk/src/at/bestsolution/dataforms/util/viewers/
>>>>>
>>>>> With this you can write something like this:
>>>>>
>>>>> new GenericObservableMapCellLabelProvider(obsMap,"{0,short,date} ");
>>>>>
>>>>> If you are using EMF I've written even better ones who also support
>>>>> .-notation when you want to access nested attribute (but it depends on
>>>>> org.apache.lang and the use of EObject):
>>>>>
>>>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.common/src/at/bestsolutio n/soccer/ui/common/viewers/ObservableColumnLabelProvider.jav a
>>>>>
>>>>> new ObservableColumnLabelProvider(map,"${0} (${1.name})
>>>>>
>>>>> See
>>>>> http://publicsvn.bestsolution.at/repos/java/examples/EMF-Dat abinding/at.bestsolution.soccer.ui.associationadmin/src/at/b estsolution/soccer/ui/associationadmin/AssociationAdministra tionViewPart.java
>>>>> Method: createTreeViewer how to use it you could easily customize it to
>>>>> use JavaBean lookup.
>>>>>
>>>>> Tom
>>>>>
>>>>> Tom Schindl schrieb:
>>>>>> You need to set your own ColumnLabelProvider#getText(Object) or
>>>>>> ITableLabelProvider#getText(int,Object) and check the instance for
>>>>>> Date and use SimpleDateFormat. The default LabelProvider always simply
>>>>>> calls the given objects toString method.
>>>>>>
>>>>>> Tom
>>>>>>
>>>>>> Peter Pfeifer schrieb:
>>>>>>> Hello there.
>>>>>>>
>>>>>>> Is there a way to change the display format of a Date or Calendar
>>>>>>> object in the GridTableViewer. Right now it seems that a
>>>>>>> date.toString() is done.
>>>>>>>
>>>>>>> How can this value be displayed in a locale specific format?
>>>>>>>
>>>>>>> Thanks in advance.
>>>>>>>
>>>>>>> Peter
>>>>>>
>>>>>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Previous Topic:GridTableViewer - JFace Databinding - Dates
Next Topic:GridTableViewer - layout problem
Goto Forum:
  


Current Time: Thu Apr 18 16:29:26 GMT 2024

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

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

Back to the top