/[schmitzm]/branches/2.2.x/src/skrueger/geotools/labelsearch/SearchResultFeature.java
ViewVC logotype

Diff of /branches/2.2.x/src/skrueger/geotools/labelsearch/SearchResultFeature.java

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

revision 153 by alfonx, Sat Jun 20 12:48:24 2009 UTC revision 685 by alfonx, Wed Feb 10 15:04:02 2010 UTC
# Line 1  Line 1 
1    /*******************************************************************************
2     * Copyright (c) 2009 Martin O. J. Schmitz.
3     *
4     * This file is part of the SCHMITZM library - a collection of utility
5     * classes based on Java 1.6, focusing (not only) on Java Swing
6     * and the Geotools library.
7     *
8     * The SCHMITZM project is hosted at:
9     * http://wald.intevation.org/projects/schmitzm/
10     *
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     * as published by the Free Software Foundation; either version 3
14     * of the License, or (at your option) any later version.
15     *
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     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19     * 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     * 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     * or try this link: http://www.gnu.org/licenses/lgpl.html
25     *
26     * Contributors:
27     *     Martin O. J. Schmitz - initial API and implementation
28     *     Stefan A. Krüger - additional utility classes
29     ******************************************************************************/
30  package skrueger.geotools.labelsearch;  package skrueger.geotools.labelsearch;
31    
32  import javax.swing.SwingUtilities;  import javax.swing.SwingUtilities;
33    
34  import org.apache.log4j.Logger;  import org.apache.log4j.Logger;
 import org.geotools.feature.Feature;  
35  import org.geotools.map.MapLayer;  import org.geotools.map.MapLayer;
36    import org.opengis.feature.simple.SimpleFeature;
37    
38  public class SearchResultFeature implements SearchResult {  public class SearchResultFeature implements SearchResult {
39          final static private Logger LOGGER = Logger          final static private Logger LOGGER = Logger
40                          .getLogger(SearchResultFeature.class);                          .getLogger(SearchResultFeature.class);
41    
42          private final Feature feature;          private final SimpleFeature feature;
43          private final String title;          private final String title;
44          private final schmitzm.geotools.gui.JMapPane mapPane;          private final schmitzm.geotools.gui.SelectableXMapPane mapPane;
45          private final String inTitle;          private final String inTitle;
46    
47          private final MapLayer mapLayer;          private final MapLayer mapLayer;
48    
49          public SearchResultFeature(Feature feature, String title, String inTitle,          public SearchResultFeature(SimpleFeature feature, String title, String inTitle,
50                          schmitzm.geotools.gui.JMapPane mapPane, MapLayer mapLayer) {                          schmitzm.geotools.gui.SelectableXMapPane mapPane, MapLayer mapLayer) {
51                  this.feature = feature;                  this.feature = feature;
52                  this.title = title;                  this.title = title;
53                  this.inTitle = inTitle;                  this.inTitle = inTitle;
# Line 31  public class SearchResultFeature impleme Line 60  public class SearchResultFeature impleme
60                  return feature.toString();                  return feature.toString();
61          }          }
62    
63          public Feature getFeature() {          public SimpleFeature getFeature() {
64                  return feature;                  return feature;
65          }          }
66    
# Line 53  public class SearchResultFeature impleme Line 82  public class SearchResultFeature impleme
82                  mapPane.refresh();                  mapPane.refresh();
83    
84                  // TODO                  // TODO
85                  // Mark the selected Feature using a spacial style.. similar to the                  // Mark the selected SimpleFeature using a spacial style.. similar to the
86                  // selection stuff.                  // selection stuff.
87                  // mapLayer.getStyle().addFeatureTypeStyle( new FeatureTypeStyle());                  // mapLayer.getStyle().addFeatureTypeStyle( new FeatureTypeStyle());
88    

Legend:
Removed from v.153  
changed lines
  Added in v.685

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26