[Schmitzm-commits] r694 - in trunk/src: schmitzm/geotools schmitzm/geotools/gui schmitzm/geotools/styling skrueger skrueger/geotools skrueger/swing

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Feb 12 12:28:44 CET 2010


Author: alfonx
Date: 2010-02-12 12:28:41 +0100 (Fri, 12 Feb 2010)
New Revision: 694

Added:
   trunk/src/skrueger/sld/
Modified:
   trunk/src/schmitzm/geotools/JTSUtil.java
   trunk/src/schmitzm/geotools/gui/JMapEditorPane.java
   trunk/src/schmitzm/geotools/gui/MapActionControlPane.java
   trunk/src/schmitzm/geotools/gui/SelectableXMapPane.java
   trunk/src/schmitzm/geotools/styling/StylingUtil.java
   trunk/src/skrueger/geotools/MapPaneToolBar.java
   trunk/src/skrueger/geotools/StyledFS.java
   trunk/src/skrueger/geotools/StyledLayerUtil.java
   trunk/src/skrueger/geotools/XMapPaneMouseListener.java
   trunk/src/skrueger/geotools/XMapPaneTool.java
   trunk/src/skrueger/swing/SmallButton.java
Log:
AS-Features: AS for ColoredQuantities now supports to define a NODATA symbol

Modified: trunk/src/schmitzm/geotools/JTSUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/JTSUtil.java	2010-02-11 20:13:26 UTC (rev 693)
+++ trunk/src/schmitzm/geotools/JTSUtil.java	2010-02-12 11:28:41 UTC (rev 694)
@@ -29,15 +29,12 @@
  ******************************************************************************/
 package schmitzm.geotools;
 
-import it.geosolutions.imageio.utilities.Utilities;
-
 import java.awt.Rectangle;
 
 import org.apache.log4j.Logger;
 import org.geotools.geometry.jts.JTS;
 import org.geotools.geometry.jts.ReferencedEnvelope;
 import org.geotools.referencing.CRS;
-import org.geotools.resources.CRSUtilities;
 import org.opengis.geometry.DirectPosition;
 import org.opengis.referencing.FactoryException;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;

Modified: trunk/src/schmitzm/geotools/gui/JMapEditorPane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/JMapEditorPane.java	2010-02-11 20:13:26 UTC (rev 693)
+++ trunk/src/schmitzm/geotools/gui/JMapEditorPane.java	2010-02-12 11:28:41 UTC (rev 694)
@@ -34,7 +34,6 @@
 import java.awt.Graphics2D;
 import java.awt.Rectangle;
 import java.awt.event.MouseEvent;
-import java.awt.geom.Point2D;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Stack;
@@ -69,7 +68,6 @@
 import skrueger.geotools.XMapPane;
 import skrueger.geotools.XMapPaneAction;
 import skrueger.geotools.XMapPaneActionAdapter;
-import skrueger.geotools.XMapPaneAction_Zoom;
 import skrueger.geotools.XMapPaneTool;
 
 import com.vividsolutions.jts.geom.Coordinate;

Modified: trunk/src/schmitzm/geotools/gui/MapActionControlPane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/MapActionControlPane.java	2010-02-11 20:13:26 UTC (rev 693)
+++ trunk/src/schmitzm/geotools/gui/MapActionControlPane.java	2010-02-12 11:28:41 UTC (rev 694)
@@ -43,8 +43,6 @@
 import schmitzm.geotools.map.event.FeatureSelectedEvent;
 import schmitzm.swing.CaptionsChangeable;
 import schmitzm.swing.SwingUtil;
-import schmitzm.swing.event.MouseInputType;
-import skrueger.geotools.XMapPaneAction;
 import skrueger.geotools.XMapPaneTool;
 
 /**

Modified: trunk/src/schmitzm/geotools/gui/SelectableXMapPane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/SelectableXMapPane.java	2010-02-11 20:13:26 UTC (rev 693)
+++ trunk/src/schmitzm/geotools/gui/SelectableXMapPane.java	2010-02-12 11:28:41 UTC (rev 694)
@@ -32,14 +32,12 @@
 import java.awt.BorderLayout;
 import java.awt.LayoutManager;
 import java.awt.Point;
-import java.awt.RenderingHints;
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Point2D;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Enumeration;
 import java.util.Hashtable;
-import java.util.Map;
 
 import org.apache.log4j.Logger;
 import org.geotools.coverage.grid.GeneralGridEnvelope;
@@ -61,7 +59,6 @@
 import org.geotools.referencing.CRS;
 import org.geotools.renderer.GTRenderer;
 import org.geotools.renderer.lite.StreamingRenderer;
-import org.geotools.resources.image.ImageUtilities;
 import org.opengis.coverage.CannotEvaluateException;
 import org.opengis.feature.simple.SimpleFeature;
 import org.opengis.feature.simple.SimpleFeatureType;

Modified: trunk/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/styling/StylingUtil.java	2010-02-11 20:13:26 UTC (rev 693)
+++ trunk/src/schmitzm/geotools/styling/StylingUtil.java	2010-02-12 11:28:41 UTC (rev 694)
@@ -66,9 +66,6 @@
 import org.geotools.factory.GeoTools;
 import org.geotools.feature.FeatureCollection;
 import org.geotools.feature.GeometryAttributeType;
-import org.geotools.filter.AttributeExpression;
-import org.geotools.filter.AttributeExpressionImpl;
-import org.geotools.filter.AttributeExpressionImpl2;
 import org.geotools.filter.BinaryComparisonAbstract;
 import org.geotools.filter.ConstantExpression;
 import org.geotools.filter.FilterAttributeExtractor;
@@ -161,7 +158,7 @@
 	static {
 		SLDTRANSFORMER.setEncoding(Charset.defaultCharset());
 	}
-
+	
 	/** Standard-Instanz einer {@link StyleFactory} */
 	public static final StyleFactory STYLE_FACTORY = CommonFactoryFinder
 			.getStyleFactory(GeoTools.getDefaultHints());

Modified: trunk/src/skrueger/geotools/MapPaneToolBar.java
===================================================================
--- trunk/src/skrueger/geotools/MapPaneToolBar.java	2010-02-11 20:13:26 UTC (rev 693)
+++ trunk/src/skrueger/geotools/MapPaneToolBar.java	2010-02-12 11:28:41 UTC (rev 694)
@@ -59,7 +59,6 @@
 import schmitzm.lang.LangUtil;
 import schmitzm.lang.ResourceProvider;
 import schmitzm.swing.ButtonGroup;
-import schmitzm.swing.SwingUtil;
 import skrueger.swing.SmallButton;
 import skrueger.swing.SmallToggleButton;
 

Modified: trunk/src/skrueger/geotools/StyledFS.java
===================================================================
--- trunk/src/skrueger/geotools/StyledFS.java	2010-02-11 20:13:26 UTC (rev 693)
+++ trunk/src/skrueger/geotools/StyledFS.java	2010-02-12 11:28:41 UTC (rev 694)
@@ -30,7 +30,6 @@
 package skrueger.geotools;
 
 import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.net.URL;
 import java.util.Date;
@@ -38,13 +37,11 @@
 
 import javax.swing.ImageIcon;
 import javax.swing.JPanel;
-import javax.xml.transform.TransformerException;
 
 import org.apache.log4j.Logger;
 import org.geotools.data.FeatureSource;
 import org.geotools.feature.FeatureCollection;
 import org.geotools.styling.Style;
-import org.jfree.util.AttributedStringUtilities;
 import org.opengis.feature.simple.SimpleFeature;
 import org.opengis.feature.simple.SimpleFeatureType;
 import org.opengis.feature.type.AttributeDescriptor;

Modified: trunk/src/skrueger/geotools/StyledLayerUtil.java
===================================================================
--- trunk/src/skrueger/geotools/StyledLayerUtil.java	2010-02-11 20:13:26 UTC (rev 693)
+++ trunk/src/skrueger/geotools/StyledLayerUtil.java	2010-02-12 11:28:41 UTC (rev 694)
@@ -914,6 +914,12 @@
 	}
 
 	/**
+	 * *If appended to the name of a rule, this rule shall not be shown in the
+	 * legend
+	 */
+	public final static String HIDE_IN_LAYER_LEGEND_HINT = "HIDE_IN_LEGEND";
+
+	/**
 	 * Creates a {@link JPanel} that shows a legend for a list of
 	 * {@link FeatureTypeStyle}s and a targeted featureType
 	 * 
@@ -944,6 +950,10 @@
 			final List<Rule> rules = ftStyle.rules();
 			for (final Rule rule : rules) {
 
+				// Check if this RULE shall actually appear in the legend
+				if (rule.getName().endsWith(HIDE_IN_LAYER_LEGEND_HINT))
+					continue;
+
 				/**
 				 * Let's not create a hbox for Rules that only contain
 				 * TextSymbolizers

Modified: trunk/src/skrueger/geotools/XMapPaneMouseListener.java
===================================================================
--- trunk/src/skrueger/geotools/XMapPaneMouseListener.java	2010-02-11 20:13:26 UTC (rev 693)
+++ trunk/src/skrueger/geotools/XMapPaneMouseListener.java	2010-02-12 11:28:41 UTC (rev 694)
@@ -2,8 +2,6 @@
 
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
 import java.awt.event.MouseEvent;
 import java.awt.event.MouseWheelEvent;
 import java.awt.geom.AffineTransform;

Modified: trunk/src/skrueger/geotools/XMapPaneTool.java
===================================================================
--- trunk/src/skrueger/geotools/XMapPaneTool.java	2010-02-11 20:13:26 UTC (rev 693)
+++ trunk/src/skrueger/geotools/XMapPaneTool.java	2010-02-12 11:28:41 UTC (rev 694)
@@ -11,8 +11,6 @@
 import javax.swing.ImageIcon;
 import javax.swing.KeyStroke;
 
-import com.sun.corba.se.spi.copyobject.CopierManager;
-
 import schmitzm.lang.LangUtil;
 import schmitzm.lang.ResourceProvider;
 import schmitzm.swing.SwingUtil;

Modified: trunk/src/skrueger/swing/SmallButton.java
===================================================================
--- trunk/src/skrueger/swing/SmallButton.java	2010-02-11 20:13:26 UTC (rev 693)
+++ trunk/src/skrueger/swing/SmallButton.java	2010-02-12 11:28:41 UTC (rev 694)
@@ -14,10 +14,24 @@
 		this(action);
 		setToolTipText(tooltip);
 	}
+	
 
+	public SmallButton(String label) {
+		this();
+		setText(label);
+	}
+	
+
+
+	public SmallButton(String label, String toolTip) {
+		this();
+		setText(label);
+		setToolTipText(toolTip);
+	}	
+
 	public SmallButton(Action action) {
-		super(action);
-		setBorder(BorderFactory.createEtchedBorder());
+		this();
+		setAction(action);
 	}
 
 }



More information about the Schmitzm-commits mailing list