Modifier | Constructor and Description |
---|---|
protected |
RuleImpl()
Creates a new instance of DefaultRule
|
|
RuleImpl(Rule rule)
Copy constructor
|
protected |
RuleImpl(Symbolizer... symbolizers)
Creates a new instance of DefaultRule
|
protected |
RuleImpl(Symbolizer[] symbolizers,
Description desc,
GraphicLegend legend,
String name,
Filter filter,
boolean isElseFilter,
double maxScale,
double minScale) |
Modifier and Type | Method and Description |
---|---|
void |
accept(StyleVisitor visitor)
Used to traverse the style data structure.
|
Object |
accept(StyleVisitor visitor,
Object data)
calls the visit method of a StyleVisitor
|
Object |
clone()
Creates a deep copy clone of the rule.
|
boolean |
equals(Object oth)
Compares this Rule with another for equality.
|
DescriptionImpl |
getDescription()
Description for this rule.
|
Filter |
getFilter()
This is the filter used to select content for this rule to display
|
GraphicLegend |
getLegend()
Returns a small Graphic that could be used by the rendering engine to draw a legend window.
|
double |
getMaxScaleDenominator()
Getter for property maxScaleDenominator.
|
double |
getMinScaleDenominator()
Getter for property minScaleDenominator.
|
String |
getName()
Returns a name for this rule.
|
OnLineResource |
getOnlineResource()
It is common to have a style coming from a external xml file, this method provide a way to
get the original source if there is one.
|
Map<String,String> |
getOptions()
Map of vendor options for the Rule.
|
Symbolizer[] |
getSymbolizers()
The symbolizers contain the actual styling information for different geometry types.
|
int |
hashCode()
Generates a hashcode for the Rule.
|
boolean |
hasOption(String key)
Determines if a vendor option with the specific key has been set on this Rule.
|
boolean |
isElseFilter()
Returns true if this
Rule is to fire only if no other rules in the containing style
have fired yet. |
void |
setDescription(Description description)
Description for this rule.
|
void |
setElseFilter(boolean defaultb) |
void |
setFilter(Filter filter)
Filter used to select content for this rule to display.
|
void |
setLegend(GraphicLegend legend) |
void |
setMaxScaleDenominator(double maxScaleDenominator)
Setter for property maxScaleDenominator.
|
void |
setMinScaleDenominator(double minScaleDenominator)
Setter for property minScaleDenominator.
|
void |
setName(String name)
Sets the name of the rule.
|
void |
setOnlineResource(OnLineResource online) |
List<Symbolizer> |
symbolizers()
Symbolizers used, in order, to portray the features selected by this rule.
|
String |
toString() |
protected RuleImpl()
protected RuleImpl(Symbolizer... symbolizers)
protected RuleImpl(Symbolizer[] symbolizers, Description desc, GraphicLegend legend, String name, Filter filter, boolean isElseFilter, double maxScale, double minScale)
public RuleImpl(Rule rule)
public GraphicLegend getLegend()
Rule
A nice user interface may want to present the user with a legend that indicates how
features of a given type are being portrayed. Through its LegendGraphic
property, a
Rule
may provide a custom picture to be used in such a legend window.
public void setLegend(GraphicLegend legend)
public List<Symbolizer> symbolizers()
Rule
Please note that this list may be modified direct.
symbolizers
in interface Rule
public Symbolizer[] getSymbolizers()
Rule
public DescriptionImpl getDescription()
Rule
getDescription
in interface Rule
public void setDescription(Description description)
Rule
description
- Human readable title and abstract.public String getName()
Rule
public void setName(String name)
Rule
name
- The name of the rule. This provides a way to identify a rule.public Filter getFilter()
Rule
public void setFilter(Filter filter)
Rule
This filter is only consulted if isElseFilter is false.
public boolean isElseFilter()
Rule
Rule
is to fire only if no other rules in the containing style
have fired yet. If this is true, then the filter must be
Filter.EXCLUDES.isElseFilter
in interface Rule
public void setElseFilter(boolean defaultb)
defaultb
- if this rule should accept any features not already renderedpublic double getMaxScaleDenominator()
getMaxScaleDenominator
in interface Rule
public void setMaxScaleDenominator(double maxScaleDenominator)
maxScaleDenominator
- New value of property maxScaleDenominator.public double getMinScaleDenominator()
getMinScaleDenominator
in interface Rule
public void setMinScaleDenominator(double minScaleDenominator)
minScaleDenominator
- New value of property minScaleDenominator.public Object accept(StyleVisitor visitor, Object data)
Rule
public void accept(StyleVisitor visitor)
Rule
public Object clone()
public int hashCode()
For complex styles this can be an expensive operation since the hash code is computed using all the hashcodes of the object within the style.
public boolean equals(Object oth)
Two RuleImpls are equal if all their properties are equal.
For complex styles this can be an expensive operation since it checks all objects for equality.
public OnLineResource getOnlineResource()
Rule
getOnlineResource
in interface Rule
public void setOnlineResource(OnLineResource online)
online
- Indicates where this style is definedpublic boolean hasOption(String key)
Rule
public Map<String,String> getOptions()
Rule
Client code looking for the existence of a single option should use Rule.hasOption(String)
Copyright © 1996–2022 Geotools. All rights reserved.