/** Creates a new instance of CustomGlyphRenderer */ public CustomGlyphRenderer() { FilterFactory2 factory = (FilterFactory2) org.geotools.factory.CommonFactoryFinder.getFilterFactory(null); list.addProperty("radius", Expression.class, factory.literal(50)); list.addProperty("circle color", Expression.class, factory.literal("#000066")); list.addProperty("bar height", Expression.class, factory.literal(150)); list.addProperty("bar color", Expression.class, factory.literal("#000000")); list.addProperty("bar uncertainty", Expression.class, factory.literal(50)); list.addProperty("bar uncertainty width", Expression.class, factory.literal(5)); list.addProperty("bar uncertainty color", Expression.class, factory.literal("#999999")); list.addProperty("pointer length", Expression.class, factory.literal(100)); list.addProperty("pointer color", Expression.class, factory.literal("#FF0000")); list.addProperty("pointer direction", Expression.class, factory.literal(21)); list.addProperty("wedge width", Expression.class, factory.literal(25)); list.addProperty("wedge color", Expression.class, factory.literal("#9999FF")); }
public Class getPropertyType(String name) { int index = names.indexOf(name); if (index != -1) { return getPropertyType(index); } else { throw new RuntimeException( "Tried to get the class of a non-existent property: " + name); } }
if (list.hasProperty(nextName)) { list.setPropertyValue(nextName, props.get(nextName)); } else { Expression e = (Expression) list.getPropertyValue("radius"); if (e != null) { radius = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("circle color"); if (e != null) { circleColor = Color.decode((String) e.evaluate(feature)); e = (Expression) list.getPropertyValue("bar height"); if (e != null) { barHeight = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("bar color"); if (e != null) { barColor = Color.decode((String) e.evaluate(feature)); e = (Expression) list.getPropertyValue("bar uncertainty"); if (e != null) { barUncertainty = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("bar uncertainty width"); if (e != null) { barUncWidth = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("bar uncertainty color");
GlyphProperty prop = (GlyphProperty) list.get(index); if (value instanceof String) { value = stringToLiteral((String) value); value = numberToLiteral((Integer) value); value = numberToLiteral((Double) value);
public void setPropertyValue(String name, int value) { setPropertyValue(name, Integer.valueOf(value)); }
public Object getPropertyValue(String name) { int index = names.indexOf(name); if (index != -1) { return getPropertyValue(index); } else { throw new RuntimeException( "Tried to get the class of a non-existent property: " + name); } }
public void setPropertyValue(String name, Object value){ int index = names.indexOf(name); if (index != -1){ GlyphProperty prop = (GlyphProperty) list.get(index); if (value instanceof String){ value = stringToLiteral((String) value); } if (value instanceof Integer){ value = numberToLiteral((Integer) value); } if (value instanceof Double){ value = numberToLiteral((Double) value); } if (prop.getType().isAssignableFrom(value.getClass())){ prop.setValue(value); } else { throw new RuntimeException("Wrong class for setting variable " + name + ". Expected a " + prop.getType() + " but received a " + value.getClass() + "."); } } else { throw new RuntimeException("Tried to set the value of a non-existent property: " + name); } } }
public void setPropertyValue(String name, double value) { setPropertyValue(name, new Double(value)); }
public Object getPropertyValue(String name){ int index = names.indexOf(name); if (index != -1){ return getPropertyValue(index); } else { throw new RuntimeException("Tried to get the class of a non-existent property: " + name); } }
if (list.hasProperty(nextName)) { list.setPropertyValue(nextName, props.get(nextName)); } else { Expression e = (Expression) list.getPropertyValue("radius"); if (e != null){ radius = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("circle color"); if (e != null){ circleColor = Color.decode((String) e.evaluate(feature)); e = (Expression) list.getPropertyValue("bar height"); if (e != null){ barHeight = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("bar color"); if (e != null){ barColor = Color.decode((String) e.evaluate(feature)); e = (Expression) list.getPropertyValue("bar uncertainty"); if (e != null){ barUncertainty = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("bar uncertainty width"); if (e != null){ barUncWidth = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("bar uncertainty color");
public void setPropertyValue(String name, Object value){ int index = names.indexOf(name); if (index != -1){ GlyphProperty prop = (GlyphProperty) list.get(index); if (value instanceof String){ value = stringToLiteral((String) value); } if (value instanceof Integer){ value = numberToLiteral((Integer) value); } if (value instanceof Double){ value = numberToLiteral((Double) value); } if (prop.getType().isAssignableFrom(value.getClass())){ prop.setValue(value); } else { throw new RuntimeException("Wrong class for setting variable " + name + ". Expected a " + prop.getType() + " but received a " + value.getClass() + "."); } } else { throw new RuntimeException("Tried to set the value of a non-existent property: " + name); } } }
public void setPropertyValue(String name, int value){ setPropertyValue(name, new Integer(value)); }
public Class getPropertyType(String name){ int index = names.indexOf(name); if (index != -1){ return getPropertyType(index); } else { throw new RuntimeException("Tried to get the class of a non-existent property: " + name); } }
public Object getPropertyValue(String name){ int index = names.indexOf(name); if (index != -1){ return getPropertyValue(index); } else { throw new RuntimeException("Tried to get the class of a non-existent property: " + name); } }
/** Creates a new instance of CustomGlyphRenderer */ public CustomGlyphRenderer() { FilterFactory factory = FilterFactoryFinder.createFilterFactory(); list.addProperty("radius", Expression.class, factory.createLiteralExpression(50)); list.addProperty("circle color", Expression.class, factory.createLiteralExpression("#000066")); list.addProperty("bar height", Expression.class, factory.createLiteralExpression(150)); list.addProperty("bar color", Expression.class, factory.createLiteralExpression("#000000")); list.addProperty("bar uncertainty", Expression.class, factory.createLiteralExpression(50)); list.addProperty("bar uncertainty width", Expression.class, factory.createLiteralExpression(5)); list.addProperty("bar uncertainty color", Expression.class, factory.createLiteralExpression("#999999")); list.addProperty("pointer length", Expression.class, factory.createLiteralExpression(100)); list.addProperty("pointer color", Expression.class, factory.createLiteralExpression("#FF0000")); list.addProperty("pointer direction", Expression.class, factory.createLiteralExpression(21)); list.addProperty("wedge width", Expression.class, factory.createLiteralExpression(25)); list.addProperty("wedge color", Expression.class, factory.createLiteralExpression("#9999FF")); }
if (list.hasProperty(nextName)) { list.setPropertyValue(nextName, props.get(nextName)); } else { Expression e = (Expression) list.getPropertyValue("radius"); if (e != null){ radius = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("circle color"); if (e != null){ circleColor = Color.decode((String) e.evaluate(feature)); e = (Expression) list.getPropertyValue("bar height"); if (e != null){ barHeight = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("bar color"); if (e != null){ barColor = Color.decode((String) e.evaluate(feature)); e = (Expression) list.getPropertyValue("bar uncertainty"); if (e != null){ barUncertainty = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("bar uncertainty width"); if (e != null){ barUncWidth = ((Number) e.evaluate(feature)).intValue(); e = (Expression) list.getPropertyValue("bar uncertainty color");
public void setPropertyValue(String name, double value){ setPropertyValue(name, new Double(value)); }
public Class getPropertyType(String name){ int index = names.indexOf(name); if (index != -1){ return getPropertyType(index); } else { throw new RuntimeException("Tried to get the class of a non-existent property: " + name); } }
/** Creates a new instance of CustomGlyphRenderer */ public CustomGlyphRenderer() { FilterFactory2 factory = (FilterFactory2) org.geotools.factory.CommonFactoryFinder .getFilterFactory(null); list.addProperty("radius", Expression.class, factory.literal(50)); list.addProperty("circle color", Expression.class, factory.literal("#000066")); list.addProperty("bar height", Expression.class, factory.literal(150)); list.addProperty("bar color", Expression.class, factory.literal("#000000")); list.addProperty("bar uncertainty", Expression.class, factory.literal(50)); list.addProperty("bar uncertainty width", Expression.class, factory.literal(5)); list.addProperty("bar uncertainty color", Expression.class, factory.literal("#999999")); list.addProperty("pointer length", Expression.class, factory.literal(100)); list.addProperty("pointer color", Expression.class, factory.literal("#FF0000")); list.addProperty("pointer direction", Expression.class, factory.literal(21)); list.addProperty("wedge width", Expression.class, factory.literal(25)); list.addProperty("wedge color", Expression.class, factory.literal("#9999FF")); }
public void setPropertyValue(String name, int value){ setPropertyValue(name, new Integer(value)); }