Class SymbolizerWrapper
- java.lang.Object
-
- org.hortonmachine.gears.utils.style.SymbolizerWrapper
-
- Direct Known Subclasses:
LineSymbolizerWrapper,PointSymbolizerWrapper,RasterSymbolizerWrapper,TextSymbolizerWrapper
public abstract class SymbolizerWrapper extends Object
An abstract wrapper for aSymbolizerto ease interaction with gui.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected org.geotools.styling.ExternalGraphicexternalGraphicTheExternalGraphicof theSymbolizer.protected org.geotools.styling.ExternalGraphicfillExternalGraphicFillThe fill'sExternalGraphicfill of theSymbolizer.protected org.geotools.styling.ExternalGraphicfillExternalGraphicStrokeThe fill'sExternalGraphicstroke of theSymbolizer.protected org.geotools.styling.ExternalGraphicstrokeExternalGraphicFillThe stroke'sExternalGraphicfill of theSymbolizer.protected org.geotools.styling.ExternalGraphicstrokeExternalGraphicStrokeThe stroke'sExternalGraphicstroke of theSymbolizer.protected StringxOffsetprotected StringyOffset
-
Constructor Summary
Constructors Modifier Constructor Description protectedSymbolizerWrapper(org.geotools.styling.Symbolizer symbolizer, RuleWrapper parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tadapt(Class<T> adaptee)protected StringexpressionToString(org.opengis.filter.expression.Expression expression)StringgetExternalGraphicPath()Get theExternalGraphic's path.StringgetFillExternalGraphicFillPath()Get the fill'sExternalGraphicfill path.RuleWrappergetParent()StringgetStrokeExternalGraphicStrokePath()Get the stroke'sExternalGraphicstroke path.org.geotools.styling.SymbolizergetSymbolizer()StringgetxOffset()StringgetyOffset()booleanhasExternalGraphic()Tests if theSymbolizerWrapperbases on anExternalGraphic.booleanhasFillExternalGraphicFill()Tests if the fill'sSymbolizerWrapperbases on anExternalGraphic.booleanhasStrokeExternalGraphicStroke()Tests if the stroke'sSymbolizerWrapperbases on anExternalGraphic.booleanisRasterSymbolizer()booleanisTextSymbolizer()voidsetExternalGraphicPath(String externalGraphicPath)Set theExternalGraphic's path.voidsetFillExternalGraphicFillPath(String externalGraphicPath, double size)Set the fill'sExternalGraphicpath.voidsetOffset(String offset)voidsetOffset(String xOffset, String yOffset)voidsetStrokeExternalGraphicStrokePath(String externalGraphicPath)Set the stroke'sExternalGraphicpath.StringtoString()
-
-
-
Field Detail
-
externalGraphic
protected org.geotools.styling.ExternalGraphic externalGraphic
TheExternalGraphicof theSymbolizer.Currently just one is supported.
-
strokeExternalGraphicStroke
protected org.geotools.styling.ExternalGraphic strokeExternalGraphicStroke
The stroke'sExternalGraphicstroke of theSymbolizer.
-
strokeExternalGraphicFill
protected org.geotools.styling.ExternalGraphic strokeExternalGraphicFill
The stroke'sExternalGraphicfill of theSymbolizer.This is not used at the moment.
-
fillExternalGraphicStroke
protected org.geotools.styling.ExternalGraphic fillExternalGraphicStroke
The fill'sExternalGraphicstroke of theSymbolizer.This is not used at the moment.
-
fillExternalGraphicFill
protected org.geotools.styling.ExternalGraphic fillExternalGraphicFill
The fill'sExternalGraphicfill of theSymbolizer.Currently just one is supported.
-
xOffset
protected String xOffset
-
yOffset
protected String yOffset
-
-
Constructor Detail
-
SymbolizerWrapper
protected SymbolizerWrapper(org.geotools.styling.Symbolizer symbolizer, RuleWrapper parent)
-
-
Method Detail
-
getParent
public RuleWrapper getParent()
-
getSymbolizer
public org.geotools.styling.Symbolizer getSymbolizer()
-
isTextSymbolizer
public boolean isTextSymbolizer()
-
isRasterSymbolizer
public boolean isRasterSymbolizer()
-
adapt
public <T> T adapt(Class<T> adaptee)
-
hasExternalGraphic
public boolean hasExternalGraphic()
- Returns:
- true if the
ExternalGraphicis != null.
-
hasStrokeExternalGraphicStroke
public boolean hasStrokeExternalGraphicStroke()
- Returns:
- true if the
ExternalGraphicis != null.
-
hasFillExternalGraphicFill
public boolean hasFillExternalGraphicFill()
- Returns:
- true if the
ExternalGraphicis != null.
-
getExternalGraphicPath
public String getExternalGraphicPath() throws MalformedURLException
Get theExternalGraphic's path.Currently one
ExternalGraphicperSymbolizeris supported.This is used for point styles.
- Returns:
- the graphic's path.
- Throws:
MalformedURLException
-
getStrokeExternalGraphicStrokePath
public String getStrokeExternalGraphicStrokePath() throws MalformedURLException
Get the stroke'sExternalGraphicstroke path.Currently one stroke
ExternalGraphicperSymbolizeris supported.This is used for lines.
- Returns:
- the graphic's path.
- Throws:
MalformedURLException
-
getFillExternalGraphicFillPath
public String getFillExternalGraphicFillPath() throws MalformedURLException
Get the fill'sExternalGraphicfill path. Currently one fillExternalGraphicperSymbolizeris supported.This is used for polygon fills.
- Returns:
- the graphic's path.
- Throws:
MalformedURLException
-
setExternalGraphicPath
public void setExternalGraphicPath(String externalGraphicPath) throws MalformedURLException
Set theExternalGraphic's path.Currently one
ExternalGraphicperSymbolizeris supported.This is used for point styles.
- Parameters:
externalGraphicPath- the path to set.- Throws:
MalformedURLException
-
setStrokeExternalGraphicStrokePath
public void setStrokeExternalGraphicStrokePath(String externalGraphicPath) throws MalformedURLException
Set the stroke'sExternalGraphicpath.Currently one
ExternalGraphicperSymbolizeris supported.This is used for lines.
- Parameters:
externalGraphicPath- the path to set.- Throws:
MalformedURLException
-
setFillExternalGraphicFillPath
public void setFillExternalGraphicFillPath(String externalGraphicPath, double size) throws MalformedURLException
Set the fill'sExternalGraphicpath.Currently one
ExternalGraphicperSymbolizeris supported.This is used for polygons.
- Parameters:
externalGraphicPath- the path to set.- Throws:
MalformedURLException
-
expressionToString
protected String expressionToString(org.opengis.filter.expression.Expression expression)
-
setOffset
public void setOffset(String offset)
-
getxOffset
public String getxOffset()
-
getyOffset
public String getyOffset()
-
-