Okay, if I have to be more serious about it, I
don't like the fact that the 'Composite' notion means two different
things:
1. The widget is some sort of container, and the
user can add controls to it. Examples: Shell, Group.
2. The widget does not have a native equivalent
on some obscure platform, so you have to emulate it for that platform. Typical
example: Table, Tree, Combo, Spinner on Motif. To emulate it in Java =>
inherit from Composite => you have to state in JavaDoc, that you've inherited
from Composite "for your internal needs", but "it does not mean that this is
real composite, where the user can add controls".
-Ivan
----- Original Message -----
Sent: Wednesday, November 24, 2004 9:33
PM
Subject: Composite Obsession
Hey,
Yesterday I started porting the new Spinner
widget to SWT/Fox and oh, horror! The everything-is-composite saga continues!
Why is this widget Composite? Does it make
sense for it to have children?
Also, why are Tree & Table
Composite and List only Scrollable?
In fact, why other controls besides
Canvas, Decorations & Shell inherit from Composite?
-Ivan
|