This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Merging in more AWT stuff


"Rolf W. Rasmussen" wrote:

> > Is this really how BorderLayout is supposed to behave? Shouldn't it take into account the
> > getMaximumSize() values of the child components? Or is this just an interim implementation
> > (in which case a FIXME should be added)?
>
> I believe the implementation is correct.
>
> In all the tests I've done, the Sun implementation returns
> java.awt.Dimension[width=2147483647,height=2147483647].

Right (and now that I read the JCL, it agrees with you).

> The chaining of addNotify() and removeNotify() has the same purpose as
> chaining constructors and finalize() methods; to allow each level of
> the inheritance hierachy to act upon the state change of the object.
> Chaining methods in this manner has sort of become an idiom.
>
> Currently, the only reason the addNotify() method of the base
> class Component should be called, is to execute the following
> statement:
>
> peer.setEventMask(eventMask);

I agree, given that peer-level event filtering is our own extension and there is no public API
for the peer to access the eventMask value.

> But there are probably other things the addNotify() method of Component
> should do. One thing that comes to mind is notification of popup menus.
> Calls to addNotify() should be propagated to all children of the
> component. All AWT components can have PopupMenu instances as
> children, and these instances should be notified by calling their
> addNotify() method.

popup menu notification could also be done from the popup's show() method. But your argument
makes sense. Thanks for clearing that up.

regards

  [ bryce ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]