[Schmitzm-commits] r981 - in trunk: src/schmitzm/data src/schmitzm/geotools/feature src/schmitzm/geotools/gui src/schmitzm/geotools/map/event src/schmitzm/jfree/chart/style src/schmitzm/lang/tree src/schmitzm/swing src_junit/schmitzm/geotools/styling src_junit/schmitzm/jfree

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Aug 19 17:55:20 CEST 2010


Author: alfonx
Date: 2010-08-19 17:55:11 +0200 (Thu, 19 Aug 2010)
New Revision: 981

Modified:
   trunk/src/schmitzm/data/RasterOperationTree.java
   trunk/src/schmitzm/geotools/feature/FeatureOperationTree.java
   trunk/src/schmitzm/geotools/feature/FeatureUtil.java
   trunk/src/schmitzm/geotools/gui/MouseSelectionTracker.java
   trunk/src/schmitzm/geotools/gui/SelectableFeatureTablePane.java
   trunk/src/schmitzm/geotools/map/event/JEditorPaneEvent.java
   trunk/src/schmitzm/jfree/chart/style/ChartRendererStyle.java
   trunk/src/schmitzm/lang/tree/OperationTree.java
   trunk/src/schmitzm/swing/TestingUtil.java
   trunk/src_junit/schmitzm/geotools/styling/StylingUtilTest.java
   trunk/src_junit/schmitzm/jfree/JFreeChartUtilTest.java
Log:
* GUI for chart quality in Managechartdialog
* Extended TestingUtil.testGui to handle dialogs and frames
* Test for MangeChartFormapDialog
* Organized Imports

Modified: trunk/src/schmitzm/data/RasterOperationTree.java
===================================================================
--- trunk/src/schmitzm/data/RasterOperationTree.java	2010-08-18 15:40:54 UTC (rev 980)
+++ trunk/src/schmitzm/data/RasterOperationTree.java	2010-08-19 15:55:11 UTC (rev 981)
@@ -29,6 +29,8 @@
  ******************************************************************************/
 package schmitzm.data;
 
+import schmitzm.data.RasterOperationTree.FilterReferenceNode;
+import schmitzm.data.RasterOperationTree.RasterReferenceNode;
 import schmitzm.lang.tree.BinaryTreeNode;
 import schmitzm.lang.tree.OperationTree;
 import schmitzm.lang.tree.TreeNode;

Modified: trunk/src/schmitzm/geotools/feature/FeatureOperationTree.java
===================================================================
--- trunk/src/schmitzm/geotools/feature/FeatureOperationTree.java	2010-08-18 15:40:54 UTC (rev 980)
+++ trunk/src/schmitzm/geotools/feature/FeatureOperationTree.java	2010-08-19 15:55:11 UTC (rev 981)
@@ -31,6 +31,8 @@
 
 import org.opengis.feature.simple.SimpleFeature;
 
+import schmitzm.geotools.feature.FeatureOperationTree.AttributeIndexReferenceNode;
+import schmitzm.geotools.feature.FeatureOperationTree.AttributeNameReferenceNode;
 import schmitzm.lang.tree.BinaryTreeNode;
 import schmitzm.lang.tree.OperationTree;
 import schmitzm.lang.tree.TreeNode;

Modified: trunk/src/schmitzm/geotools/feature/FeatureUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/feature/FeatureUtil.java	2010-08-18 15:40:54 UTC (rev 980)
+++ trunk/src/schmitzm/geotools/feature/FeatureUtil.java	2010-08-19 15:55:11 UTC (rev 981)
@@ -101,7 +101,6 @@
 
 import schmitzm.geotools.FilterUtil;
 import schmitzm.geotools.GTUtil;
-import schmitzm.geotools.feature.FeatureUtil.GeometryForm;
 import schmitzm.lang.LangUtil;
 import schmitzm.lang.ResourceProvider;
 import skrueger.geotools.StyledFeaturesInterface;

