Re: [OpenMap Users] Swing components inside map?

From: Don Dietrick <dietrick_at_bbn.com>
Date: Mon, 13 Sep 2004 15:36:51 -0400

Hi Peter,

You can override OMGraphicHandlerLayer.getItemsForOMGraphicMenu() to
get this behavior, albeit on a right-click. You're supposed to return
a list of java.awt.Components, and I just tested it with a JPanel
containing buttons, and it worked fine.

If you're not familiar with the OMGraphicHandlerLayer and how it uses
the StandardMapMouseInterpreter for handing MouseEvents over its
OMGraphics, this might be helpful:
        
http://openmap.bbn.com/mailArchives/openmap-users/2004-09/3377.html

Hope this helps,

- Don

On Sep 13, 2004, at 3:18 PM, Peter Solderitsch wrote:

>
> All,
>
> I'm trying to implement a feature that works something like this: User
> clicks on a graphic (OMGraphic subclass of some kind) on the map. In
> response, a java panel/swing component of some kind, which may have its
> own nested gui controls like buttons or list boxes, is displayed at a
> particular x,y offset from that selected graphic on the map.
>
> Moreover, I'd like it to be possible for more than one of these
> components to be overlaid at a given time (n of them, where n is the
> number of OMGraphics on the map that are currently in "selected"
> state).
>
> Our current version of the app displays a complicated set of other
> OMGraphics (lines, rectangles, OMText lines, etc) as the popup control,
> but you don't get the full features this way (basically, since that
> panel is made up of OMGraphics, all you can really do is
> select/deselect/drag and drop).
>
> In my first crawl through the javadoc, I haven't found a
> straightforward
> approach to this problem yet - I'm writing this in the hope that it's
> obvious and I've missed it, or that someone else has tackled this (or
> someone to tell me it's impossible).
>
> Thanks,
> -Peter
>
> --
> Peter Solderitsch
> Gestalt, LLC
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Sep 13 2004 - 15:37:09 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:06 EDT