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 TypeMethodDescriptionvoidaccept(StyleVisitor visitor) accept(TraversingStyleVisitor visitor, Object data) calls the visit method of a StyleVisitorclone()Creates and returns a copy of this object.booleangetGap()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.inthashCode()booleanLabels can either be aligned to the line geometry if IsAligned is "true" (the default) or are drawn horizontally.booleanGeneralizeLine allows the actual geometry, be it a linestring or polygon to be generalized for label placement.booleanIf 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.voidsetAligned(boolean aligned) voidsetGap(Expression gap) voidsetGeneralized(boolean generalized) voidsetInitialGap(Expression initialGap) voidsetPerpendicularOffset(Expression perpendicularOffset) Setter for property perpendicularOffset.voidsetRepeated(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:
getPerpendicularOffsetin interfaceLinePlacement- Returns:
- Value of property perpendicularOffset.
-
setPerpendicularOffset
Setter for property perpendicularOffset.- Specified by:
setPerpendicularOffsetin interfaceLinePlacement- Parameters:
perpendicularOffset- New value of property perpendicularOffset.
-
getInitialGap
Description copied from interface:LinePlacementInitialGap specifies how far away the first graphic will be drawn relative to the start of the rendering line- Specified by:
getInitialGapin interfaceLinePlacement- Returns:
- Expression
-
getGap
Description copied from interface:LinePlacementGap gives the distance between two graphics.- Specified by:
getGapin interfaceLinePlacement- Returns:
- Expression
-
isRepeated
public boolean isRepeated()Description copied from interface:LinePlacementIf 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:
isRepeatedin interfaceLinePlacement- Returns:
- boolean
-
isAligned
public boolean isAligned()Description copied from interface:LinePlacementLabels can either be aligned to the line geometry if IsAligned is "true" (the default) or are drawn horizontally.- Specified by:
isAlignedin interfaceLinePlacement- Returns:
- boolean
-
isGeneralizeLine
public boolean isGeneralizeLine()Description copied from interface:LinePlacementGeneralizeLine 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:
isGeneralizeLinein interfaceLinePlacement- Returns:
- boolean
-
accept
Description copied from interface:LinePlacementcalls the visit method of a StyleVisitor- Specified by:
acceptin interfaceLabelPlacement- Specified by:
acceptin interfaceLinePlacement- Parameters:
visitor- the style visitor
-
accept
- Specified by:
acceptin interfaceLabelPlacement
-
clone
Description copied from interface:CloneableCreates 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:
setRepeatedin interfaceLinePlacement
-
setGeneralized
public void setGeneralized(boolean generalized) - Specified by:
setGeneralizedin interfaceLinePlacement
-
setAligned
public void setAligned(boolean aligned) - Specified by:
setAlignedin interfaceLinePlacement
-
setGap
- Specified by:
setGapin interfaceLinePlacement
-
setInitialGap
- Specified by:
setInitialGapin interfaceLinePlacement
-