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

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 accept(StyleVisitor visitor, Object data)
          calls the visit method of a StyleVisitor
 Object clone()
          Creates a clone of the font.
 boolean equals(Object oth)
          Compares this font with another for equality.
 List<Expression> getFamily()
          SVG font-family parameters in preferred order.
 Expression getFontFamily()
          Deprecated. 
 Expression getFontSize()
          Deprecated. 
 Expression getFontStyle()
          Deprecated. 
 Expression getFontWeight()
          Deprecated. 
 Expression getSize()
          Font size in pixels with a default of 10 pixels.
 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)
          Deprecated. 
 void setFontSize(Expression fontSize)
          Deprecated. 
 void setFontStyle(Expression fontStyle)
          Deprecated. 
 void setFontWeight(Expression fontWeight)
          Deprecated. 
 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

@Deprecated
public Expression getFontFamily()
Deprecated. 

Getter for property fontFamily.

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

@Deprecated
public void setFontFamily(Expression fontFamily)
Deprecated. 

Setter for property fontFamily.

Parameters:
fontFamily - New value of property fontFamily.

getFontSize

@Deprecated
public Expression getFontSize()
Deprecated. 

Getter for property fontSize.

Returns:
Value of property fontSize.

getSize

public Expression getSize()
Description copied from interface: Font
Font size in pixels with a default of 10 pixels.

Please note this is specified in pixels so you may need to take the resolution of your output into account when providing a size.

Specified by:
getSize in interface Font
Returns:
font size

setSize

public void setSize(Expression size)
Parameters:
size - the font size in pixels

setFontSize

@Deprecated
public void setFontSize(Expression fontSize)
Deprecated. 

Setter for property fontSize.

Parameters:
fontSize - New value of property fontSize.

getFontStyle

@Deprecated
public Expression getFontStyle()
Deprecated. 

Getter for property fontStyle.

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".

If null is returned the default value should be considered "normal".

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

setStyle

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

setFontStyle

@Deprecated
public void setFontStyle(Expression fontStyle)
Deprecated. 

Setter for property fontStyle.

Parameters:
fontStyle - New value of property fontStyle.

getFontWeight

@Deprecated
public Expression getFontWeight()
Deprecated. 

Getter for property fontWeight.

Returns:
Value of property fontWeight.

getWeight

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

If null the default should be considered as "normal"

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

setWeight

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

setFontWeight

@Deprecated
public void setFontWeight(Expression fontWeight)
Deprecated. 

Setter for property fontWeight.

Parameters:
fontWeight - New value of property fontWeight.

clone

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

Overrides:
clone in class Object
Returns:
A copy of this 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.

accept

public Object accept(StyleVisitor visitor,
                     Object data)
Description copied from interface: Font
calls the visit method of a StyleVisitor

Specified by:
accept in interface Font
Parameters:
visitor - the style visitor


Copyright © 1996-2014 Geotools. All Rights Reserved.