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

Annotation of /trunk/src/skrueger/geotools/selection/StyledFeatureLayerSelectionModel.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 224 - (hide annotations)
Tue Jul 14 15:57:19 2009 UTC (15 years, 7 months ago) by alfonx
File MIME type: text/plain
File size: 6893 byte(s)
* big biG BIG refactoring: StyledMap[Interface,Util,Style] never dealt with Maps (=Orchestrations of layers), but always only with single Layers. Now it has been refactored to StyledLayer[Interface,Util,Style]. 
* Some variable names and methodNames have been corrected also, but many will still be missing.
* New JARs committed
1 alfonx 96 /**
2     Copyright 2008 Stefan Alfons Krüger
3    
4     atlas-framework - This file is part of the Atlas Framework
5    
6     This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
7     This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
8     You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
9    
10     Diese Bibliothek ist freie Software; Sie dürfen sie unter den Bedingungen der GNU Lesser General Public License, wie von der Free Software Foundation veröffentlicht, weiterverteilen und/oder modifizieren; entweder gemäß Version 2.1 der Lizenz oder (nach Ihrer Option) jeder späteren Version.
11     Diese Bibliothek wird in der Hoffnung weiterverbreitet, daß sie nützlich sein wird, jedoch OHNE IRGENDEINE GARANTIE, auch ohne die implizierte Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK. Mehr Details finden Sie in der GNU Lesser General Public License.
12     Sie sollten eine Kopie der GNU Lesser General Public License zusammen mit dieser Bibliothek erhalten haben; falls nicht, schreiben Sie an die Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
13     **/
14    
15     package skrueger.geotools.selection;
16    
17     import org.geotools.feature.Feature;
18    
19 mojays 103 import skrueger.geotools.StyledFeatureCollectionInterface;
20     import skrueger.geotools.StyledFeatureSourceInterface;
21 alfonx 224 import skrueger.geotools.StyledLayerInterface;
22 alfonx 96
23     /**
24 mojays 103 * This manager holds a set of {@link Feature Features} which are <i>selected</i>
25 alfonx 224 * in a {@link StyledLayerInterface} ({@link StyledFeatureCollectionInterface} or
26 mojays 103 * {@link StyledFeatureSourceInterface}).
27 alfonx 96 * @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany)
28     */
29 alfonx 111 public class StyledFeatureLayerSelectionModel extends StyledLayerSelectionModel<String> {
30 mojays 103 /**
31     * Creates a new selection model.
32 alfonx 224 * @param styledLayer styled map the selection is controlled of
33 mojays 103 */
34 alfonx 224 public StyledFeatureLayerSelectionModel(StyledFeatureCollectionInterface styledLayer) {
35     super(styledLayer);
36 mojays 103 }
37    
38     /**
39     * Creates a new selection model.
40 alfonx 224 * @param styledLayer styled map the selection is controlled of
41 mojays 103 */
42 alfonx 224 public StyledFeatureLayerSelectionModel(StyledFeatureSourceInterface styledLayer) {
43     super(styledLayer);
44 mojays 103 }
45    
46    
47    
48     //*********** UNUSED STUFF **************
49    
50     // /** A static logger for this class */
51     // private static final Logger LOGGER = Logger.getLogger(StyledFeatureLayerSelectionModel.class);
52     // /** Holds the current selection as {@link Style}. */
53     // protected Style selectionMapStyle = null;
54     // /** Holds the current selection as {@link Filter}. */
55     // protected Filter selectionFilter = null;
56     // /** Holds the current selection as {@code ChartStyle}.
57     // * TODO: determine an appropriate type for the chart styling. */
58     // protected Object selectionChartStyle = null;
59 alfonx 96 //
60     // /**
61     // * Creates a new selection model.
62     // * @param layer layer to control the selection of
63     // */
64     // public StyledFeatureLayerSelectionModel() {
65     // }
66     //
67     // /**
68     // * Not yet implemented!
69     // * Extends the current selection by all features contained by
70     // * the specified {@link Envelope}.
71     // * @param env defines a bounding box
72     // */
73     // public void addSelection(Envelope env) {
74     // // TODO: implement me!
75     // refreshSelection();
76     // }
77     //
78     // /**
79     // * Not yet implemented!
80     // * Reduces the current selection by all features contained by
81     // * the specified {@link Envelope}.
82     // * @param env defines a bounding box
83     // */
84     // public void removeSelection(Envelope env) {
85     // // TODO: implement me!
86     // refreshSelection();
87     // }
88     //
89     // /**
90     // * Not yet implemented!
91     // * Extends the current selection by all features accepted by
92     // * the specified {@link Filter}.
93     // * @param filter defines some features of the layer
94     // * @return {@code true} if selection has changed by calling this method
95     // */
96     // public boolean addSelection(Filter filter) {
97     // // TODO: implement me!
98     // refreshSelection();
99     // return false;
100     // }
101     //
102     // /**
103     // * Not yet implemented!
104     // * Removes all features accepted by the specified {@link Filter} from the
105     // * selection.
106     // * @param filter defines some features of the layer
107     // * @return {@code true} if selection has changed by calling this method
108     // */
109     // public boolean removeSelection(Filter filter) {
110     // // TODO: implement me!
111     // refreshSelection();
112     // return false;
113     // }
114     //
115     // /**
116     // * Returns a {@link Filter}, which defines the current selection.
117     // */
118     // public Filter getSelectionAsFilter() {
119     // return selectionFilter;
120     // }
121     //
122     // /**
123     // * Returns a {@link Style}, which highlights the current selection.
124     // */
125     // public Style getSelectionAsStyle() {
126     // return selectionMapStyle;
127     // }
128     //
129     // /**
130     // * Resets all selection objects with the new selection.
131     // */
132     // protected void resetSelectionObjects() {
133     //// resetMapStyle(); // TODO go to mapLayerSync
134     // resetFilter();
135     // resetChartStyle();
136     // }
137     //
138     //
139     ////
140     //// /**
141     //// * Creates a {@link Style} to highlight the current selection.
142     //// */
143     //// protected void resetMapStyle() {
144     //// selectionMapStyle = null;
145     //// try {
146     //// if ( selectionFeatures.isEmpty() )
147     //// selectionMapStyle = getLayer().getStyle();
148     //// else
149     //// selectionMapStyle = StylingUtil.createDefaultStyle(getLayer().getGeoObject());
150     ////
151     ////// getLayer().setStyle(selectionMapStyle);
152     //// } catch (Exception e) {
153     //// LOGGER.error("Error while trying to create a selection style",e);
154     //// }
155     //// }
156     //
157     // /**
158     // * Creates a {@link Filter} for the current selection.
159     // */
160     // protected void resetFilter() {
161     // // create a filter which accepts all Features contained
162     // // in the selection list
163     // selectionFilter = new AbstractFilterImpl( FeatureUtil.FILTER_FACTORY ) {
164     // public boolean evaluate(Object feature) {
165     // if ( feature instanceof Feature )
166     // return evaluate((Filter)feature);
167     // return false;
168     // }
169     // public boolean evaluate(Feature feature) {
170     // return selectionFeatures.contains(feature);
171     // }
172     // };
173     // }
174     //
175     // /**
176     // * Not yet implemented!
177     // * Creates a {@code ChartStyle} to highlight the current selection.
178     // */
179     // protected void resetChartStyle() {
180     // selectionChartStyle = null;
181     // // TODO: define the selectionChartStyle
182     // }
183     }

Properties

Name Value
svn:eol-style native
svn:keywords Id
svn:mime-type text/plain

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26