Placed a new version in GIT, tests are green as well. I'm quite pleased with
the improvements. Going to take a peek at CornerMenu to see if it makes sense
to refactor it also.
Tom
My internet provider has problems sending to GMail addresses.
For me it worked to register to scene.getRoot().
I like registering to a node, because it allows to install different menu's to
different nodes, but still do the most common approach of install a single menu
to the top level pane.
Somehow I didn't get your previous email that you are quoting now.
Listening to MOUSE_MOVED events on the Scene seemed to work for me.
Didn't it work for you? You may as well install the menu to a Scene
instead of a Node. That will also simplify listening to scene's
events, because you don't have
Ah, attaching to Node is a good idea after all!
Tom
On 2014-6-10 17:44, Tom Eugelink wrote:
Thanks for all the help, you've given me a lot of helpful tips. I already was
working on a popup based version and I see you ran into the same problems as I
did (initial popup had no width for the c
Thanks for all the help, you've given me a lot of helpful tips. I already was
working on a popup based version and I see you ran into the same problems as I
did (initial popup had no width for the circularPane, etc), the difference is
that I bind the menu to Stage, since I do not envision Circ
Here it is, using a Popup:
https://github.com/TomasMikula/jfxtras-labs/blob/8.0/src/main/java/jfxtras/labs/scene/menu/CirclePopupMenu2.java
https://github.com/TomasMikula/jfxtras-labs/blob/8.0/src/main/java/jfxtras/labs/scene/menu/Sample2.java
The nice thing about popup window is that it can exten
Just because I wanted to make minimal changes to your code, which was
already using StackPane. Yes, Popup would remove the need for a
StackPane.
On Tue, Jun 10, 2014 at 3:52 PM, Tom Eugelink wrote:
>
> You're way ahead of me. Why use stackpane and not popup as suggested?
> Wouldn't Popup remove t
You're way ahead of me. Why use stackpane and not popup as suggested? Wouldn't
Popup remove the need for a stackpane?
Tom
On 2014-6-10 15:38, Tomas Mikula wrote:
Since talk is cheap, I slightly reworked your code (not using
PopupWindow) and it seems to work.
CircularPopupMenu:
https://gith
Since talk is cheap, I slightly reworked your code (not using
PopupWindow) and it seems to work.
CircularPopupMenu:
https://github.com/TomasMikula/jfxtras-labs/blob/8.0/src/main/java/jfxtras/labs/scene/menu/CirclePopupMenu1.java
Sample:
https://github.com/TomasMikula/jfxtras-labs/blob/8.0/src/mai
What about using Popup, which is a subclass of PopupWindow? You just need
to populate its content
popup.getContent().addAll(Node...);
and then show it at the right position, relative to any node
popup.show(canvas, x, y);
Tomas
On Jun 10, 2014 8:49 AM, "Tom Eugelink" wrote:
>
> Looking
Looking at PopupWindow; that is an abstract class and I'm not finding much
examples on how to use it. Maybe extending PopupControl would be a better
choice.
Been looking at the ContextMenu source code (which is extending PopupControl),
but it is somewhat mysterious how those MenuItems get ren
Hi Tom,
I am in favor of the menu being a PopupWindow, but alternatively,
could your "canvas" be a Group instead of a Pane?
The code would look like this:
StackPane stack = new StackPane();
Group canvas = new Group();
canvas.setManaged(false);
stack.setOnMousePressed(e -> {
But a PopupWindow would be detached from the pane? Not sure if that is what I
envision, but I'll give it a go and see what it looks like.
Your event filter does work though for what I need now.
Thanks!
On 2014-6-9 10:41, Martin Sladecek wrote:
Oh, I see. So it's not a PopupWindow at all.
Eve
Oh, I see. So it's not a PopupWindow at all.
Events can pass only though parent-child hierarchy, so you can't catch
an Event in your "circular menu" pane and then pass it to some other
children of the parent StackPane. The menu pane would have to be parent
of the controls in the StackPane.
So a
Or to see in in action with a single java -jar statement, download the samples
from.
http://jfxtras.org/
On 2014-6-9 10:13, Martin Sladecek wrote:
OK, so to avoid further confusion, you have a PopupWindow with a Pane and you
want to capture Events on the Pane and sent those events to the un
No, I require a StackPane, to which a special "canvas" Pane is added. And on
that Pane a circular shaped menu is placed. The separate pane prevents conflicting with
other nodes that may be drawn, the stack pane makes sure the menu is on top.
See the blog post about both corner menu and circle
OK, so to avoid further confusion, you have a PopupWindow with a Pane
and you want to capture Events on the Pane and sent those events to the
underlying controls (in a parent window) if those events are not
relevant to that popup?
Thanks,
-Martin
On 06/09/2014 10:07 AM, Tom Eugelink wrote:
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 pi
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 contr
Ye. 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 .add
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
htt
21 matches
Mail list logo