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

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

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

trunk/src/skrueger/geotools/StyledMapInterface.java revision 2 by mojays, Tue Feb 24 22:43:52 2009 UTC trunk/src/skrueger/geotools/StyledLayerInterface.java 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    
7    import org.geotools.feature.FeatureCollection;
8  import org.geotools.styling.Style;  import org.geotools.styling.Style;
9  import org.opengis.referencing.crs.CoordinateReferenceSystem;  import org.opengis.referencing.crs.CoordinateReferenceSystem;
10    
11    import skrueger.AttributeMetaData;
12    import skrueger.RasterLegendData;
13  import skrueger.i8n.Translation;  import skrueger.i8n.Translation;
14    
15  import com.vividsolutions.jts.geom.Envelope;  import com.vividsolutions.jts.geom.Envelope;
16    
 // fuer Doku  
 import org.geotools.feature.FeatureCollection;  
 import org.geotools.coverage.grid.GridCoverage2D;  
 import skrueger.geotools.MapContextManagerInterface;  
 import skrueger.AttributeMetaData;  
 import skrueger.RasterLegendData;  
   
17  /**  /**
18   * This class is the top interface for styled objects to be managed in   * This class is the top interface for styled objects to be managed in
19   * {@link MapContextManagerInterface}. The (rough) classe structure is the   * {@link MapContextManagerInterface}. The (rough) classe structure is the
20   * following:   * following:
21   * <ul>   * <ul>
22   * <li><b>{@link StyledMapInterface StyledMapInterface<E>}</b>   * <li><b>{@link StyledLayerInterface StyledLayerInterface<E>}</b>
23   * <ul>   * <ul>
24   * <li>{@link #getId()} -> String</li>   * <li>{@link #getId()} -> String</li>
25   * <li>{@link #getKeywords() get/setKeywords()} -> {@link Translation}</li>   * <li>{@link #getKeywords() get/setKeywords()} -> {@link Translation}</li>
26   * <li>{@link #getTitle() set/getTitle()} -> {@link Translation} (short   * <li>{@link #getTitle() set/getTitle()} -> {@link Translation} (short
27   * description for layer list)</li>   * description for layer list)</li>
28   * <li>{@link #getDesc() set/getDesc()} -> {@link Translation} (long   * <li>{@link #getDesc() set/getDesc()} -> {@link Translation} (long description
29   * description for details)</li>   * for details)</li>
30   * <li>{@link #getCrs()} -> {@link CoordinateReferenceSystem}</li>   * <li>{@link #getCrs()} -> {@link CoordinateReferenceSystem}</li>
31   * <li>{@link #getCRSString()} -> String (readable description of CRS)</li>   * <li>{@link #getCRSString()} -> String (readable description of CRS)</li>
32   * <li>{@link #getEnvelope()} -> {@link Envelope} (JTS-Envelope)</li>   * <li>{@link #getEnvelope()} -> {@link Envelope} (JTS-Envelope)</li>
33   * <li>{@link #getGeoObject()} -> E (GridCoverage/FeatureCollection/...)</li>   * <li>{@link #getGeoObject()} -> E (GridCoverage/FeatureCollection/...)</li>
34   * <li>{@link #getStyle() set/getStyle()} -> {@link Style}</li>   * <li>{@link #getStyle() set/getStyle()} -> {@link Style}</li>
  * <li>{@link #isHideInLegend()} -> Boolean</li> *  
35   * <li>{@link #uncache()}</li>   * <li>{@link #uncache()}</li>
36   * <li>{@link #dispose()}</li>   * <li>{@link #dispose()}</li>
37   * </ul>   * </ul>
38   * </li>   * </li>
39   * <li><b>{@link StyledFeatureCollectionInterface} extends   * <li><b>{@link StyledFeatureCollectionInterface} extends
40   * {@link StyledMapInterface StyledMapInterface<FeatureCollection>}</b>   * {@link StyledLayerInterface StyledLayerInterface<FeatureCollection>}</b>
41   * <ul>   * <ul>
42   * <li>{@link StyledFeatureCollectionInterface#getAttributeMetaDataMap()} ->   * <li>{@link StyledFeatureCollectionInterface#getAttributeMetaDataMap()} ->
43   * Map<Integer,AttributeMetaData></li>   * Map<Integer,AttributeMetaData></li>
44   * </ul>   * </ul>
45   * </li>   * </li>
46   * <li><b>{@link StyledRasterInterface} extends   * <li><b>{@link StyledRasterInterface} extends {@link StyledLayerInterface
47   * {@link StyledMapInterface StyledMapInterface<GridCoverage2D>}</b>   * StyledLayerInterface<GridCoverage2D>}</b>
48   * <ul>   * <ul>
49   * <li>{@link StyledRasterInterface#getLegendMetaData()} ->   * <li>{@link StyledRasterInterface#getLegendMetaData()} ->
50   * {@link RasterLegendData}</li>   * {@link RasterLegendData}</li>
# Line 59  import skrueger.RasterLegendData; Line 54  import skrueger.RasterLegendData;
54   * <br>   * <br>
55   * <b>Restrictions:</b>   * <b>Restrictions:</b>
56   * <ul>   * <ul>
57   * <li>layer list only depends on {@link StyledMapInterface}</li>   * <li>layer list only depends on {@link StyledLayerInterface}</li>
58   * <li>methods returning {@link Translation} must not return {@code null}</li>   * <li>methods returning {@link Translation} must not return {@code null}</li>
59   * <li>methods returning {@link AttributeMetaData}-Map must not return   * <li>methods returning {@link AttributeMetaData}-Map must not return {@code
60   * {@code null}</li>   * null}</li>
61   * <li>static helper method to get a new {@link AttributeMetaData}-map withe   * <li>static helper method to get a new {@link AttributeMetaData}-map withe the
62   * the visible attributes only</li>   * visible attributes only</li>
63   * <li>static helper method to create a "default" {@link AttributeMetaData}-map   * <li>static helper method to create a "default" {@link AttributeMetaData}-map
64   * for a {@link FeatureCollection} with all attributes visible and without real   * for a {@link FeatureCollection} with all attributes visible and without real
65   * translations, but the attribute name as description.</li>   * translations, but the attribute name as description.</li>
66   * </ul>   * </ul>
67   */   */
68  public interface StyledMapInterface<E> {  public interface StyledLayerInterface<E> {
69          public String getId();          public String getId();
70    
71          public Translation getTitle();          public Translation getTitle();
# Line 92  public interface StyledMapInterface<E> { Line 87  public interface StyledMapInterface<E> {
87          public Envelope getEnvelope();          public Envelope getEnvelope();
88    
89          /**          /**
90           * @return return an ImageIcon - <code>null</code> is valid and no icon or           * @return return an ImageIcon - <code>null</code> is valid and no icon or a
91           *         a default icon will then be shown           *         default icon will then be shown
92           */           */
93          public ImageIcon getImageIcon();          public ImageIcon getImageIcon();
94    
# Line 104  public interface StyledMapInterface<E> { Line 99  public interface StyledMapInterface<E> {
99           *           *
100           * @throws RuntimeException           * @throws RuntimeException
101           */           */
102          public E getGeoObject() throws Exception;          public E getGeoObject();
103    
104          public Style getStyle();          public Style getStyle();
105    
# Line 113  public interface StyledMapInterface<E> { Line 108  public interface StyledMapInterface<E> {
108          /**          /**
109           * Returns the {@link URL} to a (HTML) file that provides more information           * Returns the {@link URL} to a (HTML) file that provides more information
110           * about this layer. If no HTML if associated with this           * about this layer. If no HTML if associated with this
111           * {@link StyledMapInterface}, then <code>null</code> will be returned.           * {@link StyledLayerInterface}, then <code>null</code> will be returned.
112           *           *
113           * @return null or an {@link URL}           * @return null or an {@link URL}
114           */           */
# Line 133  public interface StyledMapInterface<E> { Line 128  public interface StyledMapInterface<E> {
128           */           */
129          public void uncache();          public void uncache();
130    
131          /**  
          * If true, this layer will not be shown in the legend. Default = false  
          */  
         public boolean isHideInLegend();  
132  }  }

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26