by jriggins » Tue Aug 26, 2008 12:54 pm
So Eric, are you saying that it is ok to subclass SWT widgets?
I've been looking for a clean way to uniformly configure my SWT widget instances. For instance, I want all my Text widgets to change background color on focus, and I want to have the same default font per widget type. At the same time, I need my change to be usable in WindowBuilder. After reading entry after entry on the web about why you should NEVER subclass widgets (everyone seems to assume though that the reader is looking to add custom functionality rather than configure the widget using the existing API), I figured I'd have to use a factory. But as I understand it, that support is not yet there in WindowBuilder (any idea on when it will be?).
I read this post, and decided to try a few examples with subclassing the widgets, and things seem to work well. I just wanted to make sure that in your opinion that use of subclassing is ok.
Thanks!
Jesse