|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 java.awt.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(java.util.Map<java.lang.String,CssParameter> cssParams)
Constructs a new Font. |
Method Summary | |
---|---|
java.lang.String |
exportAsXML()
exports the content of the Font as XML formated String |
java.awt.Color |
getColor(Feature feature)
Returns the (evaluated) value of the font's CssParameter 'font-color'. |
java.util.Map<java.lang.String,CssParameter> |
getCssParameters()
returns the Map of the CssParameters describing a Font |
java.lang.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(java.awt.Color color)
Sets the value of the font's CssParameter 'font-color'. |
void |
setFamily(java.lang.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 java.awt.Color COLOR_DEFAULT
Constructor Detail |
---|
public Font(java.util.Map<java.lang.String,CssParameter> cssParams)
cssParams
- keys are Strings (see above), values are
CssParametersMethod Detail |
---|
public java.util.Map<java.lang.String,CssParameter> getCssParameters()
public java.lang.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(java.lang.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 java.awt.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(java.awt.Color color)
color
- the font-color to be setpublic java.lang.String exportAsXML()
exportAsXML
in interface Marshallable
|
deegree 2.5 (2011/06/29 09:44 build-8-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