public Fill getDefaultFill() { Fill fill = new FillImpl(filterFactory); try { fill.setColor(filterFactory.literal("#808080")); fill.setOpacity(filterFactory.literal(new Double(1.0))); fill.setBackgroundColor(filterFactory.literal("#FFFFFF")); } catch (org.geotools.filter.IllegalFilterException ife) { throw new RuntimeException("Error creating fill", ife); } return fill; }
public void visit(Fill fill) { Fill copy = sf.getDefaultFill(); copy.setBackgroundColor(copy(fill.getBackgroundColor())); copy.setColor(copy(fill.getColor())); copy.setGraphicFill(copy(fill.getGraphicFill())); copy.setOpacity(copy(fill.getOpacity())); if (STRICT && !copy.equals(fill)) { throw new IllegalStateException("Was unable to duplicate provided Fill:" + fill); } pages.push(copy); }
/** * create a default fill 50% gray * * @return the fill created */ public Fill createFill() { Fill f = sf.getDefaultFill(); f.setColor(literalExpression("#808080")); f.setBackgroundColor(literalExpression("#808080")); f.setOpacity(literalExpression(1.0)); return f; }
public Fill createFill( Expression color, Expression backgroundColor, Expression opacity, Graphic graphicFill) { Fill fill = new FillImpl(filterFactory); if (color == null) { color = Fill.DEFAULT.getColor(); } fill.setColor(color); if (backgroundColor == null) { backgroundColor = Fill.DEFAULT.getBackgroundColor(); } fill.setBackgroundColor(backgroundColor); if (opacity == null) { opacity = Fill.DEFAULT.getOpacity(); } // would be nice to check if this was within bounds but we have to wait until use since it // may depend on an attribute fill.setOpacity(opacity); fill.setGraphicFill(graphicFill); return fill; }
public Fill getDefaultFill() { Fill fill = new FillImpl(filterFactory); try { fill.setColor(filterFactory.literal("#808080")); fill.setOpacity(filterFactory.literal( new Double(1.0))); fill.setBackgroundColor(filterFactory.literal("#FFFFFF")); } catch (org.geotools.filter.IllegalFilterException ife) { throw new RuntimeException("Error creating fill", ife); } return fill; }
public void visit(Fill fill) { Fill copy = sf.getDefaultFill(); copy.setBackgroundColor( copy( fill.getBackgroundColor()) ); copy.setColor(copy( fill.getColor())); copy.setGraphicFill( copy(fill.getGraphicFill())); copy.setOpacity( copy(fill.getOpacity())); if( STRICT && !copy.equals( fill )){ throw new IllegalStateException("Was unable to duplicate provided Fill:"+fill ); } pages.push(copy); }
/** * create a default fill 50% gray * * @return the fill created */ public Fill createFill() { Fill f = sf.getDefaultFill(); f.setColor(literalExpression("#808080")); f.setBackgroundColor(literalExpression("#808080")); f.setOpacity(literalExpression(1.0)); return f; }
/** * create a default fill 50% gray * * @return the fill created */ public Fill createFill() { Fill f = sf.getDefaultFill(); f.setColor(literalExpression("#808080")); f.setBackgroundColor(literalExpression("#808080")); f.setOpacity(literalExpression(1.0)); return f; }
public Fill createFill(Expression color, Expression backgroundColor, Expression opacity, Graphic graphicFill) { Fill fill = new FillImpl(); if (color == null) { color = Fill.DEFAULT.getColor(); } fill.setColor(color); if (backgroundColor == null) { backgroundColor = Fill.DEFAULT.getBackgroundColor(); } fill.setBackgroundColor(backgroundColor); if (opacity == null) { opacity = Fill.DEFAULT.getOpacity(); } // would be nice to check if this was within bounds but we have to wait until use since it may depend on an attribute fill.setOpacity(opacity); fill.setGraphicFill(graphicFill); return fill; }
public Fill createFill(Expression color, Expression backgroundColor, Expression opacity, Graphic graphicFill) { Fill fill = new FillImpl(filterFactory); if (color == null) { color = Fill.DEFAULT.getColor(); } fill.setColor(color); if (backgroundColor == null) { backgroundColor = Fill.DEFAULT.getBackgroundColor(); } fill.setBackgroundColor(backgroundColor); if (opacity == null) { opacity = Fill.DEFAULT.getOpacity(); } // would be nice to check if this was within bounds but we have to wait until use since it may depend on an attribute fill.setOpacity(opacity); fill.setGraphicFill(graphicFill); return fill; }