OMGraphicsHandlerLayer actually has tool tips built into it. Just
override isHighlightable to be true and override
getToolTipTextFor(OmGraphic). For more info, and some other useful
methods to override see this post:
http://openmap.bbn.com/mailArchives/openmap-users/2004-06/2869.html
Jay
-----Original Message-----
From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com]
On Behalf Of Gao David
Sent: Monday, October 29, 2007 4:24 PM
To: openmap-users_at_bbn.com
Subject: [OpenMap Users] Date: Mon, 29 Oct 2007 16:08:54 -0400
Hi
I seem to be a little confused with the mouse event mechanism in
openmap.
I've got a layer (MapLayer.java) that extends OMGraphicsHandlerLayer and
another class (SM.java) that extends StandardMapMouseListener. I've
override the getMouseModeServiceList() and mouseClicked() in SM.java. I
then created an instance of SM inside my MapLayer class and called
setMouseEventInterpreter. Lastly I use the mapHandler defined in my
MapFrame class to add the SelectMouseMode object.
When I fired up the app, none of the mouse event registered. What am I
doing wrong? My intention is to have a tooltip show up when a user hover
the mouse over an OMGraphic object.
David
--
[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 Oct 29 2007 - 16:39:11 EDT