[Schmitzm-commits] r962 - in trunk: src/schmitzm/geotools/gui src/schmitzm/swing src_junit/schmitzm/jfree/feature/style src_junit/schmitzm/lang
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Aug 11 11:02:29 CEST 2010
Author: alfonx
Date: 2010-08-11 11:02:26 +0200 (Wed, 11 Aug 2010)
New Revision: 962
Modified:
trunk/src/schmitzm/geotools/gui/GridPanelFormatter.java
trunk/src/schmitzm/geotools/gui/GridPanelFormatter_LatLon1.java
trunk/src/schmitzm/swing/TestingUtil.java
trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java
trunk/src_junit/schmitzm/lang/LimitedHashMapTest.java
Log:
Fixed: "[#1553] Remove SwingUtilities2 as it is not standard Api"
http://wald.intevation.org/tracker/index.php?func=detail&aid=1553&group_id=47&atid=293
and organized imports
Modified: trunk/src/schmitzm/geotools/gui/GridPanelFormatter.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/GridPanelFormatter.java 2010-08-11 08:57:20 UTC (rev 961)
+++ trunk/src/schmitzm/geotools/gui/GridPanelFormatter.java 2010-08-11 09:02:26 UTC (rev 962)
@@ -39,7 +39,6 @@
import schmitzm.lang.LangUtil;
import schmitzm.lang.ResourceProvider;
-import sun.swing.SwingUtilities2;
/**
* This class defines how the {@link GridPanel} shows the coordinate grid and
@@ -135,7 +134,9 @@
* Returns the default height for a horizontal Grid
*/
public int getHeightForHorizontal(GridPanel panel) {
- return SwingUtilities2.getFontMetrics(panel, getFont()).getHeight() + 2;
+// return SwingUtilities2.getFontMetrics(panel, getFont()).getHeight() + 2;
+
+ return panel.getGraphics().getFontMetrics(getFont()).getHeight() + 2;
}
/**
Modified: trunk/src/schmitzm/geotools/gui/GridPanelFormatter_LatLon1.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/GridPanelFormatter_LatLon1.java 2010-08-11 08:57:20 UTC (rev 961)
+++ trunk/src/schmitzm/geotools/gui/GridPanelFormatter_LatLon1.java 2010-08-11 09:02:26 UTC (rev 962)
@@ -37,7 +37,6 @@
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import schmitzm.lang.ResourceProvider;
-import sun.swing.SwingUtilities2;
/**
* This class defines a {@link GridPanelFormatter} for the WGS84
@@ -130,7 +129,8 @@
}
int deegree = Math.abs(degrees);
int minute = Math.abs(minutes);
- String coordStr = deegree + "\u00b0" + MINUTE_FORMAT.format(minute) + "'";
+ String coordStr = deegree + "\u00b0" + MINUTE_FORMAT.format(minute)
+ + "'";
if (degrees != 0 || minutes != 0) {
if (panel.isVertical())
coordStr += RES
@@ -162,8 +162,11 @@
@Override
public int getWidthForVertical(GridPanel panel) {
- return SwingUtilities2.getFontMetrics(panel, font).stringWidth(
+ return panel.getGraphics().getFontMetrics(getFont()).stringWidth(
"90\u00b030' N") + 2;
+
+ // return SwingUtilities2.getFontMetrics(panel, font).stringWidth(
+ // "90\u00b030' N") + 2;
}
}
Modified: trunk/src/schmitzm/swing/TestingUtil.java
===================================================================
--- trunk/src/schmitzm/swing/TestingUtil.java 2010-08-11 08:57:20 UTC (rev 961)
+++ trunk/src/schmitzm/swing/TestingUtil.java 2010-08-11 09:02:26 UTC (rev 962)
@@ -3,20 +3,12 @@
import java.awt.GraphicsEnvironment;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import java.io.IOException;
-import java.net.URL;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import javax.swing.JComponent;
import javax.swing.JFrame;
-import org.geotools.feature.FeatureCollection;
-import org.opengis.feature.simple.SimpleFeature;
-import org.opengis.feature.simple.SimpleFeatureType;
-
-import schmitzm.geotools.io.GeoImportUtil;
-import schmitzm.jfree.feature.style.FeatureChartStyle;
import schmitzm.lang.LangUtil;
/**
Modified: trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java
===================================================================
--- trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java 2010-08-11 08:57:20 UTC (rev 961)
+++ trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java 2010-08-11 09:02:26 UTC (rev 962)
@@ -29,7 +29,6 @@
import org.jfree.chart.axis.ValueTick;
import org.jfree.ui.RectangleEdge;
import org.jfree.ui.TextAnchor;
-import org.junit.Ignore;
import org.junit.Test;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.simple.SimpleFeatureType;
Modified: trunk/src_junit/schmitzm/lang/LimitedHashMapTest.java
===================================================================
--- trunk/src_junit/schmitzm/lang/LimitedHashMapTest.java 2010-08-11 08:57:20 UTC (rev 961)
+++ trunk/src_junit/schmitzm/lang/LimitedHashMapTest.java 2010-08-11 09:02:26 UTC (rev 962)
@@ -1,47 +1,13 @@
package schmitzm.lang;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import java.awt.Color;
-import java.awt.Graphics2D;
import java.awt.GraphicsEnvironment;
-import java.awt.geom.Rectangle2D;
-import java.awt.image.BufferedImage;
-import java.io.File;
import java.io.IOException;
-import java.net.URL;
-import java.text.NumberFormat;
-import java.util.ArrayList;
-import java.util.List;
import org.apache.log4j.Logger;
-import org.geotools.feature.FeatureCollection;
-import org.geotools.filter.text.cql2.CQLException;
-import org.jfree.chart.ChartFrame;
-import org.jfree.chart.JFreeChart;
-import org.jfree.chart.axis.AxisState;
-import org.jfree.chart.axis.NumberAxis;
-import org.jfree.chart.axis.NumberTick;
-import org.jfree.chart.axis.NumberTickUnit;
-import org.jfree.chart.axis.TickUnits;
-import org.jfree.chart.axis.ValueTick;
-import org.jfree.ui.RectangleEdge;
-import org.jfree.ui.TextAnchor;
import org.junit.Test;
-import org.opengis.feature.simple.SimpleFeature;
-import org.opengis.feature.simple.SimpleFeatureType;
-import schmitzm.geotools.io.GeoImportUtil;
-import schmitzm.io.IOUtil;
-import schmitzm.jfree.chart.style.ChartAxisStyle;
-import schmitzm.jfree.chart.style.ChartLabelStyle;
-import schmitzm.jfree.chart.style.ChartRendererStyle;
-import schmitzm.jfree.chart.style.ChartType;
-import schmitzm.jfree.table.AggregationFunction;
-
public class LimitedHashMapTest {
private static Logger log = Logger.getLogger(LimitedHashMapTest.class);
/** If tests are run on a system with head, we may theoretically open dialgs, frames etc. **/
More information about the Schmitzm-commits
mailing list