Modified: trunk/src/schmitzm/geotools/gui/MouseSelectionTracker.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/MouseSelectionTracker.java	2010-08-18 15:40:54 UTC (rev 980)
+++ trunk/src/schmitzm/geotools/gui/MouseSelectionTracker.java	2010-08-19 15:55:11 UTC (rev 981)
@@ -31,6 +31,8 @@
 
 import java.awt.event.MouseEvent;
 
+import schmitzm.geotools.gui.MouseSelectionTracker.SelectionMode;
+
 /**
  * Extends the geotools {@link org.geotools.swing.MouseSelectionTracker} with an
  * enable/disable functionality. Furthermore the tracker (optionally)

Modified: trunk/src/schmitzm/geotools/gui/SelectableFeatureTablePane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/SelectableFeatureTablePane.java	2010-08-18 15:40:54 UTC (rev 980)
+++ trunk/src/schmitzm/geotools/gui/SelectableFeatureTablePane.java	2010-08-19 15:55:11 UTC (rev 981)
@@ -46,8 +46,8 @@
 import javax.swing.JScrollPane;
 import javax.swing.JTable;
 import javax.swing.JToolBar;
+import javax.swing.RowSorter.SortKey;
 import javax.swing.SortOrder;
-import javax.swing.RowSorter.SortKey;
 import javax.swing.event.ListSelectionEvent;
 import javax.swing.event.ListSelectionListener;
 

Modified: trunk/src/schmitzm/geotools/map/event/JEditorPaneEvent.java
===================================================================
--- trunk/src/schmitzm/geotools/map/event/JEditorPaneEvent.java	2010-08-18 15:40:54 UTC (rev 980)
+++ trunk/src/schmitzm/geotools/map/event/JEditorPaneEvent.java	2010-08-19 15:55:11 UTC (rev 981)
@@ -32,8 +32,8 @@
 import org.geotools.map.MapLayer;
 
 import schmitzm.geotools.gui.JMapEditorPane;
+import schmitzm.geotools.gui.JMapEditorPane.EditorMode;
 import schmitzm.geotools.gui.XMapPaneEvent;
-import schmitzm.geotools.gui.JMapEditorPane.EditorMode;
 
 /**
  * Diese Klasse stellt ein allgemeines Ereignis dar, das ein

Modified: trunk/src/schmitzm/jfree/chart/style/ChartRendererStyle.java
===================================================================
--- trunk/src/schmitzm/jfree/chart/style/ChartRendererStyle.java	2010-08-18 15:40:54 UTC (rev 980)
+++ trunk/src/schmitzm/jfree/chart/style/ChartRendererStyle.java	2010-08-19 15:55:11 UTC (rev 981)
@@ -481,7 +481,7 @@
    *               to a continuous line)
    */
   public void setDefaultLineDashAttributes(Float... dashAttr) {
-    if ( dashAttr.length == 0 )
+    if ( dashAttr != null && dashAttr.length == 0 )
       dashAttr = null;
     defaultDashAttr = dashAttr;
   }

Modified: trunk/src/schmitzm/lang/tree/OperationTree.java
===================================================================
--- trunk/src/schmitzm/lang/tree/OperationTree.java	2010-08-18 15:40:54 UTC (rev 980)
+++ trunk/src/schmitzm/lang/tree/OperationTree.java	2010-08-19 15:55:11 UTC (rev 981)
@@ -35,6 +35,11 @@
 import org.apache.log4j.Logger;
 
 import schmitzm.lang.LangUtil;
