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

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

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

trunk/src/skrueger/geotools/MapContextManagerInterface.java revision 224 by alfonx, Tue Jul 14 15:57:19 2009 UTC branches/1.0-gt2-2.6/src/skrueger/geotools/MapContextManagerInterface.java revision 464 by alfonx, Tue Oct 13 13:22:31 2009 UTC
# Line 1  Line 1 
1  package skrueger.geotools;  /*******************************************************************************
2  import java.util.List;   * Copyright (c) 2009 Martin O. J. Schmitz.
3     *
4  import org.geotools.map.MapContext;   * This file is part of the SCHMITZM library - a collection of utility
5  import org.geotools.map.MapLayer;   * classes based on Java 1.6, focusing (not only) on Java Swing
6  import org.geotools.map.event.MapLayerListListener;   * and the Geotools library.
7  import org.geotools.map.event.MapLayerListener;   *
8     * The SCHMITZM project is hosted at:
9  import skrueger.AttributeMetaData;   * http://wald.intevation.org/projects/schmitzm/
10  import skrueger.RasterLegendData;   *
11     * This program is free software; you can redistribute it and/or
12  /**   * modify it under the terms of the GNU Lesser General Public License
13   * Implementations of this class can can be used to fill/insert/remove a mapContext   * as published by the Free Software Foundation; either version 3
14   * with {@link StyledLayerInterface} objects.   * of the License, or (at your option) any later version.
15   *   *
16   * @author <a href="mailto:[email protected]">Stefan Alfons Kr&uuml;ger</a>   * This program is distributed in the hope that it will be useful,
17   *   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18   */   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  public interface MapContextManagerInterface {   * GNU General Public License for more details.
20     *
21          /**   * You should have received a copy of the GNU Lesser General Public License (license.txt)
22           * Add a {@link StyledLayerInterface} object into the underlying {@link MapContext}   * along with this program; if not, write to the Free Software
23           * as the topmost layer   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
24           *   * or try this link: http://www.gnu.org/licenses/lgpl.html
25           * @param styledLayer Layer to add to the map   *
26           */   * Contributors:
27          boolean addStyledLayer (StyledLayerInterface<?> styledLayer);   *     Martin O. J. Schmitz - initial API and implementation
28     *     Stefan A. Krüger - additional utility classes
29          /**   ******************************************************************************/
30           * @param mapContextIdx Index in the {@link MapContext}, bottom first  package skrueger.geotools;
31           * @return successful?  import java.util.List;
32           */  
33          boolean removeStyledLayer (int mapContextIdx);  import org.geotools.map.MapContext;
34    import org.geotools.map.MapLayer;
35          /**  import org.geotools.map.event.MapLayerListListener;
36           * Inserts a {@link StyledLayerInterface} object into the underlying {@link MapContext}  import org.geotools.map.event.MapLayerListener;
37           * at the given position  
38           */  import skrueger.AttributeMetadata;
39          boolean insertStyledLayer (StyledLayerInterface<?> styledLayer, int mapContextIdx);  import skrueger.RasterLegendData;
40    
41          /** Add {@link MapLayerListener} */  /**
42          void addMapLayerListListener( MapLayerListListener listener);   * Implementations of this class can can be used to fill/insert/remove a mapContext
43     * with {@link StyledLayerInterface} objects.
44          /** Remove {@link MapLayerListener} */   *
45          void removeMapLayerListListener( MapLayerListListener listener);   * @author <a href="mailto:[email protected]">Stefan Alfons Kr&uuml;ger</a>
46     *
47          /**   */
48           * Help the GC by disposing this Component  public interface MapContextManagerInterface {
49           */  
50          void dispose();          /**
51             * Add a {@link StyledLayerInterface} object into the underlying {@link MapContext}
52          /**           * as the topmost layer
53           * Returns a ordered list of the layers that are contained in the underlying {@link MapContext}           *
54           */           * @param styledLayer Layer to add to the map
55          List<StyledLayerInterface<?>> getStyledObjects();           */
56            boolean addStyledLayer (StyledLayerInterface<?> styledLayer);
57          /**  
58           * Returns a list of {@link AttributeMetaData} that shall be shown (e.g. when the Mouse clicked into the map)          /**
59           * Returns an empty list if the layer doesn't exist or is not backed by a {@link StyledFeatureCollectionInterface}           * @param mapContextIdx Index in the {@link MapContext}, bottom first
60           */           * @return successful?
61          List<AttributeMetaData> getVisibleAttribsFor(MapLayer mapLayer);           */
62            boolean removeStyledLayer (int mapContextIdx);
63          /**  
64           * Returns the title of the layer          /**
65           * @param mapLayer {@link MapLayer}           * Inserts a {@link StyledLayerInterface} object into the underlying {@link MapContext}
66           * @return <code>null</code>, if the layer is unknown           * at the given position
67           */           */
68          String getTitleFor(MapLayer mapLayer);          boolean insertStyledLayer (StyledLayerInterface<?> styledLayer, int mapContextIdx);
69    
70          /**          /** Add {@link MapLayerListener} */
71           * Returns the description of the layer          void addMapLayerListListener( MapLayerListListener listener);
72           * @param mapLayer {@link MapLayer}  
73           * @return <code>null</code>, if the layer is unknown. Empty String if the description is empty          /** Remove {@link MapLayerListener} */
74           */          void removeMapLayerListListener( MapLayerListListener listener);
75          String getDescFor(MapLayer mapLayer);  
76            /**
77          /**           * Help the GC by disposing this Component
78           * Returns the {@link RasterLegendData} object for the layer.           */
79           * @return null, if the layer is not found or of type raster          void dispose();
80           */  
81          RasterLegendData getLegendMetaData(MapLayer mapLayer);          /**
82             * Returns a ordered list of the layers that are contained in the underlying {@link MapContext}
83          /**           */
84           * Returns the {@link StyledLayerInterface} object that is associated with the layer or NULL if the layer can't be found.          List<StyledLayerInterface<?>> getStyledObjects();
85           */  
86          StyledLayerInterface<?> getStyledObjectFor(MapLayer layer);          /**
87  }           * Returns a list of {@link AttributeMetadata} that shall be shown (e.g. when the Mouse clicked into the map)
88             * Returns an empty list if the layer doesn't exist or is not backed by a {@link StyledFeatureCollectionInterface}
89             */
90            List<AttributeMetadata> getVisibleAttribsFor(MapLayer mapLayer);
91    
92            /**
93             * Returns the title of the layer
94             * @param mapLayer {@link MapLayer}
95             * @return <code>null</code>, if the layer is unknown
96             */
97            String getTitleFor(MapLayer mapLayer);
98    
99            /**
100             * Returns the description of the layer
101             * @param mapLayer {@link MapLayer}
102             * @return <code>null</code>, if the layer is unknown. Empty String if the description is empty
103             */
104            String getDescFor(MapLayer mapLayer);
105    
106            /**
107             * Returns the {@link RasterLegendData} object for the layer.
108             * @return null, if the layer is not found or of type raster
109             */
110            RasterLegendData getLegendMetaData(MapLayer mapLayer);
111    
112            /**
113             * Returns the {@link StyledLayerInterface} object that is associated with the layer or NULL if the layer can't be found.
114             */
115            StyledLayerInterface<?> getStyledObjectFor(MapLayer layer);
116            
117            /**
118             * @return The {@link MapContext} managed by this {@link MapContextManagerInterface}
119             */
120            MapContext getMapContext();
121    
122    }

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26