--- old/src/macosx/classes/sun/lwawt/LWToolkit.java 2013-04-23 16:59:27.386184200 +0400 +++ new/src/macosx/classes/sun/lwawt/LWToolkit.java 2013-04-23 16:59:27.148170600 +0400 @@ -53,7 +53,12 @@ private Clipboard clipboard; private MouseInfoPeer mouseInfoPeer; - public LWToolkit() { + /** + * Dynamic Layout Resize client code setting. + */ + private volatile boolean dynamicLayoutSetting = true; + + protected LWToolkit() { } /* @@ -561,4 +566,37 @@ ((LWWindowPeer)w.getPeer()).ungrab(false); } } + + @Override + protected final Object lazilyLoadDesktopProperty(final String name) { + if (name.equals("awt.dynamicLayoutSupported")) { + return isDynamicLayoutSupported(); + } + return super.lazilyLoadDesktopProperty(name); + } + + @Override + public final void setDynamicLayout(final boolean dynamic) { + dynamicLayoutSetting = dynamic; + } + + @Override + protected final boolean isDynamicLayoutSet() { + return dynamicLayoutSetting; + } + + @Override + public final boolean isDynamicLayoutActive() { + // "Live resizing" is active by default and user's data is ignored. + return isDynamicLayoutSupported(); + } + + /** + * Returns true if dynamic layout of Containers on resize is supported by + * the underlying operating system and/or window manager. + */ + protected final boolean isDynamicLayoutSupported() { + // "Live resizing" is supported by default. + return true; + } }