<AWT Dev> Thoughts about 6402325 (Swing toolbars vs native toolbars on Windows)
Anthony Petrov
Anthony.Petrov at Sun.COM
Tue Aug 25 06:27:45 PDT 2009
Hello,
The following change request has been filed some time ago:
6402325 (Swing toolbars vs native toolbars on Windows)
http://bugs.sun.com/view_bug.do?bug_id=6402325
The RFE proposes to tag toolbar windows so that the native system could
modify their visual appearance and behavior in order to increase the
native fidelity of Java applications. So, what about:
**************************************************
public enum java.awt.Window.Type {
NORMAL,
UTILITY
}
public void java.awt.Window.setType(Type type);
public Type java.awt.Window.getType();
**************************************************
?
Regarding implementation details:
1. The NORMAL windows are, well, the normal top-level windows - just
like all windows currently behave in Java.
2. UTILITY: may have smaller decorations, are not focusable yet display
their title-bar in the focused state when their owner frame is focused
(given the native system supports that). On MS Windows this basically
means setting the WS_EX_PALETTEWINDOW or just plain WS_EX_TOOLWINDOW
extended style (see [1]). On X11 we can set the _NET_WM_WINDOW_TYPE hint
to the _NET_WM_WINDOW_TYPE_TOOLBAR or _NET_WM_WINDOW_TYPE_UTILITY, and
let the window manager decide how to treat these windows ([2]).
The solution is open to further extending the number of supported window
types in the future (POPUP, DOCK, NOTIFICATION, DND - to name a few).
Opinions?
[1] http://msdn.microsoft.com/en-us/library/ms632680(VS.85).aspx
[2] http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2551529
--
best regards,
Anthony
More information about the awt-dev
mailing list