[OpenMap Users] CoordMouseMode

From: Juan Proyecto <juanproyecto@terra.es>
Date: Fri Apr 25 2003 - 13:46:21 EDT

Hi,

    I have a problem using the CoordMouseMode. I´m programming an application but I´m not using the properties files. I am adding all the components on design time.

    I am trying to see the coordinates on my windows just as OpenMap´s Viewer does, when I move my mouse along the map.
I add my layers, which dysplay correctly, the four Modes (Navigation, Gestures, Distance, None), ...
I´m adding too a CoordMouseMode as a static public var when I´m "creating" the application :

/...../

public static LayerHandler manejaCapas;
public static Container Contenedor;
public static int IndiceElementos=0;
public static MapHandler mapHandler = new MapHandler();
public static BufferedMapBean map = new BufferedMapBean();
public static JPanel panelInicio=new JPanel();
public static MouseDelegator raton=new MouseDelegator();
public static NavMouseMode2 nmm2= new NavMouseMode2();
public static SelectMouseMode smm= new SelectMouseMode();
public static DistanceMouseMode dmm= new DistanceMouseMode();
public static NullMouseMode nullmm= new NullMouseMode();
public static Projection proyeccion;
public static InformationDelegator infodele;
public static LayersPanel pancapas=new LayersPanel();
public static JLabel inde;
public static CoordMouseMode cmm;
/....../
I have tried to add in the CoordMouseMode the InformationDelegator, but the application hangs up.

/......./
infodele=new InformationDelegator();
inde=new JLabel();
infodele.setInfoLineHolder(inde);
infodele.setShowInfoLine(true);
infodele.setLightTriggers(true);
infodele.setShowLights(true);
infodele.setMap(map);
infodele.setFloatable(false);

// cmm.setActive(true);
// cmm.setInfoDelegator(infodele);
// System.out.println(cmm.getInfoDelegator());
// mapHandler.add(cmm);

mapHandler.add(infodele);
/....../

getContentPane().add(infodele, BorderLayout.SOUTH);
/......./

The point is that everything works well but nothing is shown in the infolabel but the lights at the lower-right corner indicating the status of each layer.

Could anyone tell me what am I missing?

I would appreciate any help.

        Juan.

--
[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 Apr 25 13:50:14 2003

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