<AWT Dev> [9] Review Request: 8027324 The spec for Toolkit.setDynamicLayout() and Toolkit.isDynamicLayoutActive() needs to be clarified

Phil Race philip.race at oracle.com
Tue Mar 22 18:12:43 UTC 2016

On 03/22/2016 11:01 AM, Sergey Bylokhov wrote:
>> That flag is used to determine the behaviour of isDynamicLayoutActive()
>> If it is set to "false" then isDynamicLayoutActive() will always return
>> false,
>> (regardless of what the underlying platform is doing)
>> If it is set to "true" then isDynamicLayoutActive() will will consult
>> the desktop property which is *supposed* to reflect the platform support
>> and so should agree with what the desktop property says.
> Nope, the isDynamicLayoutActive() always returns the current status.
> It cannot return true if this feature is unsupported by the OS, but it 
> can return true if the user sets the flag to false, but the OS cannot 
> disable the feature.

In that case I don't think the old wording or your current re-wording is 
The latter looks like this :-

11      * Returns whether dynamic layout of Containers on resize is currently
  212      * active (both set in program ({@code isDynamicLayoutSet()}), and supported
  213      * by the underlying operating system and/or window manager).

That "and" means *both* conditions must be true for this to return true, whereas
you are telling me that even if I call setDynamicLayout(false) it might return true.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20160322/75c7ef11/attachment-0001.html>

More information about the awt-dev mailing list