Hi Tri,
The problem is in your MouseMode section. You are trying to do too
much... :)
On Thursday, November 14, 2002, at 01:31 AM, Tri Tran wrote:
> I use OpenMapFrame, the status bar is show but NOT the lat/long value.
> Here
> is the code, thanks.
>
> ======================
> import com.bbn.openmap.gui.OpenMapFrame;
> import com.bbn.openmap.*;
> import com.bbn.openmap.layer.*;
> import com.bbn.openmap.gui.*;
> import com.bbn.openmap.event.*;
> import javax.swing.border.BevelBorder;
>
> public class TestOpenMapFrame {
>
> /** Creates a new instance of TestOpenMapFrame */
> public TestOpenMapFrame() {
> try {
> MapHandler mapHandler = new MapHandler();
> o = new OpenMapFrame("Sonacom Sea Watch 1.0");
> mapHandler.add(o);
>
> // Create a MapBean
> MapBean mapBean = new MapBean();
> mapBean.setBorder(new BevelBorder(BevelBorder.LOWERED));
>
> mapHandler.add(mapBean);
>
> // add tool bar
> mapHandler.add(new OMToolSet());
> mapHandler.add(new ToolPanel());
> InformationDelegator infoDelegator = new
> InformationDelegator();
> infoDelegator.setShowInfoLine(true);
> mapHandler.add(infoDelegator);
> // end tool bar
>
Instead of this:
> // add mouse mode
> MouseDelegator mouseDelegator = new
> MouseDelegator(mapBean);
> MouseModePanel mouseModePanel = new
> MouseModePanel(mouseDelegator);
>
> NavMouseMode nmm = new NavMouseMode();
> SelectMouseMode smm = new SelectMouseMode();
> mouseDelegator.addMouseMode(nmm);
> mouseDelegator.addMouseMode(smm);
> // end mouse mode
Try:
mapHandler.add(new MouseDelegator());
mapHandler.add(new MouseModePanel());
mapHandler.add(new NavMouseMode());
mapHandler.add(new SelectMouseMode());
- Don
>
> mapHandler.add(new LayerHandler());
> mapHandler.add(new GraticuleLayer());
>
> o.show();
> } catch (MultipleSoloMapComponentException msmce) {}
> }
>
> /**
> * @param args the command line arguments
> */
> public static void main(String[] args) {
> TestOpenMapFrame example = new TestOpenMapFrame();
> }
>
> OpenMapFrame o;
> }
> ========================
>
> --
> [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 Thu Nov 14 08:08:36 2002
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT