Home » Eclipse Projects » Nebula » GridTableViewer - JFace Databinding - Dates
GridTableViewer - JFace Databinding - Dates [message #57463] |
Mon, 11 August 2008 05:16  |
Eclipse User |
|
|
|
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 13:28   |
Eclipse User |
|
|
|
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 15:24  |
Eclipse User |
|
|
|
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 05:33  |
Eclipse User |
|
|
|
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 #591669 is a reply to message #57612] |
Mon, 11 August 2008 13:28  |
Eclipse User |
|
|
|
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 15:24  |
Eclipse User |
|
|
|
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
------------------------------------------------------------ --------
|
|
|
Goto Forum:
Current Time: Mon May 05 05:16:51 EDT 2025
Powered by FUDForum. Page generated in 0.10380 seconds
|