Package com.bbn.openmap

Examples of com.bbn.openmap.PropertyHandler


     * MapHandler, and a PropertyHandler with no properties. The
     * constructor to use to create a blank map framework to add
     * components to.
     */
    public BasicMapPanel() {
        this(new PropertyHandler(new Properties()), false);
    }
View Full Code Here


     * MapHandler in this MapPanel.
     */
    protected void createComponents() {
        // Make this call first to load the properties into
        // Environment, before the MapBean gets created.
        PropertyHandler ph = getPropertyHandler();
        // Make sure the MapBean is created and added to the
        // MapHandler.
        MapBean mb = getMapBean();
        MapHandler mh = getMapHandler();
        mh.add(this);
        ph.createComponents(getMapHandler());

        // At this point, check the MapHandler to see if a
        // ProjectionFactory has been added. If it hasn't, create one
        // with the default ProjectionLoaders. We might want to
        // remove this at some point, but not having it here will
View Full Code Here

     * Get the PropertyHandler containing properties used to configure
     * the panel, creating it if it doesn't exist.
     */
    public PropertyHandler getPropertyHandler() {
        if (propertyHandler == null) {
            setPropertyHandler(new PropertyHandler());
        }
        return propertyHandler;
    }
View Full Code Here

        }
    }

    /** Test cases. */
    public static void main(String[] args) {
        LayerAddPanel lap = new LayerAddPanel(new PropertyHandler(), null);
        Layer[] layers = new Layer[1];
        layers[0] = new com.bbn.openmap.layer.shape.ShapeLayer();

        lap.createPanel(layers);
    }
View Full Code Here

            servletPathInfo = "";
        }

        Debug.message("wms", "Using map definition:" + mapDefinition);
        try {
            PropertyHandler propHandler = new PropertyHandler(mapDefinition);
            Properties props = propHandler.getProperties();
            WmsRequestHandler wmsRequestHandler = new WmsRequestHandler(schema, hostName,
                    serverPort, contextPath + servletPath + servletPathInfo, props);
            return wmsRequestHandler;
        } catch (java.net.MalformedURLException me) {
            Debug.message("wms", "MS: caught MalformedURLException - \n" + me.getMessage());
View Full Code Here

        Environment.init(this);
        Debug.init(this, new String[] { "debug.basic", "debug.cspec",
                "debug.layer", "debug.mapbean", "debug.plugin" });

        String propValue = getParameter(PropertiesProperty);
        PropertyHandler propHandler = null;

        try {
            if (propValue != null) {
                propHandler = new PropertyHandler(propValue);
                if (Debug.debugging("app")) {
                    Debug.output("OpenMapApplet: Using properties from "
                            + propValue);
                }
            }
        } catch (MalformedURLException murle) {
            Debug.error("OpenMap: property file specified: "
                    + propValue
                    + " doesn't exist, searching for default openmap.properties file...");
        } catch (IOException ioe) {
            Debug.error("OpenMap: There is a problem using the property file specified: "
                    + propValue
                    + ", searching for default openmap.properties file...");
        }

        if (propHandler == null) {
            propHandler = new PropertyHandler();
        }

        MapPanel mapPanel = new BasicMapPanel(propHandler);
        mapPanel.getMapHandler().add(this);
        Debug.message("app", "OpenMapApplet.init()");
View Full Code Here

     * @see #getMapHandler
     */
    public static OpenMap create(String propertiesFile) {
        Debug.init();

        PropertyHandler propertyHandler = null;

        if (propertiesFile != null) {
            try {
                propertyHandler = new PropertyHandler(propertiesFile);
            } catch (MalformedURLException murle) {
                Debug.error(murle.getMessage());
                murle.printStackTrace();
                propertyHandler = null;
            } catch (IOException ioe) {
View Full Code Here

TOP

Related Classes of com.bbn.openmap.PropertyHandler

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.