/** * Outputs the maps as elements. Maps are not stored as elements in the document, and as such this * is used to output them. */ void writeMaps(Enumeration maps) throws IOException { if (maps != null) { while (maps.hasMoreElements()) { Map map = (Map) maps.nextElement(); String name = map.getName(); incrIndent(); indent(); write("<map"); if (name != null) { write(" name=\""); write(name); write("\">"); } else { write('>'); } writeLineSeparator(); incrIndent(); // Output the areas AttributeSet[] areas = map.getAreas(); if (areas != null) { for (int counter = 0, maxCounter = areas.length; counter < maxCounter; counter++) { indent(); write("<area"); writeAttributes(areas[counter]); write("></area>"); writeLineSeparator(); } } decrIndent(); indent(); write("</map>"); writeLineSeparator(); decrIndent(); } } }