Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Custom Font for Row Headers
Custom Font for Row Headers [message #66003] Fri, 24 July 2009 06:54 Go to next message
Eclipse UserFriend
Originally posted by: m.kasid.gmail.com

Can we set custom fonts for row headers? I want to have certain row headers
to be listed in Bold or Italics, i don't see a way of doing that...

I tried passing a custom Font to RowHeaderLabelProvider through the getFont
method of ColumnLabelProvider, but this didn't worked.

--
Thanks,

Mustufa
Re: Custom Font for Row Headers [message #494267 is a reply to message #66003] Thu, 29 October 2009 20:59 Go to previous messageGo to next message
Marty Jones is currently offline Marty JonesFriend
Messages: 54
Registered: July 2009
Member
I looked at the source code for the GridColumn and I didn't see a way to set the font for the GridColumn.

I added a getHeaderFont and setHeaderFont() method to the GridColumn class and modified the DefaultColumnHeaderRenderer class to use the HeaderFont in the Paint method and it does what you want it to do.

I will submit these changes as a patch to see if they want to incorporate them into the widget.

Marty

[Updated on: Thu, 29 October 2009 21:16]

Report message to a moderator

Re: Custom Font for Row Headers [message #494282 is a reply to message #494267] Thu, 29 October 2009 22:21 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
Marty Jones wrote:
> I will submit these changes as a patch to see if they want to
> incorporate them into the widget.

Excellent! When you are ready, please submit your patch as an
attachment to a bugzilla report:

https://bugs.eclipse.org/bugs/enter_bug.cgi?classification=T echnology&product=Nebula&component=Grid


After you submit the patch, please drop a note back here on the
newsgroup to tell us the bug number.

Matthew
Re: Custom Font for Row Headers [message #494291 is a reply to message #66003] Fri, 30 October 2009 02:04 Go to previous messageGo to next message
Marty Jones is currently offline Marty JonesFriend
Messages: 54
Registered: July 2009
Member
I have made the changes and uploaded a zip file containing the modified source files. I went ahead and added custom footer Font support for the GridColumn as well as custom header Font support for the GridColumnGroup.

The bug number is 293743

Here is a link to the patch: https://bugs.eclipse.org/bugs/show_bug.cgi?id=293743

Matthew, I wasn't sure how you guys normally apply patches so I just included the source files that I modified as the patch.

Please let me know if I am suppose to do it differently.

Thanks,

Marty

[Updated on: Fri, 30 October 2009 02:07]

Report message to a moderator

Re: Custom Font for Row Headers [message #494382 is a reply to message #494291] Fri, 30 October 2009 13:40 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
Marty Jones wrote:
> Matthew, I wasn't sure how you guys normally apply patches so I just
> included the source files that I modified as the patch.
>
> Please let me know if I am suppose to do it differently.

Typically the preferred method is to check out the component source from
CVS into your workspace. Make the changes to source files. Open the
Synchronize view and synchronize the sources with CVS to get a list of
the changed files. Select all the changed files, right click, and
select Create Patch. This wizard will generate a patch in the preferred
format.

If you're using Mylyn with the Mylyn-Bugzilla connector it is a little
easier. When you create the patch, select the clipboard as the patch
destination. Then open the bug in Mylyn, add a new attachment and
select the clipboard as the source.

Matthew
Re: Custom Font for Row Headers [message #494392 is a reply to message #494382] Fri, 30 October 2009 14:17 Go to previous messageGo to next message
Marty Jones is currently offline Marty JonesFriend
Messages: 54
Registered: July 2009
Member
Matthew,

Thank you for the help on how to apply the patch.

I have uploaded a new patch file with the changes.

Marty
Re: Custom Font for Row Headers [message #509786 is a reply to message #494392] Mon, 25 January 2010 12:34 Go to previous messageGo to next message
Mustufa Kasidwala is currently offline Mustufa KasidwalaFriend
Messages: 60
Registered: July 2009
Member
Hi,

I actually requested to have a facility to set custom 'Row Header' fonts. I
guess what you fixed was to have custom 'Column Header' fonts.

--
Thanks and Regards

Mustufa Kasidwala


"Marty Jones" <martybjones@gmail.com> wrote in message
news:hceshf$i4a$1@build.eclipse.org...
> Matthew,
>
> Thank you for the help on how to apply the patch.
>
> I have uploaded a new patch file with the changes.
>
> Marty
Re: Custom Font for Row Headers [message #509789 is a reply to message #509786] Mon, 25 January 2010 07:42 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Looks like. I don't know OTOH if setting a row-header font is already
available if not file a bugzilla. It should be quite trivial to
implement this feature.

Tom

Am 25.01.10 13:34, schrieb Mustufa Kasidwala:
> Hi,
>
> I actually requested to have a facility to set custom 'Row Header' fonts. I
> guess what you fixed was to have custom 'Column Header' fonts.
>
Re: Custom Font for Row Headers [message #510664 is a reply to message #509789] Thu, 28 January 2010 09:42 Go to previous message
Mustufa Kasidwala is currently offline Mustufa KasidwalaFriend
Messages: 60
Registered: July 2009
Member
Yes, there is no facility to set header fonts. Filed bug 301096 for this and
attached a patch for a possible fix.

--
Thanks and Regards

Mustufa Kasidwala


"Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
news:hjk3cl$aqe$1@build.eclipse.org...
> Looks like. I don't know OTOH if setting a row-header font is already
> available if not file a bugzilla. It should be quite trivial to
> implement this feature.
>
> Tom
>
> Am 25.01.10 13:34, schrieb Mustufa Kasidwala:
>> Hi,
>>
>> I actually requested to have a facility to set custom 'Row Header' fonts.
>> I
>> guess what you fixed was to have custom 'Column Header' fonts.
>>
>
Re: Custom Font for Row Headers [message #598501 is a reply to message #66003] Thu, 29 October 2009 20:59 Go to previous message
Marty Jones is currently offline Marty JonesFriend
Messages: 54
Registered: July 2009
Member
Looking at the source for the GridColumn. I don't see a way to set the font for the GridColumn. I added a getHeaderFont and setHeaderFont() method to the GridColumn class and modified the DefaultColumnHeaderRenderer class to use the HeaderFont in the Paint method and it does what you want it to do.

I will submit these changes as a patch to see if they want to incorporate them into the widget.

Marty
Re: Custom Font for Row Headers [message #598509 is a reply to message #494267] Thu, 29 October 2009 22:21 Go to previous message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
Marty Jones wrote:
> I will submit these changes as a patch to see if they want to
> incorporate them into the widget.

Excellent! When you are ready, please submit your patch as an
attachment to a bugzilla report:

https://bugs.eclipse.org/bugs/enter_bug.cgi?classification=T echnology&product=Nebula&component=Grid


After you submit the patch, please drop a note back here on the
newsgroup to tell us the bug number.

Matthew
Re: Custom Font for Row Headers [message #598513 is a reply to message #66003] Fri, 30 October 2009 02:04 Go to previous message
Marty Jones is currently offline Marty JonesFriend
Messages: 54
Registered: July 2009
Member
I have made the changes and uploaded a zip file containing the modified source files.

The bug number is 293743

Here is a link to the patch: https://bugs.eclipse.org/bugs/show_bug.cgi?id=293743

Matthew, I wasn't sure how you guys normally apply patches so I just included the source files that I modified as the patch.

Please let me know if I am suppose to do it differently.

Thanks,

Marty
Re: Custom Font for Row Headers [message #598515 is a reply to message #494291] Fri, 30 October 2009 13:40 Go to previous message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
Marty Jones wrote:
> Matthew, I wasn't sure how you guys normally apply patches so I just
> included the source files that I modified as the patch.
>
> Please let me know if I am suppose to do it differently.

Typically the preferred method is to check out the component source from
CVS into your workspace. Make the changes to source files. Open the
Synchronize view and synchronize the sources with CVS to get a list of
the changed files. Select all the changed files, right click, and
select Create Patch. This wizard will generate a patch in the preferred
format.

If you're using Mylyn with the Mylyn-Bugzilla connector it is a little
easier. When you create the patch, select the clipboard as the patch
destination. Then open the bug in Mylyn, add a new attachment and
select the clipboard as the source.

Matthew
Re: Custom Font for Row Headers [message #598518 is a reply to message #494382] Fri, 30 October 2009 14:17 Go to previous message
Marty Jones is currently offline Marty JonesFriend
Messages: 54
Registered: July 2009
Member
Matthew,

Thank you for the help on how to apply the patch.

I have uploaded a new patch file with the changes.

Marty
Re: Custom Font for Row Headers [message #598887 is a reply to message #494392] Mon, 25 January 2010 12:34 Go to previous message
Mustufa Kasidwala is currently offline Mustufa KasidwalaFriend
Messages: 60
Registered: July 2009
Member
Hi,

I actually requested to have a facility to set custom 'Row Header' fonts. I
guess what you fixed was to have custom 'Column Header' fonts.

--
Thanks and Regards

Mustufa Kasidwala


"Marty Jones" <martybjones@gmail.com> wrote in message
news:hceshf$i4a$1@build.eclipse.org...
> Matthew,
>
> Thank you for the help on how to apply the patch.
>
> I have uploaded a new patch file with the changes.
>
> Marty
Re: Custom Font for Row Headers [message #598891 is a reply to message #509786] Mon, 25 January 2010 12:38 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Looks like. I don't know OTOH if setting a row-header font is already
available if not file a bugzilla. It should be quite trivial to
implement this feature.

Tom

Am 25.01.10 13:34, schrieb Mustufa Kasidwala:
> Hi,
>
> I actually requested to have a facility to set custom 'Row Header' fonts. I
> guess what you fixed was to have custom 'Column Header' fonts.
>
Re: Custom Font for Row Headers [message #598934 is a reply to message #598891] Thu, 28 January 2010 09:42 Go to previous message
Mustufa Kasidwala is currently offline Mustufa KasidwalaFriend
Messages: 60
Registered: July 2009
Member
Yes, there is no facility to set header fonts. Filed bug 301096 for this and
attached a patch for a possible fix.

--
Thanks and Regards

Mustufa Kasidwala


"Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
news:hjk3cl$aqe$1@build.eclipse.org...
> Looks like. I don't know OTOH if setting a row-header font is already
> available if not file a bugzilla. It should be quite trivial to
> implement this feature.
>
> Tom
>
> Am 25.01.10 13:34, schrieb Mustufa Kasidwala:
>> Hi,
>>
>> I actually requested to have a facility to set custom 'Row Header' fonts.
>> I
>> guess what you fixed was to have custom 'Column Header' fonts.
>>
>
Previous Topic:MS Excel like spreadsheet features
Next Topic:MS Excel like spreadsheet features
Goto Forum:
  


Current Time: Fri Dec 27 15:18:30 GMT 2024

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

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

Back to the top