Package org.geotools.styling
Class StyleImpl
- Object
-
- StyleImpl
-
- Direct Known Subclasses:
BasicLineStyle,BasicPolygonStyle,NamedStyleImpl
public class StyleImpl extends Object implements Style, Cloneable
Implementation of style.- Author:
- James Macgill, CCG
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStyleImpl()Creates a new instance of StyleImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(StyleVisitor visitor)Used to navigate Style information during portrayal.Objectaccept(TraversingStyleVisitor visitor, Object extraData)calls the visit method of a StyleVisitorvoidaddFeatureTypeStyle(FeatureTypeStyle type)Objectclone()Clones the Style.booleanequals(Object oth)Compares this Style with another.List<FeatureTypeStyle>featureTypeStyles()FeatureTypeStyles rendered in order of appearance in this list.FillgetBackground()The background Fill , if any,nullotherwiseSymbolizergetDefaultSpecification()This functionality is from an ISO specificaiton; and conflicts with the idea of an else rule presented by SLD.DescriptionImplgetDescription()Description for this style.FeatureTypeStyle[]getFeatureTypeStyles()StringgetName()Style name (machine readable, don't show to users)inthashCode()booleanisDefault()The IsDefault element identifies whether a style is the default style of a layer, for use in SLD ‘library mode’ when rendering or for storing inside of a map server.voidsetBackground(Fill background)voidsetDefault(boolean isDefault)Indicates that this is the default style.voidsetDefaultSpecification(Symbolizer defaultSymbolizer)voidsetDescription(Description description)voidsetFeatureTypeStyles(FeatureTypeStyle... styles)voidsetName(String name)StringtoString()
-
-
-
Method Detail
-
getDescription
public DescriptionImpl getDescription()
Description copied from interface:StyleDescription for this style.- Specified by:
getDescriptionin interfaceStyle- Returns:
- Human readable description for use in user interfaces
-
getFeatureTypeStyles
public FeatureTypeStyle[] getFeatureTypeStyles()
-
featureTypeStyles
public List<FeatureTypeStyle> featureTypeStyles()
Description copied from interface:StyleFeatureTypeStyles rendered in order of appearance in this list.- Specified by:
featureTypeStylesin interfaceStyle
-
getDefaultSpecification
public Symbolizer getDefaultSpecification()
Description copied from interface:StyleThis functionality is from an ISO specificaiton; and conflicts with the idea of an else rule presented by SLD.Implementations may choose to look up the first symbolizer of an elseFilter or allow this to be provided?
- Specified by:
getDefaultSpecificationin interfaceStyle- Returns:
- Symbolizer to use if no rules work out.
-
setDefaultSpecification
public void setDefaultSpecification(Symbolizer defaultSymbolizer)
- Specified by:
setDefaultSpecificationin interfaceStyle- Parameters:
defaultSymbolizer- To be used if a feature is not rendered by any of the rules
-
setFeatureTypeStyles
public void setFeatureTypeStyles(FeatureTypeStyle... styles)
-
addFeatureTypeStyle
public void addFeatureTypeStyle(FeatureTypeStyle type)
-
getName
public String getName()
Description copied from interface:StyleStyle name (machine readable, don't show to users)
-
isDefault
public boolean isDefault()
Description copied from interface:StyleThe IsDefault element identifies whether a style is the default style of a layer, for use in SLD ‘library mode’ when rendering or for storing inside of a map server. IsDefault uses “1” or “true” for true and “0” or “false” for false. The default value is “0”.
-
setDefault
public void setDefault(boolean isDefault)
Description copied from interface:StyleIndicates that this is the default style.Assume this is kept for GeoServer enabling a WMS to track which style is considered the default. May consider providing a clientProperties mechanism similar to Swing JComponent allowing applications to mark up the Style content for custom uses.
- Specified by:
setDefaultin interfaceStyle
-
accept
public void accept(StyleVisitor visitor)
Description copied from interface:StyleUsed to navigate Style information during portrayal.
-
clone
public Object clone()
Clones the Style. Creates deep copy clone of the style.
-
equals
public boolean equals(Object oth)
Compares this Style with another.Two StyleImpl are equal if they have the same properties and the same list of FeatureTypeStyles.
-
accept
public Object accept(TraversingStyleVisitor visitor, Object extraData)
Description copied from interface:Stylecalls the visit method of a StyleVisitor
-
setDescription
public void setDescription(Description description)
-
getBackground
public Fill getBackground()
Description copied from interface:StyleThe background Fill , if any,nullotherwise- Specified by:
getBackgroundin interfaceStyle
-
setBackground
public void setBackground(Fill background)
- Specified by:
setBackgroundin interfaceStyle
-
-