Different behavior in dock vs runner

0 views
Skip to first unread message

Pär Dahlberg

unread,
Aug 25, 2009, 7:16:15 PM8/25/09
to widget...@googlegroups.com
Hi

Probably mostly directed to you Stephen :)

I created a popup menu (click on the icon to the right on each list item), but it only shows when the widget is undocked. When the widget is docked it's not beeing shown. Any idea?

http://widgetfx.org/dock/launch.jnlp?arg=http://pmdit.se/widgets/clipboardmanager/launch.jnlp
Source: http://code.google.com/p/widgetfx/source/browse/#svn/trunk/widgets/ClipboardManager

/M v h Pär
Welcome to my blog, mostly about programming: http://www.pmdit.se/blog

Pär Dahlberg

unread,
Aug 26, 2009, 7:47:44 AM8/26/09
to widget...@googlegroups.com
I just tried this at work where I'm only running two widgets and noticed that the menu actually shows, but the MouseEvent.scene.y coordinates are relative the the widget's position in the dock. So the reason why I never saw a menu at home was that the Y coordinates positioned it outside the screen. Quite natural that the scene is the whole dock instead of just the widget. So I guess I don't have a problem for you today :)


/M v h Pär
Welcome to my blog, mostly about programming: http://www.pmdit.se/blog


Stephen Chin

unread,
Aug 28, 2009, 3:54:19 AM8/28/09
to widget...@googlegroups.com
Glad you were able to figure out the problem... hopefully they will put
in Pop-up support in the next JavaFX release, because as you discovered
it is non-trivial to implement.

Cheers,
--Steve
--
--Steve
blog: http://steveonjava.com/

Pär Dahlberg

unread,
Aug 30, 2009, 5:54:45 PM8/30/09
to widget...@googlegroups.com
Indeed... I solved it with the Node#localToParent method. I'll write a blog post about that and some other stuff in a week or so.

BTW, I've committed it to the ClipboardManager project in WidgetFX if someone wants to look at the two lines of code... not much, but might save someone some time...

/M v h Pär
Welcome to my blog, mostly about programming: http://www.pmdit.se/blog


Reply all
Reply to author
Forward
0 new messages