Package com.bbn.openmap

Examples of com.bbn.openmap.PropertyConsumer


    /** test cases. */
    public static void main(String[] args) {
        Debug.init();
        String name = (args.length < 1) ? "com.bbn.openmap.layer.shape.ShapeLayer"
                : args[0];
        PropertyConsumer propertyconsumer = null;
        try {
            Class c = Class.forName(name);
            propertyconsumer = (PropertyConsumer) c.newInstance();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }

        Properties props = new Properties(), info = new Properties();
        System.out.println("Inspecting " + name);

        String pp = name.substring(name.lastIndexOf(".") + 1);
        propertyconsumer.setPropertyPrefix(pp.toLowerCase());

        props = propertyconsumer.getProperties(props);
        info = propertyconsumer.getPropertyInfo(info);

        Inspector inspector = new Inspector();
        inspector.setPrint(true);
        inspector.addActionListener(inspector);
        inspector.inspectPropertyConsumer(propertyconsumer);
View Full Code Here


                ProjectionLoader pl = (ProjectionLoader) it.next();
                String markerName;
                if (pl instanceof PropertyConsumer) {

                    PropertyConsumer pc = (PropertyConsumer) pl;
                    markerName = pc.getPropertyPrefix();

                    // Need to do this here before the marker name
                    // potentially changes
                    props.put(markerName + ".class", pl.getClass().getName());

                    if (markerName.startsWith(prefix)) {
                        markerName = markerName.substring(prefix.length());
                    }
                    pc.getProperties(props);

                } else {

                    markerName = "projectionLoader" + (count++);
                    // Need to do this here for any projection loaders
View Full Code Here

        Iterator iterator = menus.iterator();
        while (iterator.hasNext()) {
            JMenu menu = (JMenu) iterator.next();

            if (menu instanceof PropertyConsumer) {
                PropertyConsumer ps = (PropertyConsumer) menu;
                String prefix = ps.getPropertyPrefix();
                if (prefix == null) {
                    prefix = menu.getText().toLowerCase();
                    ps.setPropertyPrefix(prefix);
                }

                itemList.append(prefix + " ");
                ps.getProperties(props);
            }
        }

        String prefix = PropUtils.getScopedPropertyPrefix(this);
        props.put(prefix + MenusProperty, itemList.toString());
View Full Code Here

TOP

Related Classes of com.bbn.openmap.PropertyConsumer

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.