25 |
* |
* |
26 |
* Contributors: |
* Contributors: |
27 |
* Martin O. J. Schmitz - initial API and implementation |
* Martin O. J. Schmitz - initial API and implementation |
28 |
* Stefan A. Krüger - additional utility classes |
* Stefan A. Tzeggai - additional utility classes |
29 |
******************************************************************************/ |
******************************************************************************/ |
30 |
package skrueger.geotools.labelsearch; |
package skrueger.geotools.labelsearch; |
31 |
|
|
34 |
import java.util.Collections; |
import java.util.Collections; |
35 |
import java.util.Iterator; |
import java.util.Iterator; |
36 |
import java.util.List; |
import java.util.List; |
|
import java.util.Locale; |
|
37 |
|
|
38 |
import org.apache.log4j.Logger; |
import org.apache.log4j.Logger; |
39 |
import org.geotools.data.DefaultQuery; |
import org.geotools.data.DefaultQuery; |
50 |
import org.opengis.filter.expression.PropertyName; |
import org.opengis.filter.expression.PropertyName; |
51 |
|
|
52 |
import schmitzm.geotools.feature.FeatureUtil; |
import schmitzm.geotools.feature.FeatureUtil; |
53 |
|
import schmitzm.geotools.gui.GeotoolsGUIUtil; |
54 |
import schmitzm.geotools.styling.StylingUtil; |
import schmitzm.geotools.styling.StylingUtil; |
55 |
import schmitzm.lang.LangUtil; |
import schmitzm.lang.LangUtil; |
|
import schmitzm.lang.ResourceProvider; |
|
56 |
|
|
57 |
/** |
/** |
58 |
* This class allows to search for a {@link String} in a map. The algorithm will |
* This class allows to search for a {@link String} in a map. The algorithm will |
59 |
* analyze the {@link Style} of every visible(?) layer and determine the label |
* analyze the {@link Style} of every visible(?) layer and determine the label |
60 |
* attribute. This field is then searched for every feature. |
* attribute. This field is then searched for every feature. |
61 |
* |
* |
62 |
* @author Stefan A. Krüger |
* @author Stefan A. Tzeggai |
63 |
* |
* |
64 |
*/ |
*/ |
65 |
public class LabelSearch { |
public class LabelSearch { |
66 |
final static private Logger LOGGER = Logger.getLogger(LabelSearch.class); |
final static private Logger LOGGER = Logger.getLogger(LabelSearch.class); |
67 |
|
|
68 |
public static ResourceProvider RESOURCE = new ResourceProvider(LangUtil |
/** Translations come from GTResourceBundle **/ |
|
.extendPackagePath(LabelSearch.class, "labelsearch"), |
|
|
Locale.ENGLISH); |
|
|
|
|
69 |
public static String R(String key, Object... values) { |
public static String R(String key, Object... values) { |
70 |
return RESOURCE.getString(key, values); |
return GeotoolsGUIUtil.R(key, values); |
71 |
} |
} |
72 |
|
|
73 |
protected final schmitzm.geotools.gui.SelectableXMapPane mapPane; |
protected final schmitzm.geotools.gui.SelectableXMapPane mapPane; |