Hi Anthony,
Thanks for your point.
On 09.09.2013 17:26, Anthony Petrov wrote:
Hi Anton,
The fix looks good I suppose. However, are you sure we want to support transparent content in
embedded components? I understand that it's cool and stuff, but do we have to? We don't support
transparency for heavyweight embedded frames (e.g. applets), why would we want to support it for
the JLF? How are you going to handle mouse events on transparent parts? Will JFXPanel support the
same?
You're right, mouse events will anyway be caught by SwingNode on the transparent area. What would we
do with that? I'm just thinking of the following:
1. Leave the Content Pane opaque.
2. Theoretically. Request a user to set a cutoff shape on the lightweight content, convert it then
to a clip shape for SwingNode.
3. Document the restrictions concerning mouse events, and provide a property which would switch off
the content pane's opacity.
What do you think of the third approach? What if a node behind a semi-transparent SwingNode doesn't
have any interactivity in mind, and simply is a one way display? I just thought there might be an
interest in this functionality. So, providing a documented or even undocumented property could be
useful.
With regards to JFXPanel, as I can see it's the scene which stops transparency of the whole
hierarchy (JFXPanel itself allows zero opacity). Allowing it to be transparent would make the case
symmetrical. Wouldn't it?
Thanks,
Anton.
--
best regards,
Anthony
On 09/03/2013 03:01 PM, Anton V. Tarasov wrote:
Please, review a fix.
jira: https://bugs.openjdk.java.net/browse/JDK-8022512
webrev: http://cr.openjdk.java.net/~ant/JDK-8022512/webrev.0/
Both JLF and its Content Pane are "transparent" to the client app, e.g.
SwingNode, in terms of functionality. They should be physically
transparent as well, in order to support translucent Swing content. This
is the case for JLF, but not for the Content Pane yet.
Thanks,
Anton.