Package repast.simphony.gis.styleEditor
Class RuleCreator
- java.lang.Object
-
- repast.simphony.gis.styleEditor.RuleCreator
-
public class RuleCreator extends Object
Utility class for creating Styles from rules and rule editing.- Author:
- Nick Collier, Eric Tatara
-
-
Constructor Summary
Constructors Constructor Description RuleCreator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.geotools.styling.Style
createStyle(String attributeName, List<org.geotools.styling.Rule> rules)
Creates a Style from the specified list of Rules.org.geotools.styling.Rule
createValueRule(org.opengis.feature.simple.SimpleFeature feature, String attributeName, SymbolizerFactory factory)
Creates a rule that matches on the specified attribute and and the specified features attribute value.static Color
getColor(org.geotools.styling.Rule rule)
Gets the color of the symbolizer in the specified rule.static void
setColor(org.geotools.styling.Rule rule, Color color)
Sets the color of the symbolizer in the specified rule.
-
-
-
Method Detail
-
createStyle
public org.geotools.styling.Style createStyle(String attributeName, List<org.geotools.styling.Rule> rules)
Creates a Style from the specified list of Rules.- Parameters:
rules
- the rules to create the style from- Returns:
- the created style
-
createValueRule
public org.geotools.styling.Rule createValueRule(org.opengis.feature.simple.SimpleFeature feature, String attributeName, SymbolizerFactory factory)
Creates a rule that matches on the specified attribute and and the specified features attribute value. The Symoblizer will use a clone of the specified mark and the specified color.- Parameters:
feature
- the feature whose attribute value will be used in the rule.attributeName
- the name of the attributefactory
- the factory to create the symbolizer with- Returns:
- the created rule.
-
getColor
public static Color getColor(org.geotools.styling.Rule rule)
Gets the color of the symbolizer in the specified rule.- Parameters:
rule
- the rule whose color we want to get- Returns:
- the color of the symbolizer in the specified rule.
-
setColor
public static void setColor(org.geotools.styling.Rule rule, Color color)
Sets the color of the symbolizer in the specified rule.- Parameters:
rule
- the rule whose color we want to set
-
-