[Schmitzm-commits] r345 - in branches/1.0-gt2-2.6/src: junit/skrueger/i8n schmitzm/geotools/grid schmitzm/geotools/gui

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Aug 31 13:10:09 CEST 2009


Author: mojays
Date: 2009-08-31 13:10:08 +0200 (Mon, 31 Aug 2009)
New Revision: 345

Modified:
   branches/1.0-gt2-2.6/src/junit/skrueger/i8n/SwitchLanguageDialogTest.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/grid/ReadableGridCoverage.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/LayeredMapPane.java
Log:
gt2-2.6.x conversion bugs eliminated

Modified: branches/1.0-gt2-2.6/src/junit/skrueger/i8n/SwitchLanguageDialogTest.java
===================================================================
--- branches/1.0-gt2-2.6/src/junit/skrueger/i8n/SwitchLanguageDialogTest.java	2009-08-31 11:09:52 UTC (rev 344)
+++ branches/1.0-gt2-2.6/src/junit/skrueger/i8n/SwitchLanguageDialogTest.java	2009-08-31 11:10:08 UTC (rev 345)
@@ -31,10 +31,10 @@
 
 import java.util.ArrayList;
 
+import org.junit.Test;
+
 import junit.framework.TestCase;
 
-import org.junit.Test;
-
 import skrueger.i8n.SwitchLanguageDialog;
 
 public class SwitchLanguageDialogTest extends TestCase {

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/grid/ReadableGridCoverage.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/grid/ReadableGridCoverage.java	2009-08-31 11:09:52 UTC (rev 344)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/grid/ReadableGridCoverage.java	2009-08-31 11:10:08 UTC (rev 345)
@@ -38,6 +38,7 @@
 import org.geotools.coverage.GridSampleDimension;
 import org.geotools.coverage.grid.GridCoverage2D;
 import org.geotools.coverage.grid.GridGeometry2D;
+import org.geotools.factory.Hints;
 import org.geotools.geometry.Envelope2D;
 import org.opengis.coverage.grid.GridCoverage;
 
@@ -75,6 +76,20 @@
   protected Envelope2D envelope = null;
 
   /**
+   * Ruft den Standard-Konstruktor der von {@link GridCoverage2D} auf (ohne {@link Hint Hints}).
+   * @param name          Name des Grids
+   * @param image         Image-Daten
+   * @param gridGeometry  Georeferenz und CRS
+   * @param bands         Sample-Dimensions fuer jedes Band (kann {@code null} sein)
+   * @param sources       Quell-Grids (kann {@code null} sein
+   * @param properties    Properties fuer das Grid (kann {@code null} sein)
+   * @param band          Band der Datenbasis, auf das die getter/setter referenziert sind
+   */
+  protected ReadableGridCoverage(CharSequence name, PlanarImage image, GridGeometry2D gridGeometry, GridSampleDimension[] bands, GridCoverage[] sources, Map<?,?> properties, int band) {
+    this( name, image, gridGeometry, bands, sources, properties, null, band );
+  }
+
+  /**
    * Ruft den Standard-Konstruktor der von {@link GridCoverage2D} auf.
    * @param name          Name des Grids
    * @param image         Image-Daten
@@ -82,10 +97,11 @@
    * @param bands         Sample-Dimensions fuer jedes Band (kann {@code null} sein)
    * @param sources       Quell-Grids (kann {@code null} sein
    * @param properties    Properties fuer das Grid (kann {@code null} sein)
+   * @param hints         (Rendering?) hints (kann {@code null} sein)
    * @param band          Band der Datenbasis, auf das die getter/setter referenziert sind
    */
-  protected ReadableGridCoverage(CharSequence name, PlanarImage image, GridGeometry2D gridGeometry, GridSampleDimension[] bands, GridCoverage[] sources, Map properties, int band) {
-    super( name, image, gridGeometry, bands, sources, properties );
+  protected ReadableGridCoverage(CharSequence name, PlanarImage image, GridGeometry2D gridGeometry, GridSampleDimension[] bands, GridCoverage[] sources, Map<?,?> properties, Hints hints, int band) {
+    super( name, image, gridGeometry, bands, sources, properties, hints );
     this.raster   = getRenderedImage().getData();
     this.band     = band;
     this.envelope = getEnvelope2D();
@@ -410,4 +426,12 @@
    */
   public void unloadData() {
   }
+
+  /**
+   * Calls {@link #dispose(boolean) dispose(false}.
+   */
+  @Override
+  public void dispose() {
+    dispose(false);
+  }
 }

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/LayeredMapPane.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/LayeredMapPane.java	2009-08-31 11:09:52 UTC (rev 344)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/LayeredMapPane.java	2009-08-31 11:10:08 UTC (rev 345)
@@ -340,7 +340,11 @@
    */
   private static GridCoverage2D recolorGrid(GridCoverage2D grid, int band, Category[] cat) {
     GridSampleDimension[] gsd = grid.getSampleDimensions();
-    gsd[band] = new GridSampleDimension(cat,gsd[band].getUnits());
+    gsd[band] = new GridSampleDimension(
+        gsd[band].getDescription(),
+        cat,
+        gsd[band].getUnits()
+    );
 
     return new GridCoverageFactory().create(
       grid.getName(),



More information about the Schmitzm-commits mailing list