changeset 2017:e384d78ff78b

Cosmetics. flys-artifacts/trunk@3472 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 20 Dec 2011 06:26:25 +0000
parents 796dfe96b6b2
children 3f1a63da2cf4
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java flys-artifacts/src/main/java/de/intevation/flys/exports/StyledXYSeries.java flys-artifacts/src/main/java/de/intevation/flys/utils/FLYSUtils.java
diffstat 8 files changed, 49 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon Dec 19 17:20:13 2011 +0000
+++ b/flys-artifacts/ChangeLog	Tue Dec 20 06:26:25 2011 +0000
@@ -1,3 +1,20 @@
+2011-12-20	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	Cosmetics.
+
+	* src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java,
+	  src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java,
+	  src/main/java/de/intevation/flys/exports/StyledXYSeries.java:
+	  Doc.
+
+	* src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java,
+	  src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java:
+	  Whitespace.
+
+	* src/main/java/de/intevation/flys/utils/FLYSUtils.java: Doc and
+	  whitespace.
+
 2011-12-19	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/utils/ThemeUtil.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java	Mon Dec 19 17:20:13 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java	Tue Dec 20 06:26:25 2011 +0000
@@ -58,6 +58,7 @@
         }
     }
 
+
     /**
      * Clone important stuff of an WINFOArtifact.
      * @param artifact the WINFOArtifact to clone stuff from.
@@ -94,6 +95,7 @@
         return ARTIFACT_NAME;
     }
 
+
     /**
      * Determines Facets initial disposition regarding activity (think of
      * selection in Client ThemeList GUI).
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java	Mon Dec 19 17:20:13 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java	Tue Dec 20 06:26:25 2011 +0000
@@ -78,6 +78,9 @@
 import org.jfree.ui.ApplicationFrame;
 import org.jfree.ui.RefineryUtilities;
 
+/**
+ * Standalone tech-demo.
+ */
 public class CrossSectionApp
 extends      ApplicationFrame
 {
@@ -531,6 +534,10 @@
             new XYSeriesCollection(series), null));;
     }
 
+
+    /**
+     * @param legend the legend entry.
+     */
     public void generateGround(
         List<Point2D>                         points,
         String                                legend,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java	Mon Dec 19 17:20:13 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java	Tue Dec 20 06:26:25 2011 +0000
@@ -63,12 +63,12 @@
 
 
     /**
-     * Can provide the master cross section lines or its index.
-     * @param artifact crosssection-artifact
-     * @param key      will respond on BLACKBOARD_CS_MASTER_DATA
+     * Can provide the curve/line drawn.
+     * @param key      will respond on uuid+index
      * @param param    ignored
      * @param context  ignored
-     * @return data from artifact (cross section master track).
+     * @return data to draw "intersection" of master cross section and
+     *         the waterlevel at that position.
      */
     public Object provideBlackboardData(Artifact artifact,
         Object key,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java	Mon Dec 19 17:20:13 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java	Tue Dec 20 06:26:25 2011 +0000
@@ -12,6 +12,7 @@
 
 import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
 
+
 /**
  * Facet of a Waterlevel (WQKms).
  */
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java	Mon Dec 19 17:20:13 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java	Tue Dec 20 06:26:25 2011 +0000
@@ -106,7 +106,6 @@
         Object       old
     ) {
         return compute((WINFOArtifact) artifact, context, hash, facets, old);
-
     }
 
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/StyledXYSeries.java	Mon Dec 19 17:20:13 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/StyledXYSeries.java	Tue Dec 20 06:26:25 2011 +0000
@@ -14,8 +14,11 @@
 import de.intevation.flys.utils.ThemeUtil;
 
 /**
- * Dataset in two dimensions with additional theme-document.
+ * Dataseries in two dimensions with additional theme-document and further
+ * display options.
  * The theme-document will later "style" the graphical representation.
+ * The display options can be used to control the z-order and the axis of the 
+ * dataseries.
  */
 public class StyledXYSeries extends XYSeries {
 
@@ -40,6 +43,10 @@
     }
 
 
+    /**
+     * Applies line color, size and type attributes to renderer, also
+     * whether to draw lines and/or points.
+     */
     public XYLineAndShapeRenderer applyTheme(XYLineAndShapeRenderer r, int idx){
         applyLineColor(r, idx);
         applyLineSize(r, idx);
@@ -51,6 +58,7 @@
     }
 
 
+    /** Set line color to renderer. */
     protected void applyLineColor(XYLineAndShapeRenderer r, int idx) {
         Color c = ThemeUtil.parseLineColorField(theme);
         r.setSeriesPaint(idx, c);
@@ -85,6 +93,9 @@
     }
 
 
+    /**
+     * Sets form and visibility of points.
+     */
     protected void applyShowPoints(XYLineAndShapeRenderer r, int idx) {
         boolean show = ThemeUtil.parseShowPoints(theme);
         int size = ThemeUtil.parseLineWidth(theme);
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/FLYSUtils.java	Mon Dec 19 17:20:13 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/FLYSUtils.java	Tue Dec 20 06:26:25 2011 +0000
@@ -65,6 +65,10 @@
     }
 
 
+    /**
+     * Pulls Artifact with given UUID fromm database.
+     * @return FLYSArtifact with given UUID or null (in case of errors).
+     */
     public static FLYSArtifact getArtifact(String uuid, CallContext context) {
         try {
             Artifact artifact = context.getDatabase().getRawArtifact(uuid);
@@ -83,7 +87,8 @@
         }
         // TODO: catch more selective
         catch (Exception e) {
-            logger.error("Cannot get FLYSArtifact " + uuid + " from database (" + e.getMessage() + ").");
+            logger.error("Cannot get FLYSArtifact " + uuid
+                + " from database (" + e.getMessage() + ").");
             return null;
         }
     }

http://dive4elements.wald.intevation.org