diff src/java/de/intevation/mxd/writer/FillStyleWriter.java @ 181:0bde090506f9

Added comments.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 11 Jul 2011 14:28:38 +0200
parents f4eb506499f5
children c79c3c6fc99a
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Mon Jul 11 12:11:08 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/FillStyleWriter.java	Mon Jul 11 14:28:38 2011 +0200
@@ -31,11 +31,20 @@
     private static final Logger logger =
         Logger.getLogger(FillStyleWriter.class);
 
+    /**
+     * Private member.
+     */
     private mapObj map;
     private classObj cl;
     private styleObj style;
     private colorObj fill;
 
+    /**
+     * Constructor with map object and class object.
+     *
+     * @param map The map object.
+     * @param cl  The class object containing the style.
+     */
     public FillStyleWriter (mapObj map, classObj cl) {
         logger.debug("contructor(mapObj, classObj)");
         this.map = map;
@@ -45,6 +54,8 @@
 
     /**
      * Write the content.
+     *
+     * @param symbolElement DOM element containing style attributes.
      */
     public boolean write(Element symbolElement) {
         logger.debug("write()Element");
@@ -133,7 +144,6 @@
                     style.setOutlinewidth(0.0);
                 }
             }
-
         }
 
         return true;
@@ -141,6 +151,8 @@
 
     /**
      * Write the outline for a polygon.
+     *
+     * @param symbolElement Dom element containing the symbol attributes.
      */
     private void writeOutline(Element symbolElement) {
         logger.debug("writeOutline()");
@@ -191,6 +203,7 @@
             outline.setOutlinewidth(0.0);
         }
         if(symbolElement.hasAttribute("linestyle")) {
+            //Write predefined dashed or dotted lines.
             String ls = symbolElement.getAttribute("linestyle");
             double[] vals;
             if(ls.equals("dash")) {
@@ -215,6 +228,7 @@
             }
         }
         else if(symbolElement.hasAttribute("pattern_count")) {
+            //Write dashed or dotted lines defined with a template.
             int count = 0;
             try {
                 count = Integer.parseInt(
@@ -256,6 +270,9 @@
 
     /**
      * Write marker attributes and a symbol for the polygon fill.
+     *
+     * @param symbolElement DOM element containingg the symbol attributes.
+     * @param gap           The initial gap at the begining of a line.
      */
     private void writeMarker(Element symbolElement, double gap) {
         logger.debug("writeMarker()");
@@ -363,6 +380,8 @@
 
     /**
      * Write simple fill attributes.
+     *
+     * @param symbolElement DOM element containing the symbol attributes.
      */
     private void writeSimple(Element symbolElement) {
         logger.debug("writeSimple(Element)");
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)