+import schmitzm.lang.tree.OperationTree.ConstantAliasNode;
+import schmitzm.lang.tree.OperationTree.ConstantNode;
+import schmitzm.lang.tree.OperationTree.ITENode;
+import schmitzm.lang.tree.OperationTree.OperatorNode;
+import schmitzm.lang.tree.OperationTree.UnaryOperatorNode;
 
 /**
  * Diese Klasse stellt einen Operator-Baum dar. Dieser unterstuetzt folgende

Modified: trunk/src/schmitzm/swing/TestingUtil.java
===================================================================
--- trunk/src/schmitzm/swing/TestingUtil.java	2010-08-18 15:40:54 UTC (rev 980)
+++ trunk/src/schmitzm/swing/TestingUtil.java	2010-08-19 15:55:11 UTC (rev 981)
@@ -1,6 +1,8 @@
 package schmitzm.swing;
 
+import java.awt.Component;
 import java.awt.GraphicsEnvironment;
+import java.awt.Window;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -25,20 +27,19 @@
 	 * {@link ExceptionDialog} is opens in the GUI, an exception is thrown.<br/>
 	 * The test is skipped if the JVM is running headless.
 	 * 
-	 * @param contentPane
+	 * @param gui
 	 * @param title
 	 *            can be used to explain the tests what to check
 	 */
-	public static void testPanel(JComponent contentPane, String title)
-			throws Throwable {
+	public static void testGui(Component gui, String title) throws Throwable {
+		
+		if (GraphicsEnvironment.isHeadless())
+			return;
 
 		final AtomicBoolean stopFlag = new AtomicBoolean(false);
 
 		final AtomicReference<Throwable> err = new AtomicReference<Throwable>();
 
-		if (GraphicsEnvironment.isHeadless())
-			return;
-
 		ExceptionDialog.addListener(new ActionListener() {
 
 			@Override
@@ -48,22 +49,29 @@
 			}
 		});
 
-		JFrame f = new JFrame(title);
-		f.setContentPane(contentPane);
-		f.pack();
-		f.setVisible(true);
-		while (f.isVisible() && !stopFlag.get())
+		Window w = null;
+		if (gui instanceof Window) {
+			w = (Window) gui;
+		} else if (gui instanceof JComponent) {
+			JFrame f = new JFrame(title);
+			f.setContentPane((JComponent) gui);
+			f.pack();
+			w = f;
+		}
+
+		w.setVisible(true);
+		while (w.isVisible() && !stopFlag.get())
 			LangUtil.sleepExceptionless(100);
-		f.dispose();
+		w.dispose();
+
 		if (stopFlag.get()) {
 			throw err.get();
 		}
 
 	}
 
-	public static void testPanel(JComponent contentPane) throws Throwable {
-		testPanel(contentPane, contentPane.getClass().getSimpleName());
+	public static void testGui(Component gui) throws Throwable {
+		testGui(gui, gui.getClass().getSimpleName());
 	}
 
-
 }

Modified: trunk/src_junit/schmitzm/geotools/styling/StylingUtilTest.java
===================================================================
--- trunk/src_junit/schmitzm/geotools/styling/StylingUtilTest.java	2010-08-18 15:40:54 UTC (rev 980)
+++ trunk/src_junit/schmitzm/geotools/styling/StylingUtilTest.java	2010-08-19 15:55:11 UTC (rev 981)
@@ -95,7 +95,7 @@
 
 			jPanel.add(new JLabel(new ImageIcon(img, st.toString())));
 		}
-		TestingUtil.testPanel(jPanel, "Different selection styles");
+		TestingUtil.testGui(jPanel, "Different selection styles");
 
 	}
 

Modified: trunk/src_junit/schmitzm/jfree/JFreeChartUtilTest.java
===================================================================
--- trunk/src_junit/schmitzm/jfree/JFreeChartUtilTest.java	2010-08-18 15:40:54 UTC (rev 980)
+++ trunk/src_junit/schmitzm/jfree/JFreeChartUtilTest.java	2010-08-19 15:55:11 UTC (rev 981)
@@ -1,7 +1,5 @@
 package schmitzm.jfree;
 
-import static org.junit.Assert.*;
-
 import org.junit.Test;
 
 public class JFreeChartUtilTest {



More information about the Schmitzm-commits mailing list