CTabFolderRenderer can't be usefully subclassed [message #525996] |
Thu, 08 April 2010 09:32  |
Eclipse User |
|
|
|
Correct me if I'm wrong but CTabFolder in 3.6 M6 got a new Renderer
(CTabFolderRenderer) that according to the new and noteworthy:
> CTabFolder has been improved and now allows clients to change its look by implementing their own renderers.
And in the CTabFolderRenderer class header it says:
> Instances of this class provide all of the measuring and drawing functionality
> required by <code>CTabFolder</code>. This class can be subclassed in order to
> customize the look of a CTabFolder.
Which is all fine and dandy, except that CTabFolderRenderer declares ALL
of its useful member variables as having default visibility – which
means that I can't meaningfully create a subclass outside of the
org.eclipse.swt.custom package, since one wouldn't be able to access
these variables otherwise.
Is this an oversight, or part of a plan to tease us with features we
really want but can't have? – or is the mention in New and Noteworthy
for M6 somewhat premature?
Opened a bug against this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=308472
|
|
|
Re: CTabFolderRenderer can't be usefully subclassed [message #525997 is a reply to message #525996] |
Thu, 08 April 2010 09:47  |
Eclipse User |
|
|
|
Presumably, the only things I can override are the drawing of each
element and computing the size.
OK, so this can be subclassed – but it's going to take some work.
On 8/04/10 11:32 PM, Simon Pope wrote:
> Correct me if I'm wrong but CTabFolder in 3.6 M6 got a new Renderer
> (CTabFolderRenderer) that according to the new and noteworthy:
>
>> CTabFolder has been improved and now allows clients to change its look
>> by implementing their own renderers.
>
> And in the CTabFolderRenderer class header it says:
>
>> Instances of this class provide all of the measuring and drawing
>> functionality
>> required by <code>CTabFolder</code>. This class can be subclassed in
>> order to
>> customize the look of a CTabFolder.
>
> Which is all fine and dandy, except that CTabFolderRenderer declares ALL
> of its useful member variables as having default visibility – which
> means that I can't meaningfully create a subclass outside of the
> org.eclipse.swt.custom package, since one wouldn't be able to access
> these variables otherwise.
>
> Is this an oversight, or part of a plan to tease us with features we
> really want but can't have? – or is the mention in New and Noteworthy
> for M6 somewhat premature?
>
> Opened a bug against this:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=308472
>
|
|
|
Powered by
FUDForum. Page generated in 0.14661 seconds