Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [albireo-dev] avoiding layout flickering

Gordon,

> This change sounds reasonable, but I think we need a name different from
> getLayoutableAncestor(). Even getLayoutAncestor() would be preferable to me.

No problem, please go ahead. You are the native English speaker here.

> I'm glad that the preferredSizeChanged() option is still available for
> more advanced cases. Now that the method is no longer abstract, I think
> the advanced case would work even better with an event and listener.
> Events are more flexible because listeners can be added and removed as
> needed, and separately from the SwingControl subclass implementation. I've
> committed a SizeEvent and SizeListener.

The contents of the preferredSizeChanged method was meant to depend on
the controls that are "neighbours" of the SwingControl. Therefore I agree
that an event mechanism makes sense here. The only thing that worries me
is that the getLayoutAncestor() method is also dependent on the
"neighbourhood" but is already needed during the constructor of
SwingControl.

Feel free to remove the preferredSizeChanged method, incorporating its
documentation elsewhere, now that it's redundant.

Bruno


Back to the top