Class TextSymbolizerImpl

Object
AbstractSymbolizer
TextSymbolizerImpl
All Implemented Interfaces:
Cloneable, Symbolizer, TextSymbolizer, Cloneable

public class TextSymbolizerImpl extends AbstractSymbolizer implements 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)
  • Constructor Details

    • TextSymbolizerImpl

      protected TextSymbolizerImpl()
    • TextSymbolizerImpl

      protected TextSymbolizerImpl(FilterFactory factory)
      Creates a new instance of DefaultTextSymbolizer
    • TextSymbolizerImpl

      protected TextSymbolizerImpl(FilterFactory factory, Description desc, String name, Unit<Length> uom)
  • Method Details

    • getFill

      public Fill getFill()
      Returns the fill to be used to fill the text when rendered.
      Specified by:
      getFill in interface TextSymbolizer
      Returns:
      The fill to be used.
    • setFill

      public void setFill(Fill fill)
      Setter for property fill.
      Specified by:
      setFill in interface TextSymbolizer
      Parameters:
      fill - New value of property fill.
    • fonts

      public List<Font> fonts()
      Description copied from interface: TextSymbolizer
      Direct access to device independent Fonts used to render the label. Fonts are used in order of priority given.
      Specified by:
      fonts in interface TextSymbolizer
      Returns:
      device independent Font used to render the label.
    • getFont

      public Font getFont()
      Description copied from interface: TextSymbolizer
      Returns the Font to apply on the text.
      Specified by:
      getFont in interface TextSymbolizer
      Returns:
      Font
    • setFont

      public void setFont(Font font)
      Description copied from interface: TextSymbolizer
      Set initial font used to render label. This will replace the initial entry in the TextSymbolizer.fonts() list.
      Specified by:
      setFont in interface TextSymbolizer
    • addFont

      public void addFont(Font font)
      Setter for property font.
      Parameters:
      font - New value of property font.
    • getHalo

      public Halo 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:
      getHalo in interface TextSymbolizer
    • setHalo

      public void setHalo(Halo halo)
      Setter for property halo.
      Specified by:
      setHalo in interface TextSymbolizer
      Parameters:
      halo - New value of property halo.
    • getLabel

      public Expression getLabel()
      Returns the label expression.
      Specified by:
      getLabel in interface TextSymbolizer
      Returns:
      Label expression.
    • setLabel

      public void setLabel(Expression label)
      Setter for property label.
      Specified by:
      setLabel in interface TextSymbolizer
      Parameters:
      label - New value of property label.
    • getLabelPlacement

      public LabelPlacement getLabelPlacement()
      A pointPlacement specifies how a text element should be rendered relative to its geometric point.
      Specified by:
      getLabelPlacement in interface TextSymbolizer
      Returns:
      Value of property labelPlacement.
    • setLabelPlacement

      public void setLabelPlacement(LabelPlacement labelPlacement)
      Setter for property labelPlacement.
      Specified by:
      setLabelPlacement in interface TextSymbolizer
      Parameters:
      labelPlacement - New value of property labelPlacement.
    • accept

      public Object accept(TraversingStyleVisitor visitor, Object data)
      Accept a StyleVisitor to perform an operation on this symbolizer.
      Specified by:
      accept in interface Symbolizer
      Specified by:
      accept in interface TextSymbolizer
      Parameters:
      visitor - The StyleVisitor to accept.
      Returns:
      value produced
    • accept

      public void accept(StyleVisitor visitor)
      Specified by:
      accept in interface Symbolizer
    • clone

      public Object clone()
      Creates a deep copy clone. TODO: Need to complete the deep copy, currently only shallow copy.
      Specified by:
      clone in interface Cloneable
      Overrides:
      clone in class Object
      Returns:
      The deep copy clone.
      See Also:
    • setPriority

      public void setPriority(Expression priority)
      Description copied from interface: TextSymbolizer
      Priority -- 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:
      setPriority in interface TextSymbolizer
    • getPriority

      public Expression getPriority()
      Description copied from interface: TextSymbolizer
      Priority -- 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:
      getPriority in interface TextSymbolizer
    • getGraphic

      public Graphic getGraphic()
      Description copied from interface: TextSymbolizer
      The nonstandard-SLD graphic element supports putting little graphical-bits onto labels. Useful for things like interstate road shields or labeled logos
      Specified by:
      getGraphic in interface TextSymbolizer
      Returns:
      - the Graphic object to be rendered under the label text
    • setGraphic

      public void setGraphic(Graphic graphic)
      Description copied from interface: TextSymbolizer
      The nonstandard-SLD graphic element supports putting little graphical-bits onto labels. Useful for things like interstate road shields or labeled logos
      Specified by:
      setGraphic in interface TextSymbolizer
      Parameters:
      graphic - - the Graphic object which will be rendered under the label text
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSnippet

      public Expression getSnippet()
      Description copied from interface: TextSymbolizer
      Abstract is used by text oriented renderers such as KML and RSS to specify an abstract (RSS) or a snippet (KML)
      Specified by:
      getSnippet in interface TextSymbolizer
    • setSnippet

      public void setSnippet(Expression abxtract)
      Specified by:
      setSnippet in interface TextSymbolizer
    • getFeatureDescription

      public Expression getFeatureDescription()
      Description copied from interface: TextSymbolizer
      Description is used by text oriented renders such as KML and RSS to specify a feature's description
      Specified by:
      getFeatureDescription in interface TextSymbolizer
    • setFeatureDescription

      public void setFeatureDescription(Expression description)
      Specified by:
      setFeatureDescription in interface TextSymbolizer
    • getOtherText

      public OtherText getOtherText()
      Description copied from interface: TextSymbolizer
      Other text can be used to allow open ended extensions on text oriented output formats
      Specified by:
      getOtherText in interface TextSymbolizer
    • setOtherText

      public void setOtherText(OtherText otherText)
      Specified by:
      setOtherText in interface TextSymbolizer
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractSymbolizer
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractSymbolizer