Package repast.simphony.gis.styleEditor
Class RuleCreator
java.lang.Object
repast.simphony.gis.styleEditor.RuleCreator
Utility class for creating Styles from rules and rule editing.
- Author:
- Nick Collier, Eric Tatara
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.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
Sets the color of the symbolizer in the specified rule.
-
Constructor Details
-
RuleCreator
public RuleCreator()
-
-
Method Details
-
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
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
Sets the color of the symbolizer in the specified rule.- Parameters:
rule
- the rule whose color we want to set
-