Package org.geotools.styling
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 Summary
Constructors Constructor Description LinePlacementImpl()LinePlacementImpl(FilterFactory factory)LinePlacementImpl(FilterFactory factory, boolean aligned, boolean repeated, boolean generalized, Expression gap, Expression initialGap)LinePlacementImpl(LinePlacement placement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(StyleVisitor visitor)Objectaccept(TraversingStyleVisitor visitor, Object data)calls the visit method of a StyleVisitorObjectclone()Creates and returns a copy of this object.booleanequals(Object obj)ExpressiongetGap()Gap gives the distance between two graphics.ExpressiongetInitialGap()InitialGap specifies how far away the first graphic will be drawn relative to the start of the rendering lineExpressiongetPerpendicularOffset()Getter for property perpendicularOffset.inthashCode()booleanisAligned()Labels can either be aligned to the line geometry if IsAligned is "true" (the default) or are drawn horizontally.booleanisGeneralizeLine()GeneralizeLine allows the actual geometry, be it a linestring or polygon to be generalized for label placement.booleanisRepeated()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.voidsetAligned(boolean aligned)voidsetGap(Expression gap)voidsetGeneralized(boolean generalized)voidsetInitialGap(Expression initialGap)voidsetPerpendicularOffset(Expression perpendicularOffset)Setter for property perpendicularOffset.voidsetRepeated(boolean repeated)
-
-
-
Constructor Detail
-
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 Detail
-
getPerpendicularOffset
public Expression getPerpendicularOffset()
Getter for property perpendicularOffset.- Specified by:
getPerpendicularOffsetin interfaceLinePlacement- Returns:
- Value of property perpendicularOffset.
-
setPerpendicularOffset
public void setPerpendicularOffset(Expression perpendicularOffset)
Setter for property perpendicularOffset.- Specified by:
setPerpendicularOffsetin interfaceLinePlacement- Parameters:
perpendicularOffset- New value of property perpendicularOffset.
-
getInitialGap
public Expression 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
public 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
public Object accept(TraversingStyleVisitor visitor, Object data)
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
public void accept(StyleVisitor visitor)
- Specified by:
acceptin interfaceLabelPlacement
-
clone
public Object 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.- Specified by:
clonein interfaceCloneable- Overrides:
clonein classObject- Returns:
- A copy of this object.
- See Also:
Object.clone()
-
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
public void setGap(Expression gap)
- Specified by:
setGapin interfaceLinePlacement
-
setInitialGap
public void setInitialGap(Expression initialGap)
- Specified by:
setInitialGapin interfaceLinePlacement
-
-