Package com.bbn.openmap

Examples of com.bbn.openmap.LayerHandler


        Layer[] layers = getLayers(props);

        // Use the LayerHandler to manage all layers, whether they are
        // on the map or not. You can add a layer to the map by
        // setting layer.setVisible(true).
        LayerHandler layerHandler = new LayerHandler();
        for (int i = 0; i < layers.length; i++) {
            layers[i].setVisible(true);
            layerHandler.addLayer(layers[i]);
        }

        mapHandler.add(layerHandler);
        System.out.println("Done creating...");
    }
View Full Code Here


        GraticuleLayer graticule = new GraticuleLayer();
        graticule.setProperties(props);
        _layers[0] = graticule;

        //Finish setting up the GUI.
        _layerHandler = new LayerHandler(_layers);
        _layerHandler.addLayerListener(_mapBean);
        _layersMenu = new LayersMenu(_layerHandler);
        _fileMenu = new JMenu("File");

        _httpExample = new JMenuItem("HTTP Example");
View Full Code Here

     * @param someObj the object being removed from the BeanContext
     */
    public void findAndUndo(Object someObj) {
        if (someObj instanceof LayerHandler) {

            LayerHandler lh = (LayerHandler) someObj;
            // Need to check to see if this layerhandler is the
            // same as the one we have !!!!
            if (lh != getLayerHandler()) {
                Debug.message("bc",
                        "LayersMenu asked to remove LayerHandler that is not the same as what is currently held - ignoring request.");
View Full Code Here

             * the map or not. layer.setVisible(true) will add it to
             * the map. The LayerHandler has methods to do this, too.
             * The LayerHandler will find the MapBean in the
             * MapHandler.
             */
            mapHandler.add(new LayerHandler());

            // Add a route layer.
            RouteLayer routeLayer = new RouteLayer();
            routeLayer.setVisible(true);
            // The LayerHandler will find the Layer in the MapHandler.
View Full Code Here

            ((MapBean) someObj).addProjectionListener(this);
            setProjection(((MapBean) someObj).getProjection().makeClone());
        }

        if (someObj instanceof LayerHandler) {
            LayerHandler lh = (LayerHandler) someObj;
            lh.addLayerListener(this);
            setLayers(lh.getLayers());
        }
    }
View Full Code Here

        GraticuleLayer graticule = new GraticuleLayer();
        graticule.setProperties(props);
        _layers[0] = graticule;

        //Finish setting up the GUI.
        _layerHandler = new LayerHandler(_layers);
        _layerHandler.addLayerListener(_mapBean);

        //_omts.add(_mouseModePanel);;

        _cmdAddLayers = new JButton("Add Layers");
View Full Code Here

    public void hookUpGraphicLoaderWithLayer(GraphicLoader gl) {
        if (gl != null) {
            GraphicLoaderPlugIn glpi = new GraphicLoaderPlugIn();
            gl.setReceiver(glpi);
            glpi.setGraphicLoader(gl);
            LayerHandler lh = getLayerHandler();
            PlugInLayer pl = new PlugInLayer();
            pl.setPlugIn(glpi);
            pl.setName(gl.getName());
            pl.setVisible(newLayerVisible);
            if (lh != null) {
                lh.addLayer(pl, newLayerIndex);
            } else {
                // If we haven't seen the LayerHandler yet, add the
                // PlugInLayer to a list that we can use later when
                // the LayerHandler is found.
                if (orphanGraphicLoaderPlugIns == null) {
View Full Code Here

    public void findAndUndo(Object obj) {
        if (obj instanceof LayerHandler) {
            Debug.message("graphicLoader",
                    "GraphicLoaderConnector removing a LayerHandler.");
            LayerHandler lh = getLayerHandler();
            if (lh != null && lh == (LayerHandler) obj) {
                setLayerHandler(null);
            }
        }
    }
View Full Code Here

     */
    protected void createMap(MapHandler mapHandler) {

        double baselineHeight = layerSeparation;

        LayerHandler lh = (LayerHandler) mapHandler.get("com.bbn.openmap.LayerHandler");
        if (lh != null) {
            Debug.message("3d",
                    "LayerMapContent: putting layer graphics on the map.");
            Layer[] layers = lh.getLayers();

            // Back to front makes the sea in the back, and keeps
            // first layers on top, to go with the OpenMap paradigm.
            for (int i = layers.length - 1; i >= 0; i--) {
                Layer layer = layers[i];
View Full Code Here

        // 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);
View Full Code Here

TOP

Related Classes of com.bbn.openmap.LayerHandler

Copyright © 2018 www.massapicom. 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.