Re: [OpenMap Users] jpopupmenu after click?

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 10 Aug 2004 10:42:38 -0400

On Aug 10, 2004, at 10:31 AM, Ben Podoll wrote:

> Thanks! But it always returns a null List, how do I populate the
> OMGraphic
> with a List of MenuItems? Or is it getting it from the AppObject in
> some
> way?

It works the other way - you provide the list to be displayed, based
on the provided OMGraphic. You have to configure the list times with
action listeners that trigger the desired events.

>
> 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.

- Don


>
> ~Ben
>
> FYI: By the way I do extend the OMGraphicHandlerLayer for all my
> Layers and
> all the other mouse events and such seem to work fine...
>
>> -----Original Message-----
>> From: Don Dietrick [mailto:dietrick_at_bbn.com]
>> Sent: Tuesday, August 10, 2004 8:48 AM
>> To: Ben Podoll
>> Cc: openmap-users_at_bbn.com
>> Subject: Re: [OpenMap Users] jpopupmenu after click?
>>
>> The OMGraphicHandlerLayer.getItemsForOMGraphicMenu(OMGraphic) will be
>> called when you right-click on an OMGraphic. You return a
>> java.util.List of MenuItems you want displayed on the map.
>>
>> - Don
>>
>>
>>
>> On Aug 10, 2004, at 9:38 AM, Ben Podoll wrote:
>>
>>> Thanks, yes I see the fire* methods although I don't see a
>>> firePopUpMenu()
>>> method which I may need, since I have to have the "popup thing" have
>> a
>>> selectable button/item as I describe below. Is there a way of doing
>>> that
>>> with a method already in place?
>>>
>>>> -----Original Message-----
>>>> From: Don Dietrick [mailto:dietrick_at_bbn.com]
>>>> Sent: Monday, August 09, 2004 7:37 PM
>>>> To: Ben Podoll
>>>> Cc: openmap-users_at_bbn.com
>>>> Subject: Re: [OpenMap Users] jpopupmenu after click?
>>>>
>>>> Ben,
>>>>
>>>> If you make your layer extend OMGraphicHandlerLayer, you get all
>> this
>>>> for free. The
>> com.bbn.openmap.omGraphics.event.GestureResponsePolicy
>>>> that the layer implements are all you have to override.
>>>>
>>>> All layers have a connection to the InformationDelegator that
>> handles
>>>> displaying web pages, putting information in the InfoLine, making
>>>> pop-up message windows, and handing tooltips - look at the Layer
>> class
>>>> for the fire* methods.
>>>>
>>>> The GestureResponsePolicy methods get called to handle tooltips and
>>>> popup menus, so you don't have to implement code to search which of
>>>> your OMGraphics is under the mouse. You just respond to the calls.
>>>>
>>>> I think this stuff is in the developers guide.
>>>>
>>>> - Don
>>>>
>>>> On Aug 9, 2004, at 7:56 PM, Ben Podoll wrote:
>>>>
>>>>> I want information to popup when a user clicks on a certain portion
>>>> of
>>>>> my
>>>>> map. Should I use a JPopUpMenu?
>>>>>
>>>>> The reason I can't use a ToolTip is because there needs to be a way
>>>>> for the
>>>>> user to click on what pops up to change another part of the GUI
>> (with
>>>>> details).
>>>>>
>>>>> Just looking for advice or input from someone that may have done
>> this
>>>>> in the
>>>>> past...
>>>>>
>>>>> What I am getting at is something that pops up that looks like
>> this:
>>>>>
>>>>> |------------------|
>>>>> |Temp: 68F |
>>>>> |Humidity: 58F |
>>>>> |Wind Speed: 12mph |
>>>>> |------------------|
>>>>> |See Details... |
>>>>> |------------------|
>>>>>
>>>>> Where the "See Details..." would be a clickable option to the
>> user...
>>>>>
>>>>> The one other issue would be how to get the pop up menu to
>> disappear,
>>>>> so I
>>>>> may even need something along these lines:
>>>>>
>>>>> |------------------|
>>>>> |Close |
>>>>> |------------------|
>>>>> |Temp: 68F |
>>>>> |Humidity: 58F |
>>>>> |Wind Speed: 12mph |
>>>>> |------------------|
>>>>> |See Details... |
>>>>> |------------------|
>>>>>
>>>>> Where the "Close" is another clickable /thing/ to destroy the
>> popup.
>>>>>
>>>>> Any ideas/suggestions?
>>>>>
>>>>> Thanks,
>>>>> Ben
>>>>>
>>>>>
>>>>> --
>>>>> [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"]
>>>
>>>
>>
>>
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> 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"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Tue Aug 10 2004 - 10:42:46 EDT

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