Examples of MapHandler


Examples of com.bbn.openmap.MapHandler

                if (loc != null) {
                    x = (int) loc.getX();
                    y = (int) loc.getY();
                }

                MapHandler mh = (MapHandler) getBeanContext();
                Frame frame = null;
                if (mh != null) {
                    frame = (Frame) mh.get(java.awt.Frame.class);
                }

                ws.displayInWindow(frame, x, y, w, h);
            }
        };
View Full Code Here

Examples of com.bbn.openmap.MapHandler

                ws = new ScrollPaneWindowSupport(ccp, i18n.get(CoordsMenuItem.class,
                        "combinedCoordDialog.title",
                        "Go To Coordinates..."));
            }

            MapHandler mh = getMapHandler();
            Frame frame = null;
            if (mh != null) {
                frame = (Frame) mh.get(java.awt.Frame.class);
            }

            ws.displayInWindow(frame);
        }
    }
View Full Code Here

Examples of com.bbn.openmap.MapHandler

        // Store the given properties for later use.
        properties = props;

        // Create the MapHandler, which allows all the components to
        // find each other if they are added to it.
        MapHandler mapHandler = new MapHandler();
        // Create the MapBean.
        MapBean map = new MapBean();
        // Set the map's center property
        map.setCenter(new LatLonPoint(43.0f, -95.0f));
        // Add the MapBean to the MapHandler.
        mapHandler.add(map);

        // Add the map to the JFrame
        getContentPane().add(map, BorderLayout.CENTER);

        // Create a mouse delegator to handle mouse events on the map
        mapHandler.add(new MouseDelegator());
        // Create and add the MouseMode that the RouteLayer wants
        // events from. The MouseDelegator asks all layers which
        // MouseMode they listen to, and hooks them up. When that
        // MouseMode is active, events flow to the top layer, then
        // down to lower layers if the event is not consumed along the
        // way.
        mapHandler.add(new SelectMouseMode());

        // Add a LayerHandler, which manages all layers, on or off.
        mapHandler.add(new LayerHandler());

        // Create and add a Political Background
        Layer layer = createPoliticalLayer();
        if (layer != null)
            mapHandler.add(layer);

        // Create and add a Route Layer. The LayerHandler will find
        // it via the LayerHandler, and then the LayerHandler will add
        // it to the map because layer.isVisible() == true;
        layer = createRouteLayer();
        if (layer != null) {
            layer.setName("Routes");
            mapHandler.add(layer);
        }

        // Add some navigation tools. The ToolPanel will find the
        // OMToolSet (a Tool) in the MapHandler.
        ToolPanel toolPanel = new ToolPanel();
        mapHandler.add(toolPanel);
        mapHandler.add(new OMToolSet());
        // Add the ToolPanel to the JFrame.
        getContentPane().add(toolPanel, BorderLayout.NORTH);

        // Oh, for fun, lets add a GUI to control the layers. A
        // button to launch it will get added to the ToolPanel.
        mapHandler.add(new LayersPanel());

        // You can add other components from the com.bbn.openmap.gui
        // package...
    }
View Full Code Here

Examples of com.bbn.openmap.MapHandler

     *
     * @param selectedTiles2
     */
    protected void goTo(ImageTile[] selectedTiles2) {
        if (mapBean == null) {
            MapHandler bc = (MapHandler) getBeanContext();
            if (bc != null) {
                mapBean = (MapBean) bc.get(com.bbn.openmap.MapBean.class);
            }
        }

        if (mapBean != null) {
            if (selectedTiles != null && selectedTiles.length > 0) {
View Full Code Here

Examples of com.bleujin.framework.db.bean.handlers.MapHandler

  String query = "select * from copy_sample order by no1" ;
 
  public void testMapHandler() throws Exception {
    Rows rows = dc.getRows(query, 10, 1) ;
    Map results = (Map)rows.toHandle(new MapHandler()) ;
   

    assertEquals(2, results.size()) ;

    assertEquals("1", results.get("no1").toString()) ;
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.MapHandler

  public void updateRecord(String tableName, String primaryKeyName, Map columnMap
  throws ControllerException  {
   
    Connection conn = null;
    QueryRunner queryRunner = new QueryRunner(dataSource);
    ResultSetHandler rsh = new MapHandler();
    String sql = null;

    try {
      conn = dataSource.getConnection();
      conn.setAutoCommit(false)// Start transaction
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.MapHandler

      System.out.println(se.getMessage());
      return;
    }
   
    QueryRunner runner = new QueryRunner();
    ResultSetHandler rsh = new MapHandler();
    String sql = "select * from Client where (ClientID=1)";
    Map clientMap = null;
    try {
      clientMap = (Map) runner.query(conn, sql, null, rsh);
    } catch (SQLException se) {
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.MapHandler

    } else {
      sql += " set acount unlock";
    }
     
    QueryRunner queryRunner = new QueryRunner(DataSourceHandler.getDataSource());
    ResultSetHandler rsh = new MapHandler();
    try {
      queryRunner.update(sql);
    } catch (SQLException se) {
      log.warning("SystemDBController: " + se.getMessage());
      throw new ControllerException(se);
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.MapHandler

    if (groupList != null) {
      sql += " set groups '" + groupList +"'";
    }
   
    QueryRunner queryRunner = new QueryRunner(DataSourceHandler.getDataSource());
    ResultSetHandler rsh = new MapHandler();
    try {
      queryRunner.update(sql);
    } catch (SQLException se) {
      log.warning("SystemDBController: " + se.getMessage());
      throw new ControllerException(se);
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.MapHandler

   
    // Create user in system database as well.
    String sql = "select * from SYS_INFO.sUSRPassword";
    sql += " where (UserName='" + userName + "')";
    QueryRunner queryRunner = new QueryRunner(DataSourceHandler.getDataSource());
    ResultSetHandler rsh = new MapHandler();

    try {
      return (Map) queryRunner.query(sql, rsh);
    } catch (SQLException se) {
      log.warning("SystemDBController: " + se.getMessage());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.