13 |
import skrueger.i8n.Translation; |
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; |
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 |
} |
} |
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, |
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, |
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() { |
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; |