[Schmitzm-commits] r2177 - trunk/schmitzm-core/src/main/java/de/schmitzm/swing

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Fri Dec 21 23:53:41 CET 2012


Author: mojays
Date: 2012-12-21 23:53:40 +0100 (Fri, 21 Dec 2012)
New Revision: 2177

Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SliderSpinnerPanel.java
   trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingWorker.java
Log:
SliderSpinnerPanel: debug messages removed
SwingWorker: dialog closing on EDT

Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SliderSpinnerPanel.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SliderSpinnerPanel.java	2012-12-21 15:19:06 UTC (rev 2176)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SliderSpinnerPanel.java	2012-12-21 22:53:40 UTC (rev 2177)
@@ -309,7 +309,7 @@
     double value = getValue();
     if ( lastValue != null && value == lastValue )
       return;
-    LOGGER.debug("value changed: "+lastValue+" -> "+value);
+//    LOGGER.debug("value changed: "+lastValue+" -> "+value);
     lastValue = value;
     for (ChangeListener l : getListeners(ChangeListener.class))
       l.stateChanged(e);

Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingWorker.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingWorker.java	2012-12-21 15:19:06 UTC (rev 2176)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/swing/SwingWorker.java	2012-12-21 22:53:40 UTC (rev 2177)
@@ -194,10 +194,16 @@
     if (dialog != null) {
       if ( dialog.isCanceled() )
         this.canceled = true;
-      if ( !keepOpen )
-        dialog.setVisible(false);
-      else
-        dialog.setDialogOption( StatusDialog.OK_OPTION );
+      Runnable runnable = new Runnable() {
+        @Override
+        public void run() {
+          if ( !keepOpen )
+            dialog.setVisible(false);
+          else
+            dialog.setDialogOption( StatusDialog.OK_OPTION );
+        }
+      };
+      SwingUtilities.invokeLater(runnable);
     }
   }
 



More information about the Schmitzm-commits mailing list