Thiago suggested in a comment on PR 1605 [0] that the proposed
EXTENDED and EXTENDED_UTILITY stage styles might not be needed, and
that the "extended client area" attribute might be a toggle that is
independent of the stage style. This would allow users to, for
example, combine an extended client area with a transparent window.

While I think that the EXTENDED style is semantically quite different
from all the other stage styles, and as such should be its own stage
style, the idea has some merit.

But instead of making "extended-ness" an independent attribute, we
should look at the TRANSPARENT and UTILITY styles. The argument for
those two being separate stage styles is a lot less convincing. Both
of these could easily be independent attributes:
Stage.initTransparency(boolean) and Stage.initUtility(boolean).

The existing TRANSPARENT style would then be equivalent to the
UNDECORATED style with the initTransparency(true) attribute, while the
existing UTILITY style would be equivalent to the DECORATED style with
the initUtility(true) attribute.

As for PR 1605, this would also eliminate the EXTENDED_UTILITY style.
That would leave us with only three main stage styles [2]: DECORATED,
UNDECORATED, EXTENDED. We would deprecate all other styles (but
probably not for removal).

Having these two attributes as independent toggles would enable more
customization, and it would also solve another enhancement request
that asks for a utility-style undecorated transparent window [1].

What do you think of this idea?

[0] https://github.com/openjdk/jfx/pull/1605
[1] https://bugs.openjdk.org/browse/JDK-8091566
[2] not counting UNIFIED, which seems to be of questionable use

Reply via email to