/[schmitzm]/branches/1.0-gt2-2.6/src/skrueger/geotools/labelsearch/SearchResultFeature.java
ViewVC logotype

Annotation of /branches/1.0-gt2-2.6/src/skrueger/geotools/labelsearch/SearchResultFeature.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 139 - (hide annotations)
Thu Jun 11 12:52:58 2009 UTC (15 years, 8 months ago) by alfonx
Original Path: trunk/src/skrueger/geotools/labelsearch/SearchResultFeature.java
File MIME type: text/plain
File size: 1172 byte(s)
* Fixed a bug when creating more than 3 additional styles at once... A NPE occurred because none has been set as the selected additional style.
* Moved the i8n and Localisation for LabelSearch to schmitzm

1 alfonx 139 package skrueger.geotools.labelsearch;
2    
3     import javax.swing.SwingUtilities;
4    
5     import org.apache.log4j.Logger;
6     import org.geotools.feature.Feature;
7    
8    
9     public class SearchResultFeature implements SearchResult {
10     final static private Logger LOGGER = Logger.getLogger(SearchResultFeature.class);
11    
12     private final Feature feature;
13     private final String title;
14     private final schmitzm.geotools.gui.JMapPane mapPane;
15     private final String inTitle;
16    
17     public SearchResultFeature(Feature feature, String title, String inTitle, schmitzm.geotools.gui.JMapPane mapPane) {
18     this.feature = feature;
19     this.title = title;
20     this.inTitle = inTitle;
21     this.mapPane = mapPane;
22     }
23    
24     @Override
25     public String toString() {
26     return feature.toString();
27     }
28    
29     public Feature getFeature() {
30     return feature;
31     }
32    
33     @Override
34     public String getTitle() {
35     return title;
36     }
37    
38     @Override
39     public void open() {
40    
41     // GuiAndTools.checkThatWeAreOnEDT();
42     if (!SwingUtilities.isEventDispatchThread()) {
43     LOGGER.error("Not on EDT");
44     throw new RuntimeException("Not on EDT!");
45     }
46    
47    
48     mapPane.zoomTo(feature);
49     mapPane.refresh();
50     }
51    
52     @Override
53     public String getInTitle() {
54     return inTitle;
55     }
56    
57     }

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