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 void
accept(StyleVisitor visitor)
Object
accept(TraversingStyleVisitor visitor, Object data)
calls the visit method of a StyleVisitorObject
clone()
Creates and returns a copy of this object.boolean
equals(Object obj)
Expression
getGap()
Gap gives the distance between two graphics.Expression
getInitialGap()
InitialGap specifies how far away the first graphic will be drawn relative to the start of the rendering lineExpression
getPerpendicularOffset()
Getter for property perpendicularOffset.int
hashCode()
boolean
isAligned()
Labels can either be aligned to the line geometry if IsAligned is "true" (the default) or are drawn horizontally.boolean
isGeneralizeLine()
GeneralizeLine allows the actual geometry, be it a linestring or polygon to be generalized for label placement.boolean
isRepeated()
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 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:
getPerpendicularOffset
in interfaceLinePlacement
- Returns:
- Value of property perpendicularOffset.
-
setPerpendicularOffset
public void setPerpendicularOffset(Expression perpendicularOffset)
Setter for property perpendicularOffset.- Specified by:
setPerpendicularOffset
in interfaceLinePlacement
- 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 interfaceLinePlacement
- Returns:
- Expression
-
getGap
public 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
public Object accept(TraversingStyleVisitor visitor, Object data)
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
public void accept(StyleVisitor visitor)
- Specified by:
accept
in interfaceLabelPlacement
-
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 interfaceCloneable
- Overrides:
clone
in classObject
- Returns:
- A copy of this object.
- See Also:
Object.clone()
-
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
public void setGap(Expression gap)
- Specified by:
setGap
in interfaceLinePlacement
-
setInitialGap
public void setInitialGap(Expression initialGap)
- Specified by:
setInitialGap
in interfaceLinePlacement
-
-