Package com.bbn.openmap.plugin

Examples of com.bbn.openmap.plugin.PlugInLayer


            layer = ComponentFactory.create(newClassName);

            if (layer instanceof PropertyConsumer) {

                if (layer instanceof PlugIn) {
                    PlugInLayer pil = new PlugInLayer();
                    pil.setPlugIn((PlugIn) layer);
                    pil.setName(prefix);
                    layer = pil;
                }

                if (layer instanceof Layer) {
                    // Set the pretty name to what the user chose.
                    ((Layer) layer).setName(prefix);
                }

                // Set the prefix to a modified version of the pretty
                // name.
                prefix = propertyHandler.getUniquePrefix(prefix);

                ((PropertyConsumer) layer).setPropertyPrefix(prefix);

                inspector.inspectPropertyConsumer((PropertyConsumer) layer);

            }
        } else if (e.getActionCommand() == Inspector.doneCommand) {
            // the confirmation button of the Inspector panel was
            // pressed
            // find the beancontext and add the layer at hand (var.
            // layer)
            if (layer != null && layerHandler != null) {
                if (layer instanceof Layer) {
                    // Let's add it on top, so the user can find it
                    // easier, instead of adding it to the bottom and
                    // having it lost behind some other layers.
                    layerHandler.addLayer((Layer) layer, 0);
                } else if (layer instanceof PlugIn) {
                    PlugInLayer pil = (PlugInLayer) ((PlugIn) layer).getComponent();
                    layerHandler.addLayer(pil, 0);
                }
                prefixTextField.setText(DefaultLayerName);
            } else if (layerHandler != null) {
                String message = i18n.get(LayerAddPanel.class,
View Full Code Here


            if (obj instanceof Layer || obj instanceof PlugIn) {
                Layer l = null;

                if (obj instanceof PlugIn) {
                    PlugIn pi = (PlugIn) obj;
                    PlugInLayer pil = new PlugInLayer();
                    pil.setPlugIn(pi);
                    pil.setName(p.getProperty(PropUtils.getScopedPropertyPrefix(pi)
                            + Layer.PrettyNameProperty));
                    l = pil;
                } else {
                    l = (Layer) obj;
                }
View Full Code Here

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

            if (obj instanceof Layer) {
                l = (Layer) obj;
            } else if (obj instanceof PlugIn) {

                PlugInLayer pl = new PlugInLayer();
                pl.setProperties(layerName, p);
                pl.setPlugIn((PlugIn) obj);
                l = pl;
            } else {
                Debug.error("LayerHandler: Skipped \""
                        + layerName
                        + "\" "
View Full Code Here

TOP

Related Classes of com.bbn.openmap.plugin.PlugInLayer

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.