diff flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java @ 1333:1627a28c4504

Cosmetics, docs. flys-client/trunk@2978 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 17 Oct 2011 09:41:40 +0000
parents cfbfaadf4b6f
children 46a4b74d87bf
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java	Mon Oct 17 09:37:27 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java	Mon Oct 17 09:41:40 2011 +0000
@@ -152,6 +152,11 @@
     }
 
 
+    /**
+     * Creates the graphical representation and interaction widgets for the data.
+     * @param dataList the data.
+     * @return graphical representation and interaction widgets for data.
+     */
     @Override
     public Canvas create(DataList dataList) {
         GWT.log("createData()");
@@ -254,11 +259,15 @@
     }
 
 
+    /**
+     * Add record to list of removed records.
+     */
     public void trackRemoved(Record r) {
         RecommendationPairRecord pr = (RecommendationPairRecord) r;
         this.removedPairs.add(pr);
     }
 
+
     /**
      * Validates data, does nothing if invalid, otherwise clones new selected
      * waterlevels and add them to collection, forward the artifact.
@@ -278,11 +287,19 @@
 
         List<Recommendation> ar  = new ArrayList<Recommendation>();
         List<Recommendation> all = new ArrayList<Recommendation>();
+        List<Recommendation> statics = new ArrayList<Recommendation>();
         for (ListGridRecord record : records) {
             RecommendationPairRecord r =
                 (RecommendationPairRecord) record;
             // Do not add "old" recommendations.
             if (!r.isAlreadyLoaded()) {
+                // Check whether one of those is a dike or similar.
+                // TODO differentiate and merge: new clones, new, old.
+                if(r.getFirst().getIDs() != null
+                    && r.getFirst().getIDs().startsWith("flood_protection"))
+                {
+                    // These do not get cloned but loaded ("spawned").
+                }
                 ar.add(r.getFirst());
                 ar.add(r.getSecond());
             }
@@ -361,7 +378,16 @@
 
 
     /**
-     * Create Data and DataItem from selection.
+     * Create Data and DataItem from selection (a long string with identifiers
+     * to construct diff-pairs).
+     *
+     * @param newRecommendations "new" recommendations (did not survive a
+     *        backjump).
+     * @param newArtifacts artifacts cloned from newRecommendations.
+     * @param oldRecommendations old recommendations that survived a backjump.
+     *
+     * @return dataitem with a long string with identifiers to construct
+     *         diff-pairs.
      */
     protected Data[] getData(
             Recommendation[] newRecommendations,

http://dive4elements.wald.intevation.org