[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: Component.isDisplayable fixlet and Window method r
From: |
Thomas Fitzsimmons |
Subject: |
Re: [cp-patches] FYI: Component.isDisplayable fixlet and Window method removal |
Date: |
Thu, 15 Sep 2005 14:53:39 -0400 |
On Thu, 2005-09-15 at 20:48 +0200, Roman Kennke wrote:
> Am Donnerstag, den 15.09.2005, 13:42 -0400 schrieb Thomas Fitzsimmons:
> > On Thu, 2005-09-15 at 12:50 -0400, Anthony Balkissoon wrote:
> > > Component.isDisplayable should return true if peer != null. Window no
> > > longer needs to override this method (and it doesn't, according to the
> > > API), so I removed the method from Window.java. Patch attached.
> >
> > Window overrides isDisplayable specifically because
> > Window.isDisplayable's return value should *not* depend on its parents
> > displayability.
>
> Sorry, maybe I misunderstand something here, but are there Windows that
> have a non-null parent?
Yes, a Dialog's parent is its owner Window. We need a Mauve test
demonstrating this.
>
> Also, wouldn't it be sufficent to check if a component has a peer? The
> API docs are a little bit confusing, but that is what it sounds to me.
You mean rather than climbing the parent ladder? Whether or not a
Component is displayable depends on the displayability of its parents.
Whether or not a Window is displayable doesn't.
>
>
> Ok, the effect of Tony's patch is exactly that, that a component is
> displayable if the top-level component has a peer. I think Tony is right
> here. But as always, I would recommend writing testcases to clear up the
> situation (I really have become a fan of mauve).
See the isDisplayable tests in Mauve:
gnu.testlet.java.awt.Frame.isDisplayable1
gnu.testlet.java.awt.Frame.isDisplayable2
gnu.testlet.java.awt.Frame.isDisplayable3
Tom