org.geotools.styling
Class LinePlacementImpl

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

public class LinePlacementImpl
extends Object
implements LinePlacement, Cloneable

Default implementation of LinePlacement.

Author:
Ian Turton, CCG, Johann Sorel (Geomatys)

Constructor Summary
LinePlacementImpl()
           
LinePlacementImpl(FilterFactory factory)
           
LinePlacementImpl(FilterFactory factory, boolean aligned, boolean repeated, boolean generalized, Expression gap, Expression initialGap)
           
LinePlacementImpl(LinePlacement placement)
           
 
Method Summary
 void accept(StyleVisitor visitor)
           
 Object accept(StyleVisitor visitor, Object data)
          calls the visit method of a StyleVisitor
 Object 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 line
 Expression getPerpendicularOffset()
          Getter for property perpendicularOffset.
 int hashCode()
           
 boolean isAligned()
          Correct method name violation from GeoAPI.
 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 setFilterFactory(FilterFactory factory)
          Deprecated. 
 void setGap(Expression gap)
           
 void setGeneralized(boolean generalized)
           
 void setInitialGap(Expression initialGap)
           
 void setPerpendicularOffset(Expression perpendicularOffset)
          Setter for property perpendicularOffset.
 void setRepeated(boolean repeated)
           
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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

setFilterFactory

@Deprecated
public void setFilterFactory(FilterFactory factory)
Deprecated. 


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.

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

isAligned

public boolean isAligned()
Description copied from interface: LinePlacement
Correct method name violation from GeoAPI.

Returns:

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(StyleVisitor 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)

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.

Overrides:
clone in class Object
Returns:
A copy of this object.
See Also:
Object.clone()

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)

setGeneralized

public void setGeneralized(boolean generalized)

setAligned

public void setAligned(boolean aligned)

setGap

public void setGap(Expression gap)

setInitialGap

public void setInitialGap(Expression initialGap)


Copyright © 1996-2014 Geotools. All Rights Reserved.