Class LinePlacementImpl

Object
LinePlacementImpl
All Implemented Interfaces:
Cloneable, LabelPlacement, LinePlacement, Cloneable

public class LinePlacementImpl extends Object implements LinePlacement, Cloneable
Default implementation of LinePlacement.
Author:
Ian Turton, CCG, Johann Sorel (Geomatys)
  • Constructor Details

    • LinePlacementImpl

      public LinePlacementImpl()
    • LinePlacementImpl

      public LinePlacementImpl(LinePlacement placement)
    • LinePlacementImpl

      public LinePlacementImpl(FilterFactory factory)
    • LinePlacementImpl

      public LinePlacementImpl(FilterFactory factory, boolean aligned, boolean repeated, boolean generalized, Expression gap, Expression initialGap)
  • Method Details

    • getPerpendicularOffset

      public Expression getPerpendicularOffset()
      Getter for property perpendicularOffset.
      Specified by:
      getPerpendicularOffset in interface LinePlacement
      Returns:
      Value of property perpendicularOffset.
    • setPerpendicularOffset

      public void setPerpendicularOffset(Expression perpendicularOffset)
      Setter for property perpendicularOffset.
      Specified by:
      setPerpendicularOffset in interface LinePlacement
      Parameters:
      perpendicularOffset - New value of property perpendicularOffset.
    • getInitialGap

      public Expression getInitialGap()
      Description copied from interface: LinePlacement
      InitialGap specifies how far away the first graphic will be drawn relative to the start of the rendering line
      Specified by:
      getInitialGap in interface LinePlacement
      Returns:
      Expression
    • getGap

      public Expression getGap()
      Description copied from interface: LinePlacement
      Gap gives the distance between two graphics.
      Specified by:
      getGap in interface LinePlacement
      Returns:
      Expression
    • isRepeated

      public boolean isRepeated()
      Description copied from interface: LinePlacement
      If IsRepeated is "true", the label will be repeatedly drawn along the line with InitialGap and Gap defining the spaces at the beginning and between labels.
      Specified by:
      isRepeated in interface LinePlacement
      Returns:
      boolean
    • isAligned

      public boolean isAligned()
      Description copied from interface: LinePlacement
      Labels can either be aligned to the line geometry if IsAligned is "true" (the default) or are drawn horizontally.
      Specified by:
      isAligned in interface LinePlacement
      Returns:
      boolean
    • isGeneralizeLine

      public boolean isGeneralizeLine()
      Description copied from interface: LinePlacement
      GeneralizeLine allows the actual geometry, be it a linestring or polygon to be generalized for label placement. This is e.g. useful for labelling polygons inside their interior when there is need for the label to resemble the shape of the polygon.
      Specified by:
      isGeneralizeLine in interface LinePlacement
      Returns:
      boolean
    • accept

      public Object accept(TraversingStyleVisitor visitor, Object data)
      Description copied from interface: LinePlacement
      calls the visit method of a StyleVisitor
      Specified by:
      accept in interface LabelPlacement
      Specified by:
      accept in interface LinePlacement
      Parameters:
      visitor - the style visitor
    • accept

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

      public Object clone()
      Description copied from interface: Cloneable
      Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object.
      Specified by:
      clone in interface Cloneable
      Overrides:
      clone in class Object
      Returns:
      A copy of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setRepeated

      public void setRepeated(boolean repeated)
      Specified by:
      setRepeated in interface LinePlacement
    • setGeneralized

      public void setGeneralized(boolean generalized)
      Specified by:
      setGeneralized in interface LinePlacement
    • setAligned

      public void setAligned(boolean aligned)
      Specified by:
      setAligned in interface LinePlacement
    • setGap

      public void setGap(Expression gap)
      Specified by:
      setGap in interface LinePlacement
    • setInitialGap

      public void setInitialGap(Expression initialGap)
      Specified by:
      setInitialGap in interface LinePlacement