style.setName(info.getName()); styleCache.put(info, style);
style.setName(firstChildValue); } else if (childName.equalsIgnoreCase("Title")) {
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 Style build() { if (unset) { return null; } Style s; if (fts.size() == 0) { s = sf.createNamedStyle(); s.setName(name); } else { s = sf.createStyle(); s.setName(name); if (styleAbstract != null) s.getDescription().setAbstract(new SimpleInternationalString(styleAbstract)); if (title != null) s.getDescription().setTitle(new SimpleInternationalString(title)); for (FeatureTypeStyleBuilder builder : fts) { s.featureTypeStyles().add(builder.build()); } s.setDefault(isDefault); } reset(); return s; }
style.setName((String) node.getChildValue("Name"));
/** * Creates the new style. * * @return the style */ public static Style createNewStyle() { Style style = styleFactory.createStyle(); style.setName("New Style"); return style; }
style.setName(child.getFirstChild().getNodeValue());
style.setName(firstChildValue); } else if (childName.equalsIgnoreCase("Title")) {
/** Override so it does not try to load a file from disk */ @Override public Style getStyle() throws IOException { StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(null); Style style = styleFactory.createStyle(); style.setName("Default Style"); return style; } };
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 Style getLISAStyle(String propertyName) { final String styleName = "LISA"; final String[] classValues = { "HH", "LH", "LL", "HL", "" }; final String[] classDescs = { "H-H", "L-H", "L-L", "H-L", "None" }; // http://www.w3schools.com/tags/ref_color_tryit.asp // Color.Tomato, Color.LightGoldenrodYellow, Color.CornflowerBlue, Color.Thistle final Color[] colorList = { new Color(255, 99, 71), new Color(250, 250, 210), new Color(100, 149, 237), new Color(216, 191, 216), new Color(225, 225, 225) }; FeatureTypeStyle featureTypeStyle = sf.createFeatureTypeStyle(); featureTypeStyle.setName(styleName); for (int k = 0; k < classValues.length; k++) { Fill fill = sf.createFill(ff.literal(colorList[k]), ff.literal(opacity)); Symbolizer symbolizer = sf.createPolygonSymbolizer(lineStroke, fill, geometryField); symbolizer.setName(classDescs[k]); Rule rule = sf.createRule(); rule.setName(classDescs[k]); rule.setFilter(ff.equal(ff.property(propertyName), ff.literal(classValues[k]), false)); rule.symbolizers().add(symbolizer); featureTypeStyle.rules().add(rule); } Style style = sf.createStyle(); style.featureTypeStyles().add(featureTypeStyle); style.setName(styleName); return style; }
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.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.setName((String) node.getChildValue("Name"));
style.setName((String) node.getChildValue("Name"));
style.setName(styleName);