String currentAreaColorStr; String currentAreaFillPatternStr; Color currentAreaColor;
    public void initialize(String prefix, Properties props) {        if (props == null) {            Debug.error("AreaHandler: initialize received bad input:\n\tprefix: "                    + prefix                    + "\n\tproperties: "                    + (props == null ? "null" : "OK"));            politicalAreas = null;            return;        }        prefix = PropUtils.getScopedPropertyPrefix(prefix);        politicalAreas = new Hashtable();        //  OK, Get the graphics. We are not expecting that all the        //  graphics in the file are not too much to handle. Also, we        //  test for the serialized graphics file first, and if it        //  isn't designated, then look for a shapefile and spatial        //  index file to create an OMGraphicsList.        String cacheFile = props.getProperty(prefix + CacheFileProperty);        // First find the resource, if not, then try as a file-URL...        try {            cacheURL = LayerUtils.getResourceOrFileOrURL(this, cacheFile);            if (cacheURL != null) {                omgraphics = readCachedGraphics(cacheURL);            } else {                // We'll use the spatial index set from the                // ShapeLayer.                // Now, get the attribute file                String dbfFile = props.getProperty(prefix + dbfFileProperty);                URL dbfFileURL = null;                if (dbfFile != null) {                    dbfFileURL = LayerUtils.getResourceOrFileOrURL(this,                            dbfFile);                }                if (dbfFileURL != null) {                    InputStream is = dbfFileURL.openStream();                    dbfModel = new DbfTableModel(new DbfInputStream(is));                }                if (dbfModel == null) {                    String csvFile = props.getProperty(prefix + csvFileProperty);                    URL infofileURL = null;                    if (csvFile != null) {                        infofileURL = LayerUtils.getResourceOrFileOrURL(this,                                csvFile);                    }                    // Read them in.                    if (infofileURL != null) {                        infoFile = new CSVShapeInfoFile(csvFile);                        infoFile.setHeadersExist(LayerUtils.booleanFromProperties(props,                                prefix + csvHeaderProperty,                                true));                        infoFile.loadData(true);                    }                }            }        } catch (java.net.MalformedURLException murle) {            omgraphics = new OMGraphicList();        } catch (java.io.IOException ioe) {            omgraphics = new OMGraphicList();        } catch (Exception exc) {            omgraphics = new OMGraphicList();        }        // This is handled properly yet. The PoliticalArea should be        // updated to handle URLs for area points, and have different        // icons for different areas.        //      String defaultPointImageURLString =        // props.getProperty(prefix + pointImageURLProperty);        // Now, match the attributes to the graphics. Find the        // indexes of the name and the search key. Also figure out        // which areas have special coloring needs.        keyIndex = LayerUtils.intFromProperties(props, prefix                + keyIndexProperty, keyIndex);        nameIndex = LayerUtils.intFromProperties(props, prefix                + nameIndexProperty, nameIndex);        String areas = props.getProperty(prefix + areasProperty);        if (areas == null)            areas = "";        StringTokenizer tokenizer = new StringTokenizer(areas, " ");        // All this uses the properties to set the individual colors        // of any area        String currentArea;        String currentAreaColorStr;        String currentAreaFillPatternStr;        Color currentAreaColor;        while (tokenizer.hasMoreTokens()) {            currentArea = tokenizer.nextToken();            PoliticalArea newParams = new PoliticalArea(currentArea);            if (Debug.debugging("areas")) {                Debug.output("AreaHandler: setting SPECIALIZED attributes for \""                        + newParams.id + "\"");            }            areasItems.addElement(currentArea);            newParams.drawingAttributes = new DrawingAttributes(prefix                    + areasProperty + "." + currentArea, props);            politicalAreas.put(newParams.id.toUpperCase().intern(), newParams);        }        if (Debug.debugging("areas")) {            Debug.output("AreaHandler: finished initialization");        }    }