RE: [OpenMap Users] MouseMode Support for cursorID Property

From: Renton Ian <ian.renton_at_uk.atlas-elektronik.com>
Date: Fri, 25 May 2012 13:07:10 +0100

Thanks Daniel.

I did add the mousemode to my components list.

I've also attempted to set cursorIDs in the properties file of the default build of OpenMap 5.0, just to rule out anything weird I've done in my software, and it doesn't work there either. Are you using 5.0, or an earlier/later one?

For the record I'm also on Sun JRE 6 r23, Win XP 32-bit SP3.

Ian

-- 
Ian Renton
UX / Software Engineer
ATLAS ELEKTRONIK UK
Atlas House, Dorset Green Tech. Park, DT2 8ZB, U.K.
Tel: +44 (0) 1305 212341
-----Original Message-----
From: Straub, Daniel [mailto:Daniel.Straub_at_cassidian.com] 
Sent: 25 May 2012 12:41
To: openmap-users_at_bbn.com
Subject: RE: [OpenMap Users] MouseMode Support for cursorID Property
 Hi,
Using the following lines in the properties-file worked for me:
openmap.components=DistanceMouseMode
DistanceMouseMode.class=com.bbn.openmap.event.DistanceMouseMode
DistanceMouseMode.cursorID=CROSSHAIR_CURSOR
Did you add the mousemode to the components?
In the DistanceMouseMode.java-file i see the following:
// if you really want to change the cursor shape // setModeCursor(cursor.getPredefinedCursor(cursor.CROSSHAIR_CURSOR));
But that should be the same as you did. Perhaps someone else knows what's going wrong here...
Hope I could help.
Daniel Straub
-----Original Message-----
From: Renton Ian [mailto:ian.renton_at_uk.atlas-elektronik.com]
Sent: Friday, May 25, 2012 1:16 PM
To: openmap-users_at_bbn.com
Subject: [OpenMap Users] MouseMode Support for cursorID Property
Hi,
It looks from the source of AbstractMouseMode that MouseModes support a cursorID property that sets the cursor to use when that MouseMode is active.  It looks for one of the static defined cursors in java.awt.Cursor, e.g. CROSSHAIR_CURSOR.
However, I can't get it to work in any MouseMode.  I've tried loading it as a property, e.g.
    distanceMouseMode.cursorID=HAND_CURSOR
...and I've tried extending the class and setting the cursor programatically, e.g.
    public class DistanceMouseMode2 extends DistanceMouseMode
    {
      public DistanceMouseMode2()
      {
        super();
        setModeCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
      }
    }
...but the cursor remains the normal pointer.
Can anyone tell me what I'm doing wrong?
Thanks,
Ian
--
Ian Renton
UX / Software Engineer
ATLAS ELEKTRONIK UK
Atlas House, Dorset Green Tech. Park, DT2 8ZB, U.K.
Tel: +44 (0) 1305 212341
The information contained within this e-mail and any files attached to this e-mail are private and in addition may include commercially sensitive information. The contents of this e-mail are for the intended recipient only and therefore if you wish to disclose the information contained within this e-mail or attached files, please contact the sender prior to any such disclosure.
If you are not the intended recipient, any disclosure, copying or distribution is prohibited. Please also contact the sender and inform them of the error and delete the e-mail, including any attached files from your system. 
Atlas Elektronik UK Limited Registered Office Meadows Road, Queensway Meadows, Newport, South Wales NP19 4SS, UK.  Company No. 05582639
--
[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"]
--
[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"]
The information contained within this e-mail and any files attached to this e-mail are private and in addition may include commercially sensitive information. The contents of this e-mail are for the intended recipient only and therefore if you wish to disclose the information contained within this e-mail or attached files, please contact the sender prior to any such disclosure.
If you are not the intended recipient, any disclosure, copying or distribution is prohibited. Please also contact the sender and inform them of the error and delete the e-mail, including any attached files from your system. 
Atlas Elektronik UK Limited Registered Office Meadows Road, Queensway Meadows, Newport, South Wales NP19 4SS, UK.  Company No. 05582639
--
[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 Fri May 25 2012 - 08:08:17 EDT

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