Open a different PieMenu when click on an OMGraphic

20 views
Skip to first unread message

GAsko

unread,
Oct 15, 2019, 5:58:40 AM10/15/19
to openmap-users
Good morning,
i want to implement a PieMenu and not the classic menu, when i click on an OMGraphic.

What is the right way ?
What are the classes that i must Override ?

I see when i right click on an OMGraphic that the getItemsForOMGraphicMenu(OMGraphic omg) is called, i want to call another method that shows a PieMenu.

Thanks to all.

Don Dietrick

unread,
Oct 21, 2019, 12:37:23 PM10/21/19
to GAsko, openmap-users
Hi,

The getItemsForOMGraphicMenu() is called by the StandardMapMouseInterpreter used by the OMGraphicHandlerLayer superclass, and the StandardMapMouseInterpreter is the one choosing to display the items in a JPopupMenu.  You can set your own MapMouseInterpreter on your layer (OMGraphicHandlerLayer subclass) and respond to MouseEvents as you want.  If you extend and override the StandardMapMouseInterpreter.rightClick(…) method, or any other method, you can modify that behavior.

Hope this helps,

Don


--
You received this message because you are subscribed to the Google Groups "openmap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openmap-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openmap-users/deb749d2-3cb2-4190-a505-0c038ca40ffd%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages