org.geotools.styling
Class FontImpl

Object
  extended by FontImpl
All Implemented Interfaces:
Cloneable, Font

public class FontImpl
extends Object
implements Font, Cloneable

Provides a Java representation of the Font element of an SLD.

Author:
Ian Turton, CCG
Module:

Nested Class Summary
 
Nested classes/interfaces inherited from interface Font
Font.Style, Font.Weight
 
Field Summary
 
Fields inherited from interface Font
DEFAULT_FONTSIZE
 
Constructor Summary
protected FontImpl()
          Creates a new instance of DefaultFont
 
Method Summary
 Object clone()
          Creates a clone of the font.
static Font createDefault(FilterFactory filterFactory)
          Utility method to capture the default font in one place.
 boolean equals(Object oth)
          Compares this font with another for equality.
 List<Expression> getFamily()
          SVG font-family parameters in preferred order.
 Expression getFontFamily()
          Getter for property fontFamily.
 Expression getFontSize()
          Getter for property fontSize.
 Expression getFontStyle()
          Getter for property fontStyle.
 Expression getFontWeight()
          Getter for property fontWeight.
 Expression getSize()
          Font size.
 Expression getStyle()
          The "font-style" SVG parameter should be "normal", "italic", or "oblique".
 Expression getWeight()
          The "font-weight" SVG parameter should be "normal" or "bold".
 int hashCode()
          Generates the hashcode for the font.
 void setFontFamily(Expression fontFamily)
          Setter for property fontFamily.
 void setFontSize(Expression fontSize)
          Setter for property fontSize.
 void setFontStyle(Expression fontStyle)
          Setter for property fontStyle.
 void setFontWeight(Expression fontWeight)
          Setter for property fontWeight.
 void setSize(Expression size)
           
 void setStyle(Expression style)
           
 void setWeight(Expression weight)
           
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontImpl

protected FontImpl()
Creates a new instance of DefaultFont

Method Detail

getFontFamily

public Expression getFontFamily()
Getter for property fontFamily.

Specified by:
getFontFamily in interface Font
Returns:
Value of property fontFamily.

getFamily

public List<Expression> getFamily()
Description copied from interface: Font
SVG font-family parameters in preferred order.

Specified by:
getFamily in interface Font
Returns:
live list of font-family parameters in preferred order

setFontFamily

public void setFontFamily(Expression fontFamily)
Setter for property fontFamily.

Specified by:
setFontFamily in interface Font
Parameters:
fontFamily - New value of property fontFamily.

getFontSize

public Expression getFontSize()
Getter for property fontSize.

Specified by:
getFontSize in interface Font
Returns:
Value of property fontSize.

getSize

public Expression getSize()
Description copied from interface: Font
Font size.

Specified by:
getSize in interface Font
Returns:
font size

setSize

public void setSize(Expression size)
Specified by:
setSize in interface Font
Parameters:
size - the font size

setFontSize

public void setFontSize(Expression fontSize)
Setter for property fontSize.

Specified by:
setFontSize in interface Font
Parameters:
fontSize - New value of property fontSize.

getFontStyle

public Expression getFontStyle()
Getter for property fontStyle.

Specified by:
getFontStyle in interface Font
Returns:
Value of property fontStyle.

getStyle

public Expression getStyle()
Description copied from interface: Font
The "font-style" SVG parameter should be "normal", "italic", or "oblique".

Specified by:
getStyle in interface Font
Returns:
Expression or null

setStyle

public void setStyle(Expression style)
Specified by:
setStyle in interface Font
Parameters:
style - The "font-style" SVG parameter (one of "normal", "italic", or "oblique"

setFontStyle

public void setFontStyle(Expression fontStyle)
Setter for property fontStyle.

Specified by:
setFontStyle in interface Font
Parameters:
fontStyle - New value of property fontStyle.

getFontWeight

public Expression getFontWeight()
Getter for property fontWeight.

Specified by:
getFontWeight in interface Font
Returns:
Value of property fontWeight.

getWeight

public Expression getWeight()
Description copied from interface: Font
The "font-weight" SVG parameter should be "normal" or "bold".

Specified by:
getWeight in interface Font
Returns:
font-weight SVG parameter

setWeight

public void setWeight(Expression weight)
Specified by:
setWeight in interface Font
Parameters:
weight - The "font-weight" SVG parameter (one of "normal", "bold")

setFontWeight

public void setFontWeight(Expression fontWeight)
Setter for property fontWeight.

Specified by:
setFontWeight in interface Font
Parameters:
fontWeight - New value of property fontWeight.

clone

public Object clone()
Creates a clone of the font.

Overrides:
clone in class Object
See Also:
Cloneable.clone()

hashCode

public int hashCode()
Generates the hashcode for the font.

Overrides:
hashCode in class Object
Returns:
the hash code.

equals

public boolean equals(Object oth)
Compares this font with another for equality. Two fonts are equal if their family, style, weight and size are equal.

Overrides:
equals in class Object
Parameters:
oth - DOCUMENT ME!
Returns:
True if this and oth are equal.

createDefault

public static Font createDefault(FilterFactory filterFactory)
Utility method to capture the default font in one place.

Returns:


Copyright © 1996-2009 Geotools. All Rights Reserved.