Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.graphics.sld
Class LinePlacement

    java.lang.Object
      org.deegree.graphics.sld.LinePlacement

All Implemented Interfaces:
  Marshallable

    public class LinePlacement

extends Object
implements Marshallable

Incarnation of an sld:LinePlacement-element.

Contains some deegree-specific extensions:

- PerpendicularOffset: may be used as defined by the OGC, but it can also be set to one of the special values 'center', 'above', 'below', 'auto'
- Gap: defines the distance between two captions on the line string
- LineWidth: provides the thickness of the styled line (needed as information for the correct positioning of labels above and below the line string)

Version:
  $Revision: 18195 $ $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
  Markus Schneider

Field Summary
`static int` | `TYPE_ABOVE` Defining the above placement
`static int` | `TYPE_ABSOLUTE` Defining the absolute placement
`static int` | `TYPE_AUTO` Defining the auto placement
`static int` | `TYPE_BELOW` Defining the below placement
`static int` | `TYPE_CENTER` Defining the center placement

Constructor Summary
`LinePlacement(ParameterValueType perpendicularOffset, ParameterValueType lineWidth, ParameterValueType gap)`

Method Summary
`String` | `exportAsXML()` exports the content of the Font as XML formated String
`ParameterValueType` | `getGap()` returns the gap as a ParameterValueType
`int` | `getGap(Feature feature)` Defines the distance between two captions on the line string.
`ParameterValueType` | `getLineWidth()` returns the line width as a ParameterValueType
`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).
`ParameterValueType` | `getPerpendicularOffset()` returns the perpendicular offset as a ParameterValueType
`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`).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TYPE_ABSOLUTE

    public static final int TYPE_ABSOLUTE

  Defining the absolute placement

  See Also:
    Constant Field Values

### TYPE_ABOVE

    public static final int TYPE_ABOVE

  Defining the above placement

  See Also:
    Constant Field Values

### TYPE_BELOW

    public static final int TYPE_BELOW

  Defining the below placement

  See Also:
    Constant Field Values

### TYPE_CENTER

    public static final int TYPE_CENTER

  Defining the center placement

  See Also:
    Constant Field Values

### TYPE_AUTO

    public static final int TYPE_AUTO

  Defining the auto placement

  See Also:
    Constant Field Values

Constructor Detail

### LinePlacement

    public LinePlacement(ParameterValueType perpendicularOffset,
                         ParameterValueType lineWidth,
                         ParameterValueType gap)

Parameters:
  `perpendicularOffset` -
  `lineWidth` -
  `gap` -

Method Detail

### getGap

    public ParameterValueType getGap()

  returns the gap as a ParameterValueType

  Returns:
    the gap

### getLineWidth

    public ParameterValueType getLineWidth()

  returns the line width as a ParameterValueType

  Returns:
    the line width

### getPerpendicularOffset

    public ParameterValueType getPerpendicularOffset()

  returns the perpendicular offset as a ParameterValueType

  Returns:
    the perpendicular offset

### 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:
    the placement type
  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:
    the thickness of the styled line (3 as a default)
  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:
    the distance between two captions (6 as a default)
  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

### exportAsXML

    public String exportAsXML()

  exports the content of the Font as XML formated String

  Specified by:
    `exportAsXML` in interface `Marshallable`
  Returns:
    xml representation of the Font

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org