Scene Builder presently displays menu items where there is a public
setter/getter for a class.
Should it also display them when there is a default setter/getter implemented
in an interface?
That would allow control of the menus for concrete subclasses of a common
abstract class where individual subclasses might implement a different set of
related interfaces.
__________________
From: openjfx-dev <[email protected]> on behalf of
[email protected] <[email protected]>
Sent: Monday, June 09, 2014 9:08 AM
To: [email protected]
Subject: openjfx-dev Digest, Vol 31, Issue 13
Send openjfx-dev mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.openjdk.java.net/mailman/listinfo/openjfx-dev
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of openjfx-dev digest..."
Today's Topics:
1. Re: Node lookup with TabPane (Jonathan Giles)
2. Re: SceneBuilder 2.0 import custom components from Jar
(Jonathan Giles)
3. monitor mouse events but not capture them (Tom Eugelink)
4. Re: monitor mouse events but not capture them (Martin Sladecek)
5. Re: monitor mouse events but not capture them (Tom Eugelink)
6. Re: monitor mouse events but not capture them (Martin Sladecek)
7. Re: monitor mouse events but not capture them (Tom Eugelink)
----------------------------------------------------------------------
Message: 1
Date: Mon, 09 Jun 2014 08:44:15 +1200
From: Jonathan Giles <[email protected]>
To: [email protected]
Subject: Re: Node lookup with TabPane
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Christian,
There is no reason why this shouldn't work - please file a bug report in
our Jira bug tracker and we can take a look at resolving this.
Thanks,
-- Jonathan
On 8/06/2014 8:31 p.m., Christian wrote:
Hi,
I'm not sure if this is a bug because it looks like it is designed
this way.
I just tried to do a TabPane.lookupAll("#myId") which does not return
any result.
This is because the TabPane doesn't add the Tabs(which are no nodes)
to its children.
If it would add the content of each pane to the children the lookup
would work.
My solution right now is to scan the scenegraph myself.
It is just not that easy to determine when to use lookupAll and when
to manually scan the scenegraph.
Didn't yet check it but I think the same might apply to containers
like Accordion.
Would be nice if somebody could give me some clarification.
Thanks,
Christian
Unit Test:
public class TabTest {
@Test
public void testLookup() throws Exception {
TabPane tabPane = new TabPane();
Tab tab1 = new Tab("tab1");
tabPane.getTabs().add(tab1);
StackPane content = new StackPane();
TextField nodeWithId = new TextField();
nodeWithId.setId("test");
content.getChildren().add(nodeWithId);
tab1.setContent(content);
assertSame(nodeWithId, content.lookup("#test"));
Set<Node> idNodes = tabPane.lookupAll("#test");
assertEquals(1,idNodes.size());
assertSame(nodeWithId, tabPane.lookup("#test"));
}
}
------------------------------
Message: 2
Date: Mon, 09 Jun 2014 08:56:56 +1200
From: Jonathan Giles <[email protected]>
To: [email protected]
Subject: Re: SceneBuilder 2.0 import custom components from Jar
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Christian,
With my OpenJFX hat on:
=======================
ControlsFX-related issues are best discussed on the controlsfx-dev
mailing list, which can be accessed (and signed up to) here:
http://groups.controlsfx.org
Scene Builder is open source - you can access it by cloning the OpenJFX
rt repo, and you'll find the Scene Builder source code in apps/scenebuilder.
With my ControlsFX hat on:
=======================
Regarding getting ControlsFX to play nicer with Scene Builder - that is
really a matter for the ControlsFX project to resolve. ControlsFX needs
to follow the requirements of Scene Builder and FXML, and I'm not 100%
clear on what the definitive list of requirements is, but I know some of
the requirements include having a public no-args constructor, and using
@NamedArg on constructor parameters to define the parameter name. I have
been hoping someone from the community would step up to make ControlsFX
more FXML and Scene Builder compliant. If you're interested please ping
me off-list.
Relatedly, I recently asked if the Scene Builder team if someone could
take a quick look at ControlsFX to cast their expert eyes over the API
and let me know what is and isn't going to work well for them.
Thanks,
-- Jonathan
On 8/06/2014 8:24 p.m., Christian wrote:
Hi,
I was trying to import controlsfx-5.0.6 and controlsfx-5.0.6_20 into
scenebuilder.
However only some or few controls could be imported.
When using these controls strange effects happen.
I was looking into the user guide in order to determine the
requirements that have to be met by the components in the jar file.
However there was just a simple guideline about how to import and not
how to develop custom components so that they match the scenebuilder.
I further turned the logging level of the scenbuilder to finest and
hoped to see at least some stacktraces that might give me a hint.
But I only saw stacktraces when using the imported components (mainly
belonging to missing resources because of classpath problems) nothing
from the import/jarfile-scan itself.
I was hoping that I can adjust the controlsfx classes so that they
work fine with the scenebuilder.
Any hints are more then welcome!
ps.:
It seems that scenebuilder is closed source, or is the some source out
there I could start with?
Is there an early access release for 8u20?
Thanks,
Christian
------------------------------
Message: 3
Date: Mon, 09 Jun 2014 08:19:27 +0200
From: Tom Eugelink <[email protected]>
To: "[email protected]" <[email protected]>
Subject: monitor mouse events but not capture them
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi all,
Maybe someone has solved this already, so I thought I pop the question.
Currently I'm working on CirclePopupMenu; a menu that is supposed to pop up on
any place in a scene when a certain (usually the middle or right) mouse button
is pressed.
Right now CirclePopupMenu requires a stackpane to which it binds itself. CirclePopupMenu
initially places an empty "canvas" Pane on the stack pane, and will use that to
render and position the menu when it needs to appear.
Also I need to monitor the mouse to detect if the menu should appear. In order
to do that, I would like to use that canvas pane, but then any non relevant
button clicks will not reach the underlying controls. In order to enable
correct behavior I need to setPickOnBounds(false) on the pane, but then it does
receive the mouse events anymore.
Is there any way to monitor mouse events but still pass them through to the
underlying controls? In Swing I did something similar and used a system level
mouse event hook.
Tom
PS: I'm not certain if the stackpane approach I've used is the best way to do
this. It does work expect the mouse button problem. But any suggestions are
welcome.
------------------------------
Message: 4
Date: Mon, 09 Jun 2014 08:29:35 +0200
From: Martin Sladecek <[email protected]>
To: [email protected]
Subject: Re: monitor mouse events but not capture them
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi Tom,
have you tried .addEventFilter() method? It receives the Event before
the controls underneath the canvas, in the capturing phase. If you don't
consume the Event, it should pass down to the controls.
For more on the topic, see
http://docs.oracle.com/javafx/2/events/processing.htm or
http://parleys.com/play/514892290364bc17fc56c39f
-Martin
On 06/09/2014 08:19 AM, Tom Eugelink wrote:
Hi all,
Maybe someone has solved this already, so I thought I pop the
question. Currently I'm working on CirclePopupMenu; a menu that is
supposed to pop up on any place in a scene when a certain (usually the
middle or right) mouse button is pressed.
Right now CirclePopupMenu requires a stackpane to which it binds
itself. CirclePopupMenu initially places an empty "canvas" Pane on the
stack pane, and will use that to render and position the menu when it
needs to appear.
Also I need to monitor the mouse to detect if the menu should appear.
In order to do that, I would like to use that canvas pane, but then
any non relevant button clicks will not reach the underlying controls.
In order to enable correct behavior I need to setPickOnBounds(false)
on the pane, but then it does receive the mouse events anymore.
Is there any way to monitor mouse events but still pass them through
to the underlying controls? In Swing I did something similar and used
a system level mouse event hook.
Tom
PS: I'm not certain if the stackpane approach I've used is the best
way to do this. It does work expect the mouse button problem. But any
suggestions are welcome.
------------------------------
Message: 5
Date: Mon, 09 Jun 2014 08:44:33 +0200
From: Tom Eugelink <[email protected]>
To: [email protected]
Subject: Re: monitor mouse events but not capture them
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Yessss. It does not work on the canvas pane, I suspect because of the
pickOnBounds, but it does work on the stackpane. Plus, I can register to the
stack pane without claiming the onMouseClick/Press hook.
Many thanks!
Tom
On 2014-6-9 8:29, Martin Sladecek wrote:
Hi Tom,
have you tried .addEventFilter() method? It receives the Event before the
controls underneath the canvas, in the capturing phase. If you don't consume
the Event, it should pass down to the controls.
For more on the topic, see
http://docs.oracle.com/javafx/2/events/processing.htm or
http://parleys.com/play/514892290364bc17fc56c39f
-Martin
On 06/09/2014 08:19 AM, Tom Eugelink wrote:
Hi all,
Maybe someone has solved this already, so I thought I pop the question.
Currently I'm working on CirclePopupMenu; a menu that is supposed to pop up on
any place in a scene when a certain (usually the middle or right) mouse button
is pressed.
Right now CirclePopupMenu requires a stackpane to which it binds itself. CirclePopupMenu
initially places an empty "canvas" Pane on the stack pane, and will use that to
render and position the menu when it needs to appear.
Also I need to monitor the mouse to detect if the menu should appear. In order
to do that, I would like to use that canvas pane, but then any non relevant
button clicks will not reach the underlying controls. In order to enable
correct behavior I need to setPickOnBounds(false) on the pane, but then it does
receive the mouse events anymore.
Is there any way to monitor mouse events but still pass them through to the
underlying controls? In Swing I did something similar and used a system level
mouse event hook.
Tom
PS: I'm not certain if the stackpane approach I've used is the best way to do
this. It does work expect the mouse button problem. But any suggestions are
welcome.
------------------------------
Message: 6
Date: Mon, 09 Jun 2014 09:46:33 +0200
From: Martin Sladecek <[email protected]>
To: [email protected]
Subject: Re: monitor mouse events but not capture them
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Just looked at the code and it seems Canvas does pick on bounds
independently of the pickOnBounds value. There's currently no logic for
picking only when over an opaque pixel ( worth filing a JIRA issue
maybe?). This makes Canvas to consume everything as it's always picked
instead of some controls underneath.
Unfortunately, I can't think of any solution that would work right now.
If we'd support Node picking
(https://javafx-jira.kenai.com/browse/RT-20184), it would be possible to
"redirect" an unwanted event to a different event target on that mouse
position.
-Martin
On 06/09/2014 08:44 AM, Tom Eugelink wrote:
Yessss. It does not work on the canvas pane, I suspect because of the
pickOnBounds, but it does work on the stackpane. Plus, I can register
to the stack pane without claiming the onMouseClick/Press hook.
Many thanks!
Tom
On 2014-6-9 8:29, Martin Sladecek wrote:
Hi Tom,
have you tried .addEventFilter() method? It receives the Event before
the controls underneath the canvas, in the capturing phase. If you
don't consume the Event, it should pass down to the controls.
For more on the topic, see
http://docs.oracle.com/javafx/2/events/processing.htm or
http://parleys.com/play/514892290364bc17fc56c39f
-Martin
On 06/09/2014 08:19 AM, Tom Eugelink wrote:
Hi all,
Maybe someone has solved this already, so I thought I pop the
question. Currently I'm working on CirclePopupMenu; a menu that is
supposed to pop up on any place in a scene when a certain (usually
the middle or right) mouse button is pressed.
Right now CirclePopupMenu requires a stackpane to which it binds
itself. CirclePopupMenu initially places an empty "canvas" Pane on
the stack pane, and will use that to render and position the menu
when it needs to appear.
Also I need to monitor the mouse to detect if the menu should
appear. In order to do that, I would like to use that canvas pane,
but then any non relevant button clicks will not reach the
underlying controls. In order to enable correct behavior I need to
setPickOnBounds(false) on the pane, but then it does receive the
mouse events anymore.
Is there any way to monitor mouse events but still pass them through
to the underlying controls? In Swing I did something similar and
used a system level mouse event hook.
Tom
PS: I'm not certain if the stackpane approach I've used is the best
way to do this. It does work expect the mouse button problem. But
any suggestions are welcome.
------------------------------
Message: 7
Date: Mon, 09 Jun 2014 10:07:49 +0200
From: Tom Eugelink <[email protected]>
To: [email protected]
Subject: Re: monitor mouse events but not capture them
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hm, maybe I chose bad words; I'm not using Canvas, but just a Pane. Since the Pane is
only used to draw the menu on when it need to appear, I'm calling it the canvas pane, as
in "what is painted on".
On 2014-6-9 9:46, Martin Sladecek wrote:
Just looked at the code and it seems Canvas does pick on bounds independently
of the pickOnBounds value. There's currently no logic for picking only when
over an opaque pixel ( worth filing a JIRA issue maybe?). This makes Canvas to
consume everything as it's always picked instead of some controls underneath.
Unfortunately, I can't think of any solution that would work right now. If we'd support
Node picking (https://javafx-jira.kenai.com/browse/RT-20184), it would be possible to
"redirect" an unwanted event to a different event target on that mouse position.
-Martin
On 06/09/2014 08:44 AM, Tom Eugelink wrote:
Yessss. It does not work on the canvas pane, I suspect because of the
pickOnBounds, but it does work on the stackpane. Plus, I can register to the
stack pane without claiming the onMouseClick/Press hook.
Many thanks!
Tom
On 2014-6-9 8:29, Martin Sladecek wrote:
Hi Tom,
have you tried .addEventFilter() method? It receives the Event before the
controls underneath the canvas, in the capturing phase. If you don't consume
the Event, it should pass down to the controls.
For more on the topic, see
http://docs.oracle.com/javafx/2/events/processing.htm or
http://parleys.com/play/514892290364bc17fc56c39f
-Martin
On 06/09/2014 08:19 AM, Tom Eugelink wrote:
Hi all,
Maybe someone has solved this already, so I thought I pop the question.
Currently I'm working on CirclePopupMenu; a menu that is supposed to pop up on
any place in a scene when a certain (usually the middle or right) mouse button
is pressed.
Right now CirclePopupMenu requires a stackpane to which it binds itself. CirclePopupMenu
initially places an empty "canvas" Pane on the stack pane, and will use that to
render and position the menu when it needs to appear.
Also I need to monitor the mouse to detect if the menu should appear. In order
to do that, I would like to use that canvas pane, but then any non relevant
button clicks will not reach the underlying controls. In order to enable
correct behavior I need to setPickOnBounds(false) on the pane, but then it does
receive the mouse events anymore.
Is there any way to monitor mouse events but still pass them through to the
underlying controls? In Swing I did something similar and used a system level
mouse event hook.
Tom
PS: I'm not certain if the stackpane approach I've used is the best way to do
this. It does work expect the mouse button problem. But any suggestions are
welcome.
End of openjfx-dev Digest, Vol 31, Issue 13
*******************************************