Package com.bbn.openmap

Examples of com.bbn.openmap.Layer


        parseScales(prefix, props);

        // Update our target layer. If there is a current projection and this
        // layer is active, we need to pass it along.
        if (getProjection() != null) {
            Layer currentLayer = configureAppropriateLayer(getProjection().getScale());
            fireStatusUpdate(LayerStatusEvent.START_WORKING);
            currentLayer.projectionChanged(new ProjectionEvent((Object) null, getProjection()));
        }
    }
View Full Code Here


        }
        props.put(prefix + transitionScalesProperty, tsBuffer.toString());

        StringBuffer layerBuffer = new StringBuffer();
        for (Iterator it = getLayers().iterator(); it.hasNext();) {
            Layer layer = (Layer) it.next();
            layerBuffer.append(layer.getPropertyPrefix() + " ");
            layer.getProperties(props);
        }
        props.put(prefix + layersProperty, layerBuffer.toString());

        return props;
    }
View Full Code Here

        if ((targetIndex < 0) || (targetIndex > target.size())) {
            return SinkLayer.getSharedInstance();
        }

        Layer l = (Layer) target.elementAt(targetIndex);
        return l;
    }
View Full Code Here

                obj = SinkLayer.getSharedInstance();
            }

            // create the layer and set its properties
            if (obj instanceof Layer) {
                Layer l = (Layer) obj;
                l.setProperties(layerName, props);
                l.addLayerStatusListener(this);
                l.addInfoDisplayListener(this);
                layers.addElement(l);
            }
        }
    }
View Full Code Here

        if (proj == null) {
            Debug.error("ScaleFilterLayer.renderDataForProjection: null projection!");
            return;
        } else {
            setTargetIndex(proj.getScale());
            Layer layer = getAppropriateLayer();
            layer.renderDataForProjection(proj, g);
        }
    }
View Full Code Here

        // Lets the ScaleFilterLayer remember the projection, just in case.
        setProjection(ev);

        Projection proj = ev.getProjection();
        // get the appropriate layer and invoke projectionChanged
        Layer layer = configureAppropriateLayer(proj.getScale());

        fireStatusUpdate(LayerStatusEvent.START_WORKING);
        layer.projectionChanged(ev);
    }
View Full Code Here

        fireStatusUpdate(LayerStatusEvent.START_WORKING);
        layer.projectionChanged(ev);
    }

    protected Layer configureAppropriateLayer(float scale) {
        Layer currentLayer = getAppropriateLayer();
        boolean changed = setTargetIndex(scale);

        // get the appropriate layer and invoke projectionChanged
        Layer layer = getAppropriateLayer();
        if (changed) {
            currentLayer.removeNotify();
            setPaletteTab(targetIndex);
            remove(currentLayer);

            // This will handle the repaint() requests from the
            // layer...
            add(layer);
            layer.addNotify();
            checkMouseMode();
        }

        return layer;
    }
View Full Code Here

            c.gridy = 0;
            gridbag.setConstraints(gotoButton, c);
            bfPanel.add(gotoButton);

            while (it.hasNext()) {
                Layer layer = (Layer) it.next();
                Component layerGUI = layer.getGUI();
                if (layerGUI != null) {
                    tabs.addTab(layer.getName(), layerGUI);
                } else {
                    tabs.addTab(layer.getName(), getEmptyGUIFiller(layer));
                }
            }
            panel.add(tabs);
        }
        setPaletteTab(targetIndex);
View Full Code Here

     * the active mouse mode changes.
     */
    public synchronized boolean checkMouseMode() {
        // check the current MouseMode with the current layer
        coolMM = false;
        Layer layer = getAppropriateLayer();
        MapMouseListener mml = layer.getMapMouseListener();
        setCurrentLayerMapMouseListener(mml);
        if (mml != null) {
            String[] mmsl = mml.getMouseModeServiceList();
            for (int i = 0; i < mmsl.length; i++) {
                if (mmsl[i].intern() == mmID) {
View Full Code Here

     */
    public String[] getMouseModeServiceList() {
        HashSet mmsl = new HashSet();
        Iterator it = getLayers().iterator();
        while (it.hasNext()) {
            Layer l = (Layer) it.next();
            MapMouseListener mml = l.getMapMouseListener();
            if (mml != null) {
                String[] llist = mml.getMouseModeServiceList();
                for (int i = 0; i < llist.length; i++) {
                    mmsl.add(llist[i].intern());
                }
View Full Code Here

TOP

Related Classes of com.bbn.openmap.Layer

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.