Package org.geotools.styling
Class LinePlacementImpl
Object
LinePlacementImpl
- All Implemented Interfaces:
Cloneable
,LabelPlacement
,LinePlacement
,Cloneable
Default implementation of LinePlacement.
- Author:
- Ian Turton, CCG, Johann Sorel (Geomatys)
-
Constructor Summary
ConstructorsConstructorDescriptionLinePlacementImpl
(FilterFactory factory) LinePlacementImpl
(FilterFactory factory, boolean aligned, boolean repeated, boolean generalized, Expression gap, Expression initialGap) LinePlacementImpl
(LinePlacement placement) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(StyleVisitor visitor) accept
(TraversingStyleVisitor visitor, Object data) calls the visit method of a StyleVisitorclone()
Creates and returns a copy of this object.boolean
getGap()
Gap gives the distance between two graphics.InitialGap specifies how far away the first graphic will be drawn relative to the start of the rendering lineGetter for property perpendicularOffset.int
hashCode()
boolean
Labels can either be aligned to the line geometry if IsAligned is "true" (the default) or are drawn horizontally.boolean
GeneralizeLine allows the actual geometry, be it a linestring or polygon to be generalized for label placement.boolean
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.void
setAligned
(boolean aligned) void
setGap
(Expression gap) void
setGeneralized
(boolean generalized) void
setInitialGap
(Expression initialGap) void
setPerpendicularOffset
(Expression perpendicularOffset) Setter for property perpendicularOffset.void
setRepeated
(boolean repeated)
-
Constructor Details
-
LinePlacementImpl
public LinePlacementImpl() -
LinePlacementImpl
-
LinePlacementImpl
-
LinePlacementImpl
public LinePlacementImpl(FilterFactory factory, boolean aligned, boolean repeated, boolean generalized, Expression gap, Expression initialGap)
-
-
Method Details
-
getPerpendicularOffset
Getter for property perpendicularOffset.- Specified by:
getPerpendicularOffset
in interfaceLinePlacement
- Returns:
- Value of property perpendicularOffset.
-
setPerpendicularOffset
Setter for property perpendicularOffset.- Specified by:
setPerpendicularOffset
in interfaceLinePlacement
- Parameters:
perpendicularOffset
- New value of property perpendicularOffset.
-
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 interfaceLinePlacement
- Returns:
- Expression
-
getGap
Description copied from interface:LinePlacement
Gap gives the distance between two graphics.- Specified by:
getGap
in interfaceLinePlacement
- 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 interfaceLinePlacement
- 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 interfaceLinePlacement
- 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 interfaceLinePlacement
- Returns:
- boolean
-
accept
Description copied from interface:LinePlacement
calls the visit method of a StyleVisitor- Specified by:
accept
in interfaceLabelPlacement
- Specified by:
accept
in interfaceLinePlacement
- Parameters:
visitor
- the style visitor
-
accept
- Specified by:
accept
in interfaceLabelPlacement
-
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. -
equals
-
hashCode
public int hashCode() -
setRepeated
public void setRepeated(boolean repeated) - Specified by:
setRepeated
in interfaceLinePlacement
-
setGeneralized
public void setGeneralized(boolean generalized) - Specified by:
setGeneralized
in interfaceLinePlacement
-
setAligned
public void setAligned(boolean aligned) - Specified by:
setAligned
in interfaceLinePlacement
-
setGap
- Specified by:
setGap
in interfaceLinePlacement
-
setInitialGap
- Specified by:
setInitialGap
in interfaceLinePlacement
-