RE: [OpenMap Users] getting highlight() called from inside an OMRect

From: Rick Lane <lane_richard_b_at_bah.com>
Date: Wed, 30 Mar 2005 15:10:11 -0500

Andrew,

 

My application uses boxes similarly to how you're describing. If you're
wondering how to get the transparency, simply create a Color object with a
less-than-255 value for the alpha component:

 

Color transColor = new Color(255, 0, 0, 100); // This will create a red
color that is transparent

 

Then you can call setFillPaint() with this color.

 

If you're wondering how to highlight when the mouse is inside the OMRect,
then modify the mouseMoved(MouseEvent) function in your layer to find which
OMRects are currently at the current mouse position, and call select()
accordingly.

 

Rick

 

 

  _____

From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com] On
Behalf Of Andrew Schulak
Sent: Wednesday, March 30, 2005 2:56 PM
To: openmap-users_at_bbn.com
Subject: [OpenMap Users] getting highlight() called from inside an OMRect

 

All,

 

I have a bunch of OMRects in an OMGraphicHandlerLayer. I would like the
highlight() and select() methods to be called when the mouse is inside the
OMRect as well as (or rather than) when it is only on the edge?

 

Is there a way to get this functionality?

 

I would not be opposed to using something other than an OMRect, my only
constraint is that it be a bordered box that is clear/transparent in the
middle.

 

Thanks,

Andrew

 



--
[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 Wed Mar 30 2005 - 15:10:53 EST

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