/[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

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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26