RE: [OpenMap Users] jpopupmenu after click?

From: Ben Podoll <benjamin.podoll_at_und.edu>
Date: Tue, 10 Aug 2004 10:35:03 -0500

> -----Original Message-----
> From: Don Dietrick [mailto:dietrick_at_bbn.com]
> Sent: Tuesday, August 10, 2004 10:22 AM
> To: Ben Podoll
> Cc: openmap-users_at_bbn.com
> Subject: Re: [OpenMap Users] jpopupmenu after click?
>
>
> On Aug 10, 2004, at 10:52 AM, Ben Podoll wrote:
> >>> Regarding the fire* methods:
> >>> This may be a silly question but I tried to put this line in my
> >>> mouseClicked
> >>> and nothing happened:
> >>>
> >>> fireRequestMessage("Hello World");
> >>
> >> Is the mouseClicked method being called? If you are extending
> >> OMGraphicHandlerLayer, some other object (the
> >> StandardMouseModeInterpreter) may be acting on the call.
> >
> > Yes, the method "public boolean mouseClicked(MouseEvent e) {...} is
> > being
> > called and I am doing other things in there, but that
> > fireRequestMessage("Hello World"); doesn't seem to do anything.
>
> Do you have an InformationDelegator (or other InfoDisplayListener) as
> part of your application?

Actually I didn't, but I went back and added it to the openmap.components
and it magically worked (I say magically since I don't quite get how the app
keeps track and hooks to those things)

So my fire* method problem is solved! Thanks.

But my other JPopUpMenu problem I still don't quite understand. I am
overriding a method (getItemsForOMGraphicMenu) that takes a OMGraphic as a
param and then returns a List of JMenuItems, right?

So in my mouseClicked method am I suppose to call that with the graphic that
the click occurred on and then that method just does whatever it needs to
(i.e. gets the AppObject and creates the menu items I want) and returns it
and then I have to manually create a JPopUpMenu and add all the items
returned and then somehow display it near the mouse pointer?



--
[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 Tue Aug 10 2004 - 11:36:09 EDT

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