/[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 226 - (hide annotations)
Thu Jul 16 07:37:43 2009 UTC (15 years, 7 months ago) by alfonx
File MIME type: text/plain
File size: 6703 byte(s)
* Created a new ManageChartsForMapDialog that allows to manage charts and define which chart is visible in which map. Besides, that saving the ChartSTyles is not implemented, you can now basically define and use the charts.

* Created a TransitionShapefileRenderer in schmitzm. It's a copy (extend was not possible) of a normal ShapefileRenderer class, but extended by a hack to fall back to the normal StreamingRenderer if a FeatureOperationTreeFilter is applied to a MapLayer. 
* I have set this TransitionShapefileRenderer as default in JMapPane & Co.
* It's called "transition", because we will remove it as soon as we moved to GT 2.6 and switched the filters to eCQL.

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 226 import skrueger.geotools.StyledFeaturesInterface;
22 alfonx 224 import skrueger.geotools.StyledLayerInterface;
23 alfonx 96
24     /**
25 mojays 103 * This manager holds a set of {@link Feature Features} which are <i>selected</i>
26 alfonx 224 * in a {@link StyledLayerInterface} ({@link StyledFeatureCollectionInterface} or
27 mojays 103 * {@link StyledFeatureSourceInterface}).
28 alfonx 96 * @author <a href="mailto:[email protected]">Martin Schmitz</a> (University of Bonn/Germany)
29     */
30 alfonx 111 public class StyledFeatureLayerSelectionModel extends StyledLayerSelectionModel<String> {
31 mojays 103 /**
32     * Creates a new selection model.
33 alfonx 224 * @param styledLayer styled map the selection is controlled of
34 mojays 103 */
35 alfonx 226 public StyledFeatureLayerSelectionModel(StyledFeaturesInterface styledLayer) {
36 alfonx 224 super(styledLayer);
37 mojays 103 }
38    
39    
40    
41     //*********** UNUSED STUFF **************
42    
43     // /** A static logger for this class */
44     // private static final Logger LOGGER = Logger.getLogger(StyledFeatureLayerSelectionModel.class);
45     // /** Holds the current selection as {@link Style}. */
46     // protected Style selectionMapStyle = null;
47     // /** Holds the current selection as {@link Filter}. */
48     // protected Filter selectionFilter = null;
49     // /** Holds the current selection as {@code ChartStyle}.
50     // * TODO: determine an appropriate type for the chart styling. */
51     // protected Object selectionChartStyle = null;
52 alfonx 96 //
53     // /**
54     // * Creates a new selection model.
55     // * @param layer layer to control the selection of
56     // */
57     // public StyledFeatureLayerSelectionModel() {
58     // }
59     //
60     // /**
61     // * Not yet implemented!
62     // * Extends the current selection by all features contained by
63     // * the specified {@link Envelope}.
64     // * @param env defines a bounding box
65     // */
66     // public void addSelection(Envelope env) {
67     // // TODO: implement me!
68     // refreshSelection();
69     // }
70     //
71     // /**
72     // * Not yet implemented!
73     // * Reduces the current selection by all features contained by
74     // * the specified {@link Envelope}.
75     // * @param env defines a bounding box
76     // */
77     // public void removeSelection(Envelope env) {
78     // // TODO: implement me!
79     // refreshSelection();
80     // }
81     //
82     // /**
83     // * Not yet implemented!
84     // * Extends the current selection by all features accepted by
85     // * the specified {@link Filter}.
86     // * @param filter defines some features of the layer
87     // * @return {@code true} if selection has changed by calling this method
88     // */
89     // public boolean addSelection(Filter filter) {
90     // // TODO: implement me!
91     // refreshSelection();
92     // return false;
93     // }
94     //
95     // /**
96     // * Not yet implemented!
97     // * Removes all features accepted by the specified {@link Filter} from the
98     // * selection.
99     // * @param filter defines some features of the layer
100     // * @return {@code true} if selection has changed by calling this method
101     // */
102     // public boolean removeSelection(Filter filter) {
103     // // TODO: implement me!
104     // refreshSelection();
105     // return false;
106     // }
107     //
108     // /**
109     // * Returns a {@link Filter}, which defines the current selection.
110     // */
111     // public Filter getSelectionAsFilter() {
112     // return selectionFilter;
113     // }
114     //
115     // /**
116     // * Returns a {@link Style}, which highlights the current selection.
117     // */
118     // public Style getSelectionAsStyle() {
119     // return selectionMapStyle;
120     // }
121     //
122     // /**
123     // * Resets all selection objects with the new selection.
124     // */
125     // protected void resetSelectionObjects() {
126     //// resetMapStyle(); // TODO go to mapLayerSync
127     // resetFilter();
128     // resetChartStyle();
129     // }
130     //
131     //
132     ////
133     //// /**
134     //// * Creates a {@link Style} to highlight the current selection.
135     //// */
136     //// protected void resetMapStyle() {
137     //// selectionMapStyle = null;
138     //// try {
139     //// if ( selectionFeatures.isEmpty() )
140     //// selectionMapStyle = getLayer().getStyle();
141     //// else
142     //// selectionMapStyle = StylingUtil.createDefaultStyle(getLayer().getGeoObject());
143     ////
144     ////// getLayer().setStyle(selectionMapStyle);
145     //// } catch (Exception e) {
146     //// LOGGER.error("Error while trying to create a selection style",e);
147     //// }
148     //// }
149     //
150     // /**
151     // * Creates a {@link Filter} for the current selection.
152     // */
153     // protected void resetFilter() {
154     // // create a filter which accepts all Features contained
155     // // in the selection list
156     // selectionFilter = new AbstractFilterImpl( FeatureUtil.FILTER_FACTORY ) {
157     // public boolean evaluate(Object feature) {
158     // if ( feature instanceof Feature )
159     // return evaluate((Filter)feature);
160     // return false;
161     // }
162     // public boolean evaluate(Feature feature) {
163     // return selectionFeatures.contains(feature);
164     // }
165     // };
166     // }
167     //
168     // /**
169     // * Not yet implemented!
170     // * Creates a {@code ChartStyle} to highlight the current selection.
171     // */
172     // protected void resetChartStyle() {
173     // selectionChartStyle = null;
174     // // TODO: define the selectionChartStyle
175     // }
176     }

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