org.deegree.graphics.sld
Interface LinePlacement

All Known Implementing Classes:
LinePlacement_Impl

public interface LinePlacement

Incarnation of an sld:LinePlacement-element.

Contains some deegree-specific extensions:

Version:
$Revision: 1.6 $ $Date: 2004/05/10 08:40:58 $
Author:
Markus Schneider

Field Summary
static int TYPE_ABOVE
           
static int TYPE_ABSOLUTE
           
static int TYPE_AUTO
           
static int TYPE_BELOW
           
static int TYPE_CENTER
           
 
Method Summary
 int getGap(Feature feature)
          Defines the distance between two captions on the line string.
 double getLineWidth(Feature feature)
          Provides the thickness of the styled line (needed as information for the correct positioning of labels above and below the line string).
 double getPerpendicularOffset(Feature feature)
          The PerpendicularOffset element of a LinePlacement gives the perpendicular distance away from a line to draw a label.
 int getPlacementType(Feature feature)
          Returns the placement type (one of the constants defined in LinePlacement).
 void setGap(int gap)
          Defines the distance between two captions on the line string.
 void setLineWidth(double lineWidth)
          Provides the thickness of the styled line (needed as information for the correct positioning of labels above and below the line string).
 void setPerpendicularOffset(double perpendicularOffset)
           
 void setPlacementType(int placementType)
          Sets the placement type (one of the constants defined in LinePlacement).
 

Field Detail

TYPE_ABSOLUTE

public static final int TYPE_ABSOLUTE
See Also:
Constant Field Values

TYPE_ABOVE

public static final int TYPE_ABOVE
See Also:
Constant Field Values

TYPE_BELOW

public static final int TYPE_BELOW
See Also:
Constant Field Values

TYPE_CENTER

public static final int TYPE_CENTER
See Also:
Constant Field Values

TYPE_AUTO

public static final int TYPE_AUTO
See Also:
Constant Field Values
Method Detail

getPerpendicularOffset

public double getPerpendicularOffset(Feature feature)
                              throws FilterEvaluationException
The PerpendicularOffset element of a LinePlacement gives the perpendicular distance away from a line to draw a label. The distance is in pixels and is positive to the left-hand side of the line string. Negative numbers mean right. The default offset is 0.

deegree-specific extension: if the element has one of the values: 'center', 'above', 'below', 'auto', the return value is invalid

Parameters:
feature - specifies the Feature to be used for evaluation of the underlying 'sld:ParameterValueType'
Returns:
the offset (only valid if type is TYPE_ABSOLUTE)
Throws:
FilterEvaluationException - if the evaluation fails

setPerpendicularOffset

public void setPerpendicularOffset(double perpendicularOffset)
Parameters:
perpendicularOffset -
See Also:


getPlacementType

public int getPlacementType(Feature feature)
                     throws FilterEvaluationException
Returns the placement type (one of the constants defined in LinePlacement).

Parameters:
feature -
Returns:
Throws:
FilterEvaluationException

setPlacementType

public void setPlacementType(int placementType)
Sets the placement type (one of the constants defined in LinePlacement).

Parameters:
placementType -

getLineWidth

public double getLineWidth(Feature feature)
                    throws FilterEvaluationException
Provides the thickness of the styled line (needed as information for the correct positioning of labels above and below the line string).

Parameters:
feature -
Returns:
Throws:
FilterEvaluationException

setLineWidth

public void setLineWidth(double lineWidth)
Provides the thickness of the styled line (needed as information for the correct positioning of labels above and below the line string).

Parameters:
lineWidth - the lineWidth to be set

getGap

public int getGap(Feature feature)
           throws FilterEvaluationException
Defines the distance between two captions on the line string. One unit is the width of the label caption.

Parameters:
feature -
Returns:
Throws:
FilterEvaluationException

setGap

public void setGap(int gap)
Defines the distance between two captions on the line string. One unit is the width of the label caption.

Parameters:
gap - the gap to be set