[Schmitzm-commits] r584 - branches/1.0-gt2-2.6/src/schmitzm/geotools/gui
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Nov 26 15:27:55 CET 2009
Author: alfonx
Date: 2009-11-26 15:27:50 +0100 (Thu, 26 Nov 2009)
New Revision: 584
Modified:
branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/FeatureLayerFilterDialog.java
Log:
1. Removed the fc.getBounds from the
FeatureSelectedEvent fse = new FeatureSelectedEvent(
getMapPane(), layer, null, fc, // SK, 26.11.2009 passing null as the bounds, because getBounds can be very expensive
2. added boolean geoprev as a parameter to the constructor. It is then passed to the internal FeatureCollectionFilterPanel instead of always true
Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/FeatureLayerFilterDialog.java
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/FeatureLayerFilterDialog.java 2009-11-26 14:22:57 UTC (rev 583)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/FeatureLayerFilterDialog.java 2009-11-26 14:27:50 UTC (rev 584)
@@ -126,6 +126,7 @@
.getString(DIALOG_TITLE);
private SelectableXMapPane mapPane = null;
private MapLayer layer = null;
+ private final boolean geomPrev;
/**
* Erzeugt einen neuen Dialog.
@@ -138,6 +139,7 @@
* @param mapLayer
* MapLayer, aus dem die FeatureCollection stammt, auf der der
* Filter definiert wird
+ * @param geomPrev if true, a geometry mappane will be created
* @exception IOException
* falls beim Ermitteln der {@link FeatureCollection} aus dem
* Layer ein Fehler auftritt
@@ -148,8 +150,8 @@
* Krüger</a>
*/
public FeatureLayerFilterDialog(Window parent, SelectableXMapPane mapPane,
- MapLayer mapLayer) {
- this(parent, mapPane, mapLayer, true);
+ MapLayer mapLayer, boolean geomPrev) {
+ this(parent, mapPane, mapLayer, true, geomPrev);
}
/**
@@ -177,8 +179,9 @@
* Krüger</a>
*/
protected FeatureLayerFilterDialog(Component parent, SelectableXMapPane mapPane,
- MapLayer mapLayer, boolean initGUI) {
+ MapLayer mapLayer, boolean initGUI, boolean geomPrev) {
super(SwingUtil.getParentWindow(parent));
+ this.geomPrev = geomPrev;
setModal(true);
if (mapLayer != null)
this.setTitle(frameTitle + " [" + mapLayer.getTitle() + "]");
@@ -224,6 +227,7 @@
final Filter fiterInAction = getMapLayer().getQuery()
.getFilter();
+
if (getMapPane() != null
&& !fiterInAction.equals(newFilter)) {
@@ -231,7 +235,7 @@
FeatureCollection<SimpleFeatureType, SimpleFeature> fc = getFilterPanel()
.filterFeatureCollection();
FeatureSelectedEvent fse = new FeatureSelectedEvent(
- getMapPane(), layer, fc.getBounds(), fc,
+ getMapPane(), layer, null, fc, // SK, 26.11.2009 passing null as the bounds, because getBounds can be very expensive
FeatureLayerFilterDialog.this);
getMapPane().fireMapPaneEvent(fse);
} catch (Exception err) {
@@ -267,7 +271,7 @@
filterPanel = new FeatureCollectionFilterPanel(FILTER_PARSER,
(FeatureCollection<SimpleFeatureType, SimpleFeature>) layer
- .getFeatureSource().getFeatures(), true, null) {
+ .getFeatureSource().getFeatures(), geomPrev, null) {
@Override
protected void resetComponentsAfterTest(Throwable err) {
super.resetComponentsAfterTest(err);
More information about the Schmitzm-commits
mailing list