fillColor = color; return createPolygonStyle(color, fillColor, 0.5f);
@Test public void visitNullExpression() { // this code generates a Displacement.NULL inside, which in turn contains // ConstantExpression.NULL Style style = SLD.createPolygonStyle(Color.YELLOW, null, 0.0f); UomRescaleStyleVisitor visitor = new UomRescaleStyleVisitor(1); // used to throw an exception here style.accept(visitor); } }
public Style getDefaultFeatureStyle() { Style defaultStyle = null; Class<?> origBinding = featureType.getGeometryDescriptor().getType().getBinding(); Random rnd = new Random(); Color randomColor = Color.getHSBColor(rnd.nextFloat(), 1.0f, 1.0f); if (origBinding.isAssignableFrom(Point.class)) { defaultStyle = SLD.createPointStyle("Circle", Color.GRAY, randomColor, 1.0f, 4); } else if (origBinding.isAssignableFrom(MultiPoint.class)) { defaultStyle = SLD.createPointStyle("Circle", Color.GRAY, randomColor, 1.0f, 4); } else if (origBinding.isAssignableFrom(LineString.class)) { defaultStyle = SLD.createLineStyle(randomColor, 1f); } else if (origBinding.isAssignableFrom(MultiLineString.class)) { defaultStyle = SLD.createLineStyle(randomColor, 1f); } else if (origBinding.isAssignableFrom(Polygon.class)) { defaultStyle = SLD.createPolygonStyle(Color.GRAY, randomColor, 0.5f); } else if (origBinding.isAssignableFrom(MultiPolygon.class)) { defaultStyle = SLD.createPolygonStyle(Color.GRAY, randomColor, 0.5f); } return defaultStyle; }
fillColor = color; return createPolygonStyle(color, fillColor, 0.5f);
case MULTIPOLYGON: style = SLD.createPolygonStyle( dialog.getLineColor(), dialog.getFillColor(),
public Style getStyle() { Style style = null; if ( geometry instanceof Point ) { style = SLD.createPointStyle( CIRCLE, strokeColor, fillColor, fillOpacity, radius ); } else if ( geometry instanceof Polygon || geometry instanceof MultiPolygon ) { if ( MapLayerType.BOUNDARY.equals( mapLayerType ) ) { style = SLD.createLineStyle( strokeColor, LINE_STROKE_WIDTH ); } else { style = SLD.createPolygonStyle( strokeColor, fillColor, fillOpacity ); } } else { style = SLD.createSimpleStyle( getFeatureType() ); } return style; }
case POLYGON: case MULTIPOLYGON: style = SLD.createPolygonStyle( dialog.getLineColor(), dialog.getFillColor(),