Package org.geotools.styling
Class TextSymbolizerImpl
Object
AbstractSymbolizer
TextSymbolizerImpl
- All Implemented Interfaces:
Cloneable,Symbolizer,TextSymbolizer,Cloneable
Provides a Java representation of an SLD TextSymbolizer that defines how text symbols should be rendered.
- Author:
- Ian Turton, CCG, Johann Sorel (Geomatys)
-
Nested Class Summary
Nested classes/interfaces inherited from interface TextSymbolizer
TextSymbolizer.DisplacementMode, TextSymbolizer.GraphicPlacement, TextSymbolizer.PolygonAlignOptions -
Field Summary
Fields inherited from class AbstractSymbolizer
geometry, name, options, unitOfMeasureFields inherited from interface TextSymbolizer
ALLOW_OVERRUNS_KEY, AUTO_WRAP_KEY, CHAR_SPACING_KEY, CONFLICT_RESOLUTION_KEY, DEFAULT_ALLOW_OVERRUNS, DEFAULT_AUTO_WRAP, DEFAULT_CHAR_SPACING, DEFAULT_CONFLICT_RESOLUTION, DEFAULT_FOLLOW_LINE, DEFAULT_FONT_SHRINK_SIZE_MIN, DEFAULT_FORCE_LEFT_TO_RIGHT, DEFAULT_GOODNESS_OF_FIT, DEFAULT_GROUP, DEFAULT_KERNING, DEFAULT_LABEL_ALL_GROUP, DEFAULT_LABEL_REPEAT, DEFAULT_MAX_ANGLE_DELTA, DEFAULT_MAX_DISPLACEMENT, DEFAULT_MIN_GROUP_DISTANCE, DEFAULT_PARTIALS, DEFAULT_POLYGONALIGN, DEFAULT_REMOVE_OVERLAPS, DEFAULT_SPACE_AROUND, DEFAULT_STRIKETHROUGH_TEXT, DEFAULT_UNDERLINE_TEXT, DEFAULT_WORD_SPACING, DISPLACEMENT_MODE_KEY, FOLLOW_LINE_KEY, FONT_SHRINK_SIZE_MIN, FORCE_LEFT_TO_RIGHT_KEY, GOODNESS_OF_FIT_KEY, GRAPHIC_MARGIN_KEY, GRAPHIC_PLACEMENT_KEY, GRAPHIC_RESIZE_KEY, GROUP_KEY, KERNING_KEY, LABEL_ALL_GROUP_KEY, LABEL_REPEAT_KEY, MAX_ANGLE_DELTA_KEY, MAX_DISPLACEMENT_KEY, MIN_GROUP_DISTANCE_KEY, PARTIALS_KEY, POLYGONALIGN_KEY, REMOVE_OVERLAPS_KEY, SPACE_AROUND_KEY, STRIKETHROUGH_TEXT_KEY, UNDERLINE_TEXT_KEY, WORD_SPACING_KEY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedTextSymbolizerImpl(FilterFactory factory) Creates a new instance of DefaultTextSymbolizerprotectedTextSymbolizerImpl(FilterFactory factory, Description desc, String name, Unit<Length> uom) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(StyleVisitor visitor) accept(TraversingStyleVisitor visitor, Object data) Accept a StyleVisitor to perform an operation on this symbolizer.voidSetter for property font.clone()Creates a deep copy clone.booleanfonts()Direct access to device independent Fonts used to render the label.Description is used by text oriented renders such as KML and RSS to specify a feature's descriptiongetFill()Returns the fill to be used to fill the text when rendered.getFont()Returns the Font to apply on the text.The nonstandard-SLD graphic element supports putting little graphical-bits onto labels.getHalo()A halo fills an extended area outside the glyphs of a rendered text label to make the label easier to read over a background.getLabel()Returns the label expression.A pointPlacement specifies how a text element should be rendered relative to its geometric point.Other text can be used to allow open ended extensions on text oriented output formatsPriority -- null = use the default labeling priority Expression = an expression that evaluates to a number (ie.Abstract is used by text oriented renderers such as KML and RSS to specify an abstract (RSS) or a snippet (KML)inthashCode()voidsetFeatureDescription(Expression description) voidSetter for property fill.voidSet initial font used to render label.voidsetGraphic(Graphic graphic) The nonstandard-SLD graphic element supports putting little graphical-bits onto labels.voidSetter for property halo.voidsetLabel(Expression label) Setter for property label.voidsetLabelPlacement(LabelPlacement labelPlacement) Setter for property labelPlacement.voidsetOtherText(OtherText otherText) voidsetPriority(Expression priority) Priority -- null = use the default labeling priority Expression = an expression that evaluates to a number (ie.voidsetSnippet(Expression abxtract) toString()Methods inherited from class AbstractSymbolizer
getDescription, getGeometry, getGeometryPropertyName, getName, getOptions, getUnitOfMeasure, hasOption, setDescription, setGeometry, setGeometryPropertyName, setName, setUnitOfMeasureMethods inherited from interface Symbolizer
getDescription, getGeometry, getGeometryPropertyName, getName, getUnitOfMeasure, hasOption, setDescription, setGeometry, setGeometryPropertyName, setName, setUnitOfMeasureMethods inherited from interface TextSymbolizer
getOptions
-
Constructor Details
-
TextSymbolizerImpl
protected TextSymbolizerImpl() -
TextSymbolizerImpl
Creates a new instance of DefaultTextSymbolizer -
TextSymbolizerImpl
protected TextSymbolizerImpl(FilterFactory factory, Description desc, String name, Unit<Length> uom)
-
-
Method Details
-
getFill
Returns the fill to be used to fill the text when rendered.- Specified by:
getFillin interfaceTextSymbolizer- Returns:
- The fill to be used.
-
setFill
Setter for property fill.- Specified by:
setFillin interfaceTextSymbolizer- Parameters:
fill- New value of property fill.
-
fonts
Description copied from interface:TextSymbolizerDirect access to device independent Fonts used to render the label. Fonts are used in order of priority given.- Specified by:
fontsin interfaceTextSymbolizer- Returns:
- device independent Font used to render the label.
-
getFont
Description copied from interface:TextSymbolizerReturns the Font to apply on the text.- Specified by:
getFontin interfaceTextSymbolizer- Returns:
- Font
-
setFont
Description copied from interface:TextSymbolizerSet initial font used to render label. This will replace the initial entry in theTextSymbolizer.fonts()list.- Specified by:
setFontin interfaceTextSymbolizer
-
addFont
Setter for property font.- Parameters:
font- New value of property font.
-
getHalo
A halo fills an extended area outside the glyphs of a rendered text label to make the label easier to read over a background.- Specified by:
getHaloin interfaceTextSymbolizer
-
setHalo
Setter for property halo.- Specified by:
setHaloin interfaceTextSymbolizer- Parameters:
halo- New value of property halo.
-
getLabel
Returns the label expression.- Specified by:
getLabelin interfaceTextSymbolizer- Returns:
- Label expression.
-
setLabel
Setter for property label.- Specified by:
setLabelin interfaceTextSymbolizer- Parameters:
label- New value of property label.
-
getLabelPlacement
A pointPlacement specifies how a text element should be rendered relative to its geometric point.- Specified by:
getLabelPlacementin interfaceTextSymbolizer- Returns:
- Value of property labelPlacement.
-
setLabelPlacement
Setter for property labelPlacement.- Specified by:
setLabelPlacementin interfaceTextSymbolizer- Parameters:
labelPlacement- New value of property labelPlacement.
-
accept
Accept a StyleVisitor to perform an operation on this symbolizer.- Specified by:
acceptin interfaceSymbolizer- Specified by:
acceptin interfaceTextSymbolizer- Parameters:
visitor- The StyleVisitor to accept.- Returns:
- value produced
-
accept
- Specified by:
acceptin interfaceSymbolizer
-
clone
Creates a deep copy clone. TODO: Need to complete the deep copy, currently only shallow copy. -
setPriority
Description copied from interface:TextSymbolizerPriority -- null = use the default labeling priority Expression = an expression that evaluates to a number (ie. Integer, Long, Double...) Larger = more likely to be rendered- Specified by:
setPriorityin interfaceTextSymbolizer
-
getPriority
Description copied from interface:TextSymbolizerPriority -- null = use the default labeling priority Expression = an expression that evaluates to a number (ie. Integer, Long, Double...) Larger = more likely to be rendered- Specified by:
getPriorityin interfaceTextSymbolizer
-
getGraphic
Description copied from interface:TextSymbolizerThe nonstandard-SLD graphic element supports putting little graphical-bits onto labels. Useful for things like interstate road shields or labeled logos- Specified by:
getGraphicin interfaceTextSymbolizer- Returns:
- - the Graphic object to be rendered under the label text
-
setGraphic
Description copied from interface:TextSymbolizerThe nonstandard-SLD graphic element supports putting little graphical-bits onto labels. Useful for things like interstate road shields or labeled logos- Specified by:
setGraphicin interfaceTextSymbolizer- Parameters:
graphic- - the Graphic object which will be rendered under the label text
-
toString
-
getSnippet
Description copied from interface:TextSymbolizerAbstract is used by text oriented renderers such as KML and RSS to specify an abstract (RSS) or a snippet (KML)- Specified by:
getSnippetin interfaceTextSymbolizer
-
setSnippet
- Specified by:
setSnippetin interfaceTextSymbolizer
-
getFeatureDescription
Description copied from interface:TextSymbolizerDescription is used by text oriented renders such as KML and RSS to specify a feature's description- Specified by:
getFeatureDescriptionin interfaceTextSymbolizer
-
setFeatureDescription
- Specified by:
setFeatureDescriptionin interfaceTextSymbolizer
-
getOtherText
Description copied from interface:TextSymbolizerOther text can be used to allow open ended extensions on text oriented output formats- Specified by:
getOtherTextin interfaceTextSymbolizer
-
setOtherText
- Specified by:
setOtherTextin interfaceTextSymbolizer
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractSymbolizer
-
equals
- Overrides:
equalsin classAbstractSymbolizer
-