| 
deegree 2.6-pre (2011/11/29 00:10 build-378-unofficial) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.graphics.sld.Font
public class Font
The Font element identifies a font of a certain family, style, weight, size and color.
The supported CSS-Parameter names are:
| 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 | 
|---|
public static final int STYLE_NORMAL
public static final int STYLE_ITALIC
public static final int STYLE_OBLIQUE
public static final int WEIGHT_NORMAL
public static final int WEIGHT_BOLD
public static final int SIZE_DEFAULT
public static final Color COLOR_DEFAULT
| Constructor Detail | 
|---|
public Font(Map<String,CssParameter> cssParams)
cssParams - keys are Strings (see above), values are
                  CssParameters| Method Detail | 
|---|
public Map<String,CssParameter> getCssParameters()
public String getFamily(Feature feature) throws FilterEvaluationException
feature - specifies the Feature to be used for evaluation of the underlying
            'sld:ParameterValueType'
FilterEvaluationException - if the evaluation failspublic void setFamily(String family)
family - font family to be setpublic int getStyle(Feature feature) throws FilterEvaluationException
feature - specifies the Feature to be used for evaluation of the underlying
            'sld:ParameterValueType'
FilterEvaluationException - if the evaluation fails or the specified style is not one of the following:
             'normal', 'italic' and 'oblique'public void setStyle(int style)
style - font-style to be setpublic int getWeight(Feature feature) throws FilterEvaluationException
feature - specifies the Feature to be used for evaluation of the underlying
            'sld:ParameterValueType'
FilterEvaluationException - if the evaluation fails or the specified weight is not one of the following:
             'normal' and 'bold'public void setWeight(int weight)
weight - font-weight to be setpublic int getSize(Feature feature) throws FilterEvaluationException
feature - specifies the Feature to be used for evaluation of the underlying
            'sld:ParameterValueType'
FilterEvaluationException - if the evaluation fails or the value does not denote a valid number or the number
             is not greater or equal zeropublic void setSize(int size)
size - font-size to be setpublic Color getColor(Feature feature) throws FilterEvaluationException
feature - specifies the Feature to be used for evaluation of the underlying
            'sld:ParameterValueType'
FilterEvaluationException - if the evaluation failspublic void setColor(Color color)
color - the font-color to be setpublic String exportAsXML()
exportAsXML in interface Marshallable
  | 
deegree 2.6-pre (2011/11/29 00:10 build-378-unofficial) | |||||||||
| 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