[Schmitzm-commits] r1053 - trunk/src/schmitzm/swing

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Sep 23 18:20:30 CEST 2010


Author: alfonx
Date: 2010-09-23 18:20:26 +0200 (Thu, 23 Sep 2010)
New Revision: 1053

Modified:
   trunk/src/schmitzm/swing/TestingUtil.java
Log:
Improved the GUI testing features

Modified: trunk/src/schmitzm/swing/TestingUtil.java
===================================================================
--- trunk/src/schmitzm/swing/TestingUtil.java	2010-09-23 16:15:25 UTC (rev 1052)
+++ trunk/src/schmitzm/swing/TestingUtil.java	2010-09-23 16:20:26 UTC (rev 1053)
@@ -2,6 +2,7 @@
 
 import java.awt.Color;
 import java.awt.Component;
+import java.awt.Dialog.ModalExclusionType;
 import java.awt.Graphics2D;
 import java.awt.GraphicsEnvironment;
 import java.awt.Image;
@@ -76,6 +77,8 @@
 			w = f;
 		}
 
+		// If it is a modal dialog, unmodalize it
+		w.setModalExclusionType(ModalExclusionType.NO_EXCLUDE);
 		w.setVisible(true);
 		int countWait = 0;
 		while (w.isVisible() && !stopFlag.get()) {
@@ -151,11 +154,11 @@
 	}
 
 	public static void testGui(JPanel jPanel, String title) throws Throwable {
-		testGui(jPanel, title, 5);
+		testGui(jPanel, title, 3);
 	}
 
 	public static void testGui(Component gui) throws Throwable {
-		testGui(gui, 5);
+		testGui(gui, 3);
 	}
 
 	public static BufferedImage visualize(DefaultMapLayer dml) throws Throwable {



More information about the Schmitzm-commits mailing list