Re: SelectMouseMode

From: Don Dietrick <dietrick@bbn.com>
Date: Fri May 24 2002 - 13:19:26 EDT

Hi Rüdiger,

Instead of connecting things up this way, create a MapHandler, and add
everything to it. They will hook themselves up.

You can add the layers directly to the LayerHandler, but the MouseMode,
LayerHandler, MapBean, MouseDelegator, InformationDelegator should just
be added to a MapHandler.

The examples in 4.5 have been changed to provide this as an example.

Cheers,

Don

On Wednesday, May 15, 2002, at 09:30 AM, Gubler, Rüdiger wrote:

>
> Hello,
>
> i have a problem in receiving Mousevents from the SelectMouseMode.
>
> My Layers are all subclasses of a abstractlayer which looks like this:
>
> public abstract class AbstractLayer
> extends Layer
> implements ComponentListener, ActionListener,
> IRedrawLayer, MapMouseListener
> {
> public String[] getMouseModeServiceList()
> {
> return new String[] { SelectMouseMode.modeID };
> }
>
> public MapMouseListener getMapMouseListener()
> {
> return this;
> }
>
> public void mouseMoved()
> {
> System.out.println( "MouseMoved" );
> }
>
> ....
>
> }
>
> and the following code in the main-class:
>
> mapBean = new BufferedMapBean();
> informationDelegator = new InformationDelegator();
> informationDelegator.setMap( mapBean );
> mouseDelegator = new MouseDelegator( mapBean );
> mouseDelegator.addPropertyChangeListener( informationDelegator );
> layerHandler = new LayerHandler();
> layerHandler.addLayerListener( mapBean );
> layerHandler.setLayers( knownLayers );
> mouseDelegator.setActiveMouseMode( selectMouseMode );
>
> But I never receive a mouse event.
>
>
> Yours Ruediger
>
>
>
>
>
>
>
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri May 24 13:19:40 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT