/[schmitzm]/trunk/src/skrueger/geotools/StyledGridCoverage.java
ViewVC logotype

Diff of /trunk/src/skrueger/geotools/StyledGridCoverage.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 40 by alfonx, Mon Apr 6 19:31:02 2009 UTC revision 224 by alfonx, Tue Jul 14 15:57:19 2009 UTC
# Line 4  import java.net.URL; Line 4  import java.net.URL;
4    
5  import javax.swing.ImageIcon;  import javax.swing.ImageIcon;
6    
 import org.geotools.styling.Style;  
7  import org.geotools.coverage.grid.GridCoverage2D;  import org.geotools.coverage.grid.GridCoverage2D;
8    import org.geotools.styling.Style;
9    
10  import schmitzm.geotools.JTSUtil;  import schmitzm.geotools.JTSUtil;
11  import schmitzm.geotools.grid.GridUtil;  import schmitzm.geotools.grid.GridUtil;
   
 import skrueger.i8n.Translation;  
12  import skrueger.RasterLegendData;  import skrueger.RasterLegendData;
13    import skrueger.i8n.Translation;
14    
15  /**  /**
16   * This class provides a simple implementation of {@link StyledMapInterface}   * This class provides a simple implementation of {@link StyledLayerInterface}
17   * for {@link GridCoverage2D}. The uncache functionality is not supported,   * for {@link GridCoverage2D}. The uncache functionality is not supported,
18   * because this class bases on an existing {@link GridCoverage2D} object in   * because this class bases on an existing {@link GridCoverage2D} object in
19   * memory.   * memory.
20   * @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany)   * @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany)
21   * @version 1.0   * @version 1.0
22   */   */
23  public class StyledGridCoverage extends AbstractStyledMap<GridCoverage2D> implements StyledGridCoverageInterface {  public class StyledGridCoverage extends AbstractStyledLayer<GridCoverage2D> implements StyledGridCoverageInterface {
24    
25    /** Holds the meta data for displaying a legend. */    /** Holds the meta data for displaying a legend. */
26    protected RasterLegendData legendData = null;    protected RasterLegendData legendData = null;
# Line 54  public class StyledGridCoverage extends Line 53  public class StyledGridCoverage extends
53     * @param icon an icon for the object (can be {@code null})     * @param icon an icon for the object (can be {@code null})
54     * @exception IllegalArgumentException if {@code null} is given as ID or geo object     * @exception IllegalArgumentException if {@code null} is given as ID or geo object
55     */     */
56    public StyledGridCoverage(GridCoverage2D gc, String id, Translation title, Translation desc, Translation keywords, StyledMapStyle<RasterLegendData> style, ImageIcon icon) {    public StyledGridCoverage(GridCoverage2D gc, String id, Translation title, Translation desc, Translation keywords, StyledLayerStyle<RasterLegendData> style, ImageIcon icon) {
57      super(gc, JTSUtil.createEnvelope(gc.getEnvelope()), gc.getCoordinateReferenceSystem(), id, title, desc, keywords, style != null ? style.getGeoObjectStyle() : null, icon);      super(gc, JTSUtil.createEnvelope(gc.getEnvelope()), gc.getCoordinateReferenceSystem(), id, title, desc, keywords, style != null ? style.getGeoObjectStyle() : null, icon);
58      setLegendMetaData( style != null ? style.getMetaData() : null );      setLegendMetaData( style != null ? style.getMetaData() : null );
59    }    }
# Line 103  public class StyledGridCoverage extends Line 102  public class StyledGridCoverage extends
102     * @param icon an icon for the object (can be {@code null})     * @param icon an icon for the object (can be {@code null})
103     * @exception IllegalArgumentException if {@code null} is given as ID or geo object     * @exception IllegalArgumentException if {@code null} is given as ID or geo object
104     */     */
105    public StyledGridCoverage(GridCoverage2D gc, String id, String title, String desc, String keywords, StyledMapStyle<RasterLegendData> style, ImageIcon icon) {    public StyledGridCoverage(GridCoverage2D gc, String id, String title, String desc, String keywords, StyledLayerStyle<RasterLegendData> style, ImageIcon icon) {
106      this(gc,      this(gc,
107           id,           id,
108           title,           title,
# Line 137  public class StyledGridCoverage extends Line 136  public class StyledGridCoverage extends
136     * @param style a display style with legend information     * @param style a display style with legend information
137     * @exception IllegalArgumentException if {@code null} is given as ID or geo object     * @exception IllegalArgumentException if {@code null} is given as ID or geo object
138     */     */
139    public StyledGridCoverage(GridCoverage2D gc, String id, String title, StyledMapStyle<RasterLegendData> style) {    public StyledGridCoverage(GridCoverage2D gc, String id, String title, StyledLayerStyle<RasterLegendData> style) {
140      this(gc,      this(gc,
141           id,           id,
142           title,           title,
# Line 194  public class StyledGridCoverage extends Line 193  public class StyledGridCoverage extends
193    }    }
194    
195    /**    /**
196     * Does nothing, because the {@link AbstractStyledMap} bases on existing     * Does nothing, because the {@link AbstractStyledLayer} bases on existing
197     * objects (in memory) which can not be uncached and reloaded.     * objects (in memory) which can not be uncached and reloaded.
198     */     */
199    public void uncache() {    public void uncache() {
# Line 203  public class StyledGridCoverage extends Line 202  public class StyledGridCoverage extends
202    
203    /*    /*
204     * (non-Javadoc)     * (non-Javadoc)
205     * @see skrueger.geotools.StyledMapInterface#getInfoURL()     * @see skrueger.geotools.StyledLayerInterface#getInfoURL()
206     */     */
207    public URL getInfoURL() {    public URL getInfoURL() {
208          return null;          return null;

Legend:
Removed from v.40  
changed lines
  Added in v.224

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26