public void visit(Style style) { Style copy = null; FeatureTypeStyle[] fts = style.getFeatureTypeStyles(); final int length = fts.length; FeatureTypeStyle[] ftsCopy = new FeatureTypeStyle[length]; for (int i = 0; i < length; i++) { if (fts[i] != null) { fts[i].accept(this); ftsCopy[i] = (FeatureTypeStyle) pages.pop(); } } copy = sf.createStyle(); copy.setAbstract(style.getAbstract()); copy.setName(style.getName()); copy.setTitle(style.getTitle()); copy.setFeatureTypeStyles(ftsCopy); if (STRICT && !copy.equals(style)) { throw new IllegalStateException("Was unable to duplicate provided Style:" + style); } pages.push(copy); }
style.setTitle(child.getFirstChild().getNodeValue());
public void visit(Style style) { Style copy = null; FeatureTypeStyle[] fts = style.getFeatureTypeStyles(); final int length=fts.length; FeatureTypeStyle[] ftsCopy = new FeatureTypeStyle[length]; for (int i = 0; i < length; i++) { if (fts[i] != null) { fts[i].accept(this); ftsCopy[i] = (FeatureTypeStyle) pages.pop(); } } copy = sf.createStyle(); copy.setAbstract(style.getAbstract()); copy.setName(style.getName()); copy.setTitle(style.getTitle()); copy.setFeatureTypeStyles(ftsCopy); if( STRICT && !copy.equals( style )){ throw new IllegalStateException("Was unable to duplicate provided Style:"+style ); } pages.push(copy); }
public void visit(Style style) { Style copy = null; FeatureTypeStyle[] fts = style.getFeatureTypeStyles(); final int length=fts.length; FeatureTypeStyle[] ftsCopy = new FeatureTypeStyle[length]; for (int i = 0; i < length; i++) { if (fts[i] != null) { fts[i].accept(this); ftsCopy[i] = (FeatureTypeStyle) pages.pop(); } } copy = sf.createStyle(); copy.setAbstract(style.getAbstract()); copy.setName(style.getName()); copy.setTitle(style.getTitle()); copy.setFeatureTypeStyles(ftsCopy); pages.push(copy); }
copy.setAbstract(style.getAbstract()); copy.setName(style.getName()); copy.setTitle(style.getTitle()); copy.setFeatureTypeStyles(ftsCopy);
public void visit(Style style) { Style copy = null; FeatureTypeStyle[] fts = style.getFeatureTypeStyles(); final int length=fts.length; FeatureTypeStyle[] ftsCopy = new FeatureTypeStyle[length]; for (int i = 0; i < length; i++) { if (fts[i] != null) { fts[i].accept(this); ftsCopy[i] = (FeatureTypeStyle) getPages().pop(); } } copy = sf.createStyle(); copy.setAbstract(style.getAbstract()); copy.setName(style.getName()); copy.setTitle(style.getTitle()); copy.setFeatureTypeStyles(ftsCopy); getPages().push(copy); }
style.setTitle((String) node.getChildValue("Title"));
private org.geotools.styling.Style setupStyle(int type, Color color) { StyleFactory sf = org.geotools.factory.CommonFactoryFinder .getStyleFactory(null); StyleBuilder sb = new StyleBuilder(); org.geotools.styling.Style s = sf.createStyle(); s.setTitle("selection"); // TODO parameterise the color PolygonSymbolizer ps = sb.createPolygonSymbolizer(color); ps.setStroke(sb.createStroke(color)); LineSymbolizer ls = sb.createLineSymbolizer(color); Graphic h = sb.createGraphic(); h.setMarks(new Mark[] { sb.createMark("square", color) }); PointSymbolizer pts = sb.createPointSymbolizer(h); // Rule r = sb.createRule(new Symbolizer[]{ps,ls,pts}); switch (type) { case POLYGON: s = sb.createStyle(ps); break; case POINT: s = sb.createStyle(pts); break; case LINE: s = sb.createStyle(ls); } return s; }