[Schmitzm-commits] r918 - in trunk/src: schmitzm/geotools/styling skrueger/geotools
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Jun 30 17:04:31 CEST 2010
Author: alfonx
Date: 2010-06-30 17:04:30 +0200 (Wed, 30 Jun 2010)
New Revision: 918
Modified:
trunk/src/schmitzm/geotools/styling/StylingUtil.java
trunk/src/skrueger/geotools/LegendIconFeatureRenderer.java
Log:
tuning the selection styles
Modified: trunk/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/styling/StylingUtil.java 2010-06-30 13:45:41 UTC (rev 917)
+++ trunk/src/schmitzm/geotools/styling/StylingUtil.java 2010-06-30 15:04:30 UTC (rev 918)
@@ -1730,12 +1730,13 @@
*/
public static FeatureTypeStyle createSelectionStyle(
GeometryForm geometryForm, SelectionStylesTypes type) {
- Symbolizer[] symbolizers = createSelectionSymbolizers(geometryForm, type);
+ Symbolizer[] symbolizers = createSelectionSymbolizers(geometryForm,
+ type);
return STYLE_BUILDER.createFeatureTypeStyle(symbolizers, 0.0,
Double.POSITIVE_INFINITY);
}
-
+
public enum SelectionStylesTypes {
LeftTop2RightBottom_lines, RightTop2LeftBottom_lines
}
@@ -1749,7 +1750,8 @@
* @return
*/
public static Rule createSelectionRule(GeometryForm geometryForm,
- String idPropertyName, List<String> selectionIds, SelectionStylesTypes type) {
+ String idPropertyName, List<String> selectionIds,
+ SelectionStylesTypes type) {
if (idPropertyName == null)
throw new IllegalArgumentException();
@@ -1778,7 +1780,8 @@
}
// Symboizers
- Symbolizer[] symbolizers = createSelectionSymbolizers(geometryForm, type);
+ Symbolizer[] symbolizers = createSelectionSymbolizers(geometryForm,
+ type);
rule.symbolizers().addAll(Arrays.asList(symbolizers));
return rule;
@@ -1806,14 +1809,14 @@
break;
case POLYGON: { // Black
Stroke outline = STYLE_BUILDER.createStroke(Color.red, 3);
-
- Mark dots = null ;
+
+ Mark dots = null;
if (type == SelectionStylesTypes.LeftTop2RightBottom_lines) {
dots = STYLE_BUILDER.createMark("shape://backslash");
} else {
dots = STYLE_BUILDER.createMark("shape://slash");
}
-
+
dots.setStroke(STYLE_BUILDER.createStroke(Color.red, 3.));
Graphic fillGraphic = STYLE_BUILDER.createGraphic(null, dots, null);
fillGraphic.setSize(FILTER_FACTORY.literal(9.));
@@ -1822,12 +1825,19 @@
PolygonSymbolizer polS0 = STYLE_BUILDER.createPolygonSymbolizer(
outline, fill);
symbolizers = LangUtil.extendArray(symbolizers, polS0);
- }
+ }
{ // White
Stroke outline = STYLE_BUILDER.createStroke(Color.yellow
.brighter(), 1);
- Mark dots = STYLE_BUILDER.createMark("shape://backslash");
+ Mark dots = null;
+
+ if (type == SelectionStylesTypes.LeftTop2RightBottom_lines) {
+ dots = STYLE_BUILDER.createMark("shape://backslash");
+ } else {
+ dots = STYLE_BUILDER.createMark("shape://slash");
+ }
+
dots.setStroke(STYLE_BUILDER.createStroke(Color.yellow
.brighter(), 1.));
Graphic fillGraphic = STYLE_BUILDER.createGraphic(null, dots,
Modified: trunk/src/skrueger/geotools/LegendIconFeatureRenderer.java
===================================================================
--- trunk/src/skrueger/geotools/LegendIconFeatureRenderer.java 2010-06-30 13:45:41 UTC (rev 917)
+++ trunk/src/skrueger/geotools/LegendIconFeatureRenderer.java 2010-06-30 15:04:30 UTC (rev 918)
@@ -262,7 +262,7 @@
if (bg != null) {
// ****************************************************************************
- // The following lines define the backgroup color for the rendered
+ // The following lines define the background color for the rendered
// images
// ****************************************************************************
graphics.setBackground(bg);
@@ -273,8 +273,6 @@
// Enable anti-aliasing for the legend symbols
graphics.setRenderingHints(getHints());
- // TODO scaleDenominator = 100000000000000000000000000000d; Was ist das
- // fuer ein Quatsch?
final NumberRange<Integer> scaleRange = NumberRange.create(Integer.MAX_VALUE,Integer.MAX_VALUE);
try {
@@ -283,8 +281,6 @@
Symbolizer symbolizer = symbolizers[sIdx];
if (symbolizer instanceof TextSymbolizer) {
- LOGGER
- .warn("createImageForRule for a TextSymbolizer. Sure we want that?");
continue;
}
More information about the Schmitzm-commits
mailing list