On Wed, 2006-02-22 at 11:39 -0500, Scott Gilbertson wrote:
> Looking back, I see the ambiguity in my previous email.
> The structure I had in mind was:
>
> class LightweightComponentPeer
> implements LightweightPeer, ComponentPeer
> {
> // (as now, including the repaint implementation)
> }
ok.
> // New class:
> class GtkLightweightContainerPeer
> extends LightweightComponentPeer
> implements ContainerPeer
> {
> // ContainerPeer-specific methods that used
> // to be in GLightweightPeer
> }
Some methods, such as show/hide/setVisible/setBounds/...etc cannot be
no-ops. This is why it is implemented this way.
> // Base java.awt.Toolkit creates generic lightweight peers for
> // both Containers and non-Containers, restoring the
> // functionality that used to be there.
> // (overridden for GTK, but not for QT or XLIB)
> class Toolkit
> {
> protected LightweightPeer createComponent(Component target)
> {
> if (target instanceof Container)
> return new LightweightContainerPeer(target);
> return new LightweightComponentPeer(target);
> }
> }
Ok.
thanks,
Lillian