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 Font

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

All Implemented Interfaces:
  Marshallable

    public class Font

extends Object
implements Marshallable

The Font element identifies a font of a certain family, style, weight, size and color.

The supported CSS-Parameter names are:

- font-family
- font-style
- font-weight
- font-size
- font-color

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

  Field Summary
  `static Color` | `COLOR_DEFAULT` Default color is 127,127,127 (white)
  `static int` | `SIZE_DEFAULT` Default character size initialized with 10.
  `static int` | `STYLE_ITALIC` java.awt.Font.ITALIC
  `static int` | `STYLE_NORMAL` java.awt.Font.PLAIN
  `static int` | `STYLE_OBLIQUE` java.awt.Font.ITALIC
  `static int` | `WEIGHT_BOLD` java.awt.Font.BOLD
  `static int` | `WEIGHT_NORMAL` java.awt.Font.PLAIN

  Constructor Summary
  `Font(Map<String,CssParameter> cssParams)` Constructs a new `Font`.``

  Method Summary
  `String` | `exportAsXML()` exports the content of the Font as XML formated String
  `Color` | `getColor(Feature feature)` Returns the (evaluated) value of the font's CssParameter 'font-color'.
  `Map<String,CssParameter>` | `getCssParameters()` returns the Map of the CssParameters describing a Font
  `String` | `getFamily(Feature feature)` Returns the (evaluated) value of the font's CssParameter 'font-family'.
  `int` | `getSize(Feature feature)` Returns the (evaluated) value of the font's CssParameter 'font-size'.
  `int` | `getStyle(Feature feature)` Returns the (evaluated) value of the font's CssParameter 'font-style'.
  `int` | `getWeight(Feature feature)` Returns the (evaluated) value of the font's CssParameter 'font-weight' as a `ParameterValueType`.
  `void` | `setColor(Color color)` Sets the value of the font's CssParameter 'font-color'.
  `void` | `setFamily(String family)` Sets the value of the font's CssParameter 'font-family'.
  `void` | `setSize(int size)` Returns the (evaluated) value of the font's CssParameter 'font-size'.
  `void` | `setStyle(int style)` Sets the value of the font's CssParameter 'font-style'.
  `void` | `setWeight(int weight)` Sets the value of the font's CssParameter 'font-weight'.

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

  Field Detail

  ### STYLE_NORMAL

      public static final int STYLE_NORMAL

    java.awt.Font.PLAIN

    See Also:
      Constant Field Values

  ### STYLE_ITALIC

      public static final int STYLE_ITALIC

    java.awt.Font.ITALIC

    See Also:
      Constant Field Values

  ### STYLE_OBLIQUE

      public static final int STYLE_OBLIQUE

    java.awt.Font.ITALIC

    See Also:
      Constant Field Values

  ### WEIGHT_NORMAL

      public static final int WEIGHT_NORMAL

    java.awt.Font.PLAIN

    See Also:
      Constant Field Values

  ### WEIGHT_BOLD

      public static final int WEIGHT_BOLD

    java.awt.Font.BOLD

    See Also:
      Constant Field Values

  ### SIZE_DEFAULT

      public static final int SIZE_DEFAULT

    Default character size initialized with 10.

    See Also:
      Constant Field Values

  ### COLOR_DEFAULT

      public static final Color COLOR_DEFAULT

    Default color is 127,127,127 (white)

  Constructor Detail

  ### Font

      public Font(Map<String,CssParameter> cssParams)

    Constructs a new `Font`.

    Parameters:
      `cssParams` - keys are `Strings`(see above), values are `CssParameters```
    ``

  Method Detail

  ### getCssParameters

      public Map<String,CssParameter> getCssParameters()

    returns the Map of the CssParameters describing a Font

    Returns:
      the Map of the CssParameters describing a Font

  ### getFamily

      public String getFamily(Feature feature)
                       throws FilterEvaluationException

    Returns the (evaluated) value of the font's CssParameter 'font-family'.

    Parameters:
      `feature` - specifies the `Feature` to be used for evaluation of the underlying 'sld:ParameterValueType'
    Returns:
      the (evaluated) `String` value of the parameter
    Throws:
      `FilterEvaluationException` - if the evaluation fails

  ### setFamily

      public void setFamily(String family)

    Sets the value of the font's CssParameter 'font-family'.

    Parameters:
      `family` - font family to be set

  ### getStyle

      public int getStyle(Feature feature)
                   throws FilterEvaluationException

    Returns the (evaluated) value of the font's CssParameter 'font-style'.

    Parameters:
      `feature` - specifies the `Feature` to be used for evaluation of the underlying 'sld:ParameterValueType'
    Returns:
      the (evaluated) value of the parameter
    Throws:
      `FilterEvaluationException` - if the evaluation fails or the specified style is not one of the following: 'normal', 'italic' and 'oblique'

  ### setStyle

      public void setStyle(int style)

    Sets the value of the font's CssParameter 'font-style'.

    Parameters:
      `style` - font-style to be set

  ### getWeight

      public int getWeight(Feature feature)
                    throws FilterEvaluationException

    Returns the (evaluated) value of the font's CssParameter 'font-weight' as a `ParameterValueType`.

    Parameters:
      `feature` - specifies the `Feature` to be used for evaluation of the underlying 'sld:ParameterValueType'
    Returns:
      the (evaluated) value of the parameter
    Throws:
      `FilterEvaluationException` - if the evaluation fails or the specified weight is not one of the following: 'normal' and 'bold'

  ### setWeight

      public void setWeight(int weight)

    Sets the value of the font's CssParameter 'font-weight'.

    Parameters:
      `weight` - font-weight to be set

  ### getSize

      public int getSize(Feature feature)
                  throws FilterEvaluationException

    Returns the (evaluated) value of the font's CssParameter 'font-size'.

    Parameters:
      `feature` - specifies the `Feature` to be used for evaluation of the underlying 'sld:ParameterValueType'
    Returns:
      the (evaluated) value of the parameter
    Throws:
      `FilterEvaluationException` - if the evaluation fails or the value does not denote a valid number or the number is not greater or equal zero

  ### setSize

      public void setSize(int size)

    Returns the (evaluated) value of the font's CssParameter 'font-size'.

    Parameters:
      `size` - font-size to be set

  ### getColor

      public Color getColor(Feature feature)
                     throws FilterEvaluationException

    Returns the (evaluated) value of the font's CssParameter 'font-color'.

    Parameters:
      `feature` - specifies the `Feature` to be used for evaluation of the underlying 'sld:ParameterValueType'
    Returns:
      the (evaluated) value of the parameter
    Throws:
      `FilterEvaluationException` - if the evaluation fails

  ### setColor

      public void setColor(Color color)

    Sets the value of the font's CssParameter 'font-color'.

    Parameters:
      `color` - the font-color 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