mm[i] = (String) it.next();
mm[i++] = (String) it.next();
    public void setProperties(String prefix, Properties props) {        super.setProperties(prefix, props);        String realPrefix = PropUtils.getScopedPropertyPrefix(prefix);        // Check to see if the layer wants to set its own projection        // change policy.        String pcpString = props.getProperty(realPrefix                + ProjectionChangePolicyProperty);        String policyPrefix;        if (pcpString != null) {            policyPrefix = realPrefix + pcpString;            // If the projection change policy is null, try to create            // it.            if (projectionChangePolicy == null) {                String pcpClass = props.getProperty(policyPrefix + ".class");                if (pcpClass == null) {                    Debug.error("Layer "                            + getName()                            + " has "                            + policyPrefix                            + " property defined in properties for PropertyChangePolicy, but "                            + policyPrefix + ".class property is undefined.");                } else {                    Object obj = ComponentFactory.create(pcpClass,                            policyPrefix,                            props);                    if (obj != null) {                        if (Debug.debugging("layer")) {                            Debug.output("Layer " + getName()                                    + " setting ProjectionChangePolicy ["                                    + obj.getClass().getName() + "]");                        }                        try {                            setProjectionChangePolicy((ProjectionChangePolicy) obj);                        } catch (ClassCastException cce) {                            Debug.error("Layer "                                    + getName()                                    + " has "                                    + policyPrefix                                    + " property defined in properties for ProjectionChangePolicy, but "                                    + policyPrefix                                    + ".class property ("                                    + pcpClass                                    + ") does not define a valid ProjectionChangePolicy. A "                                    + obj.getClass().getName()                                    + " was created instead.");                        }                    } else {                        Debug.error("Layer "                                + getName()                                + " has "                                + policyPrefix                                + " property defined in properties for PropertyChangePolicy, but "                                + policyPrefix                                + ".class property does not define a valid PropertyChangePolicy.");                    }                }            } else { // ProjectionChangePolicy is not null...                // If the projection change policy is not null and the                // policy is a PropertyConsumer, pass the properties                // to the policy. Note that the property prefix for                // the policy is prefix +                // ProjectionChangePolicyProperty                if (projectionChangePolicy instanceof PropertyConsumer) {                    ((PropertyConsumer) projectionChangePolicy).setProperties(policyPrefix,                            props);                }            }        } else if (Debug.debugging("layer")) {            Debug.output("Layer " + getName()                    + " using default ProjectionChangePolicy ["                    + getProjectionChangePolicy().getClass().getName() + "]");        }        // Check to see if the layer want to set its own rendering        // policy.        String rpString = props.getProperty(realPrefix + RenderPolicyProperty);        if (rpString != null) {            policyPrefix = realPrefix + rpString;            if (renderPolicy == null) {                String rpClass = props.getProperty(policyPrefix + ".class");                if (rpClass == null) {                    Debug.error("Layer "                            + getName()                            + " has "                            + policyPrefix                            + " property defined in properties for RenderPolicy, but "                            + policyPrefix + ".class property is undefined.");                } else {                    Object rpObj = ComponentFactory.create(rpClass,                            policyPrefix,                            props);                    if (rpObj != null) {                        if (Debug.debugging("layer")) {                            Debug.output("Layer " + getName()                                    + " setting RenderPolicy ["                                    + rpObj.getClass().getName() + "]");                        }                        try {                            setRenderPolicy((RenderPolicy) rpObj);                        } catch (ClassCastException cce) {                            Debug.error("Layer "                                    + getName()                                    + " has "                                    + policyPrefix                                    + " property defined in properties for RenderPolicy, but "                                    + policyPrefix                                    + ".class property ("                                    + rpClass                                    + ") does not define a valid RenderPolicy. A "                                    + rpObj.getClass().getName()                                    + " was created instead.");                        }                    } else {                        Debug.error("Layer "                                + getName()                                + " has "                                + policyPrefix                                + " property defined in properties for RenderPolicy, but "                                + policyPrefix + ".class property (" + rpClass                                + ") isn't being created.");                    }                }            } else { // RenderPolicy is not null...                // Same thing with renderPolicy as with projection                // change policy.                if (renderPolicy instanceof PropertyConsumer) {                    ((PropertyConsumer) renderPolicy).setProperties(policyPrefix,                            props);                }            }        } else if (Debug.debugging("layer")) {            Debug.output("Layer " + getName() + " using default RenderPolicy ["                    + getRenderPolicy().getClass().getName() + "]");        }        String mmString = props.getProperty(realPrefix + MouseModesProperty);        if (mmString != null) {            Vector mmv = PropUtils.parseSpacedMarkers(mmString);            if (mmv.size() > 0) {                String[] mm = new String[mmv.size()];                Iterator it = mmv.iterator();                int i = 0;                while (it.hasNext()) {                    mm[i] = (String) it.next();                }                setMouseModeIDsForEvents(mm);            }        }        consumeEvents = PropUtils.booleanFromProperties(props, realPrefix                + ConsumeEventsProperty, consumeEvents);    }