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 TextSymbolizer

    java.lang.Object
      org.deegree.graphics.sld.AbstractSymbolizer
          org.deegree.graphics.sld.TextSymbolizer

All Implemented Interfaces:
  Marshallable, Symbolizer

    public class TextSymbolizer

extends AbstractSymbolizer
implements Marshallable

Used to render a text label, according to the parameters. A missing Geometry, Label, Font, or LabelPlacement element selects the default value or behavior for the element. The default Label, Font, and LabelPlacement are system- dependent. Multiple Font elements may be used to specify alternate fonts in order of preference in case a map server does not support the first preference. A missing Halo or Fill element means that no halo or fill will be plotted, respectively. The Fill is rendered over top of the Halo, and the Halo includes the interiors of the font glyphs.

Version:
  $Revision: 18405 $ $Date: 2009-07-09 10:31:42 +0200 (Do, 09. Jul 2009) $
Author:
  Katharina Lupp, Markus Schneider

Field Summary

Fields inherited from class org.deegree.graphics.sld.AbstractSymbolizer
`geometry, maxDenominator, minDenominator, responsibleClass`

Constructor Summary
`TextSymbolizer(Geometry geometry, ParameterValueType text, Font font, Halo halo, ParameterValueType minx, ParameterValueType miny, ParameterValueType maxx, ParameterValueType maxy)` Initializing with bounding box.
`TextSymbolizer(Geometry geometry, ParameterValueType label, Font font, LabelPlacement labelPlacement, Halo halo, Fill fill, double min, double max)` constructor initializing the class with the `TextSymbolizer`
`TextSymbolizer(Geometry geometry, String responsibleClass, ParameterValueType label, Font font, LabelPlacement labelPlacement, Halo halo, Fill fill, double min, double max)` constructor initializing the class with the `TextSymbolizer`

Method Summary
`String` | `exportAsXML()` exports the content of the TextSymbolizer as XML formated String
`ParameterValueType[]` | `getBoundingBox()`
`Fill` | `getFill()` A Fill allows area geometries to be filled.
`Font` | `getFont()` Identifies a Font of a certain family, style, and size.
`Halo` | `getHalo()` A Halo is an extension (sub-type) of a Fill and is applied to the backgrounds of font glyphs.
`ParameterValueType` | `getLabel()` returns the Label as a `ParameterValueType` to be renderd
`String` | `getLabelAsString()` returns the label as a String to be renderd
`LabelPlacement` | `getLabelPlacement()` Used to position a label relative to a point or a line string.
`void` | `setFill(Fill fill)` sets the
`void` | `setFont(Font font)` Sets a Font of a certain family, style, and size.
`void` | `setHalo(Halo halo)` sets
`void` | `setLabel(ParameterValueType label)` sets the
`void` | `setLabelPlacement(LabelPlacement labelPlacement)` sets the

Methods inherited from class org.deegree.graphics.sld.AbstractSymbolizer
`getGeometry, getMaxScaleDenominator, getMinScaleDenominator, getResponsibleClass, setGeometry, setMaxScaleDenominator, setMinScaleDenominator, setResponsibleClass`

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

Constructor Detail

### TextSymbolizer

    TextSymbolizer(Geometry geometry,
                   ParameterValueType label,
                   Font font,
                   LabelPlacement labelPlacement,
                   Halo halo,
                   Fill fill,
                   double min,
                   double max)

  constructor initializing the class with the `TextSymbolizer`

  Parameters:
    `geometry` -
    `label` -
    `font` -
    `labelPlacement` -
    `halo` -
    `fill` -
    `min` -
    `max` -

### TextSymbolizer

    TextSymbolizer(Geometry geometry,
                   String responsibleClass,
                   ParameterValueType label,
                   Font font,
                   LabelPlacement labelPlacement,
                   Halo halo,
                   Fill fill,
                   double min,
                   double max)

  constructor initializing the class with the `TextSymbolizer`

  Parameters:
    `geometry` -
    `responsibleClass` -
    `label` -
    `font` -
    `labelPlacement` -
    `halo` -
    `fill` -
    `min` -
    `max` -

### TextSymbolizer

    public TextSymbolizer(Geometry geometry,
                          ParameterValueType text,
                          Font font,
                          Halo halo,
                          ParameterValueType minx,
                          ParameterValueType miny,
                          ParameterValueType maxx,
                          ParameterValueType maxy)

  Initializing with bounding box.

  Parameters:
    `geometry` -
    `text` -
    `font` -
    `halo` -
    `minx` -
    `miny` -
    `maxx` -
    `maxy` -

Method Detail

### getBoundingBox

    public ParameterValueType[] getBoundingBox()

  Returns:
    the bounding box, or null, if not set (minx, miny, maxx, maxy)

### getLabel

    public ParameterValueType getLabel()

  returns the Label as a `ParameterValueType` to be renderd

  Returns:
    the label

### getLabelAsString

    public String getLabelAsString()

  returns the label as a String to be renderd

  Returns:
    the label or null, if the label is not set or not an expression

### setLabel

    public void setLabel(ParameterValueType label)

  sets the

  Parameters:
    `label` - the label

### getFont

    public Font getFont()

  Identifies a Font of a certain family, style, and size.

  Returns:
    the font

### setFont

    public void setFont(Font font)

  Sets a Font of a certain family, style, and size.

  Parameters:
    `font` - the font

### getLabelPlacement

    public LabelPlacement getLabelPlacement()

  Used to position a label relative to a point or a line string. For a point, you can specify the anchor point of the label and a linear displacement from the point (so that you can also plot a graphic symbol at the point). For a line-string placement, you can specify a perpendicular offset (so you can draw a stroke on the line).

  MORE PARAMETERS ARE PROBABLY NEEDED HERE.

  Returns:
    the labelPlacement

### setLabelPlacement

    public void setLabelPlacement(LabelPlacement labelPlacement)

  sets the

  Parameters:
    `labelPlacement` - the labelPlacement

### getHalo

    public Halo getHalo()

  A Halo is an extension (sub-type) of a Fill and is applied to the backgrounds of font glyphs. Either a Radius or a Block halo type can be used. The radius is computed from the outside edge of the font glyph (or inside of "holes"). The default is a Radius of 1.0 (pixels) but if no Halo is selected in a containing structure, no halo will be rendered. The default is a solid white (Color "#FFFFFF") opaque halo.

  Returns:
    the halo

### setHalo

    public void setHalo(Halo halo)

  sets

  Parameters:
    `halo` - the halo

### getFill

    public Fill getFill()

  A Fill allows area geometries to be filled. There are two types of fills: solid-color and repeated GraphicFill. In general, if a Fill element is omitted in its containing element, no fill will be rendered. The default is a solid 50%-gray (color "#808080") opaque fill.

  Returns:
    the fill

### setFill

    public void setFill(Fill fill)

  sets the

  Parameters:
    `fill` - the fill

### exportAsXML

    public String exportAsXML()

  exports the content of the TextSymbolizer as XML formated String

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

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