[Schmitzm-commits] r77 - trunk/src/schmitzm/geotools/gui

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Apr 22 13:48:12 CEST 2009


Author: alfonx
Date: 2009-04-22 13:48:11 +0200 (Wed, 22 Apr 2009)
New Revision: 77

Modified:
   trunk/src/schmitzm/geotools/gui/FeatureTablePane.java
Log:
have a look at the "valueIsAdjusting" parameter when updating the preview. Without this change, when the selection is inverted, there have been too many preview updates.

  featuresTable.getSelectionModel().addListSelectionListener( new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
    	  if (!e.getValueIsAdjusting()) 
    		  performListSelection();
      }
    } );

Modified: trunk/src/schmitzm/geotools/gui/FeatureTablePane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/FeatureTablePane.java	2009-04-21 21:15:25 UTC (rev 76)
+++ trunk/src/schmitzm/geotools/gui/FeatureTablePane.java	2009-04-22 11:48:11 UTC (rev 77)
@@ -215,13 +215,15 @@
     // Wenn Auswahl in Tabelle sich aendert, Vorschau anpassen
     featuresTable.getSelectionModel().addListSelectionListener( new ListSelectionListener() {
       public void valueChanged(ListSelectionEvent e) {
-        performListSelection();
+    	  if (!e.getValueIsAdjusting()) 
+    		  performListSelection();
       }
     } );
     // Wenn neue FeatureCollection gesetzt wird, alle Features
     // in Vorschau anzeigen
     featuresTableModel.addTableModelListener( new TableModelListener() {
       public void tableChanged(TableModelEvent e) {
+    	  System.out.println(e);
         showFeaturesInMap( getFeatureCollection() );
       }
     } );



More information about the Schmitzm-commits mailing list