org.geotools.styling
Class FontImpl

java.lang.Object
  extended by org.geotools.styling.FontImpl
All Implemented Interfaces:
java.lang.Cloneable, org.opengis.style.Font

public class FontImpl
extends java.lang.Object
implements Font, org.opengis.util.Cloneable

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

Version:
$Id: FontImpl.java 33898 2009-09-13 15:39:05Z jive $
Author:
Ian Turton, CCG

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.geotools.styling.Font
Font.Style, Font.Weight
 
Field Summary
 
Fields inherited from interface org.geotools.styling.Font
DEFAULT_FONTSIZE
 
Constructor Summary
protected FontImpl()
          Creates a new instance of DefaultFont
 
Method Summary
 java.lang.Object accept(org.opengis.style.StyleVisitor visitor, java.lang.Object data)
           
 java.lang.Object clone()
          Creates a clone of the font.
 boolean equals(java.lang.Object oth)
          Compares this font with another for equality.
 java.util.List<org.opengis.filter.expression.Expression> getFamily()
          SVG font-family parameters in preferred order.
 org.opengis.filter.expression.Expression getFontFamily()
          Deprecated. 
 org.opengis.filter.expression.Expression getFontSize()
          Deprecated. 
 org.opengis.filter.expression.Expression getFontStyle()
          Deprecated. 
 org.opengis.filter.expression.Expression getFontWeight()
          Deprecated. 
 org.opengis.filter.expression.Expression getSize()
          Font size in pixels with a default of 10 pixels.
 org.opengis.filter.expression.Expression getStyle()
          The "font-style" SVG parameter should be "normal", "italic", or "oblique".
 org.opengis.filter.expression.Expression getWeight()
          The "font-weight" SVG parameter should be "normal" or "bold".
 int hashCode()
          Generates the hashcode for the font.
 void setFontFamily(org.opengis.filter.expression.Expression fontFamily)
          Deprecated. 
 void setFontSize(org.opengis.filter.expression.Expression fontSize)
          Deprecated. 
 void setFontStyle(org.opengis.filter.expression.Expression fontStyle)
          Deprecated. 
 void setFontWeight(org.opengis.filter.expression.Expression fontWeight)
          Deprecated. 
 void setSize(org.opengis.filter.expression.Expression size)
           
 void setStyle(org.opengis.filter.expression.Expression style)
           
 void setWeight(org.opengis.filter.expression.Expression weight)
           
 
Methods inherited from class java.lang.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 org.opengis.filter.expression.Expression getFontFamily()
Deprecated. 

Getter for property fontFamily.

Returns:
Value of property fontFamily.

getFamily

public java.util.List<org.opengis.filter.expression.Expression> getFamily()
Description copied from interface: Font
SVG font-family parameters in preferred order.

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

setFontFamily

@Deprecated
public void setFontFamily(org.opengis.filter.expression.Expression fontFamily)
Deprecated. 

Setter for property fontFamily.

Parameters:
fontFamily - New value of property fontFamily.

getFontSize

@Deprecated
public org.opengis.filter.expression.Expression getFontSize()
Deprecated. 

Getter for property fontSize.

Returns:
Value of property fontSize.

getSize

public org.opengis.filter.expression.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 org.opengis.style.Font
Returns:
font size

setSize

public void setSize(org.opengis.filter.expression.Expression size)
Parameters:
size - the font size in pixels

setFontSize

@Deprecated
public void setFontSize(org.opengis.filter.expression.Expression fontSize)
Deprecated. 

Setter for property fontSize.

Parameters:
fontSize - New value of property fontSize.

getFontStyle

@Deprecated
public org.opengis.filter.expression.Expression getFontStyle()
Deprecated. 

Getter for property fontStyle.

Returns:
Value of property fontStyle.

getStyle

public org.opengis.filter.expression.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 org.opengis.style.Font
Returns:
Expression or null

setStyle

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

setFontStyle

@Deprecated
public void setFontStyle(org.opengis.filter.expression.Expression fontStyle)
Deprecated. 

Setter for property fontStyle.

Parameters:
fontStyle - New value of property fontStyle.

getFontWeight

@Deprecated
public org.opengis.filter.expression.Expression getFontWeight()
Deprecated. 

Getter for property fontWeight.

Returns:
Value of property fontWeight.

getWeight

public org.opengis.filter.expression.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 org.opengis.style.Font
Returns:
font-weight SVG parameter

setWeight

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

setFontWeight

@Deprecated
public void setFontWeight(org.opengis.filter.expression.Expression fontWeight)
Deprecated. 

Setter for property fontWeight.

Parameters:
fontWeight - New value of property fontWeight.

clone

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

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

hashCode

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

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

equals

public boolean equals(java.lang.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 java.lang.Object
Parameters:
oth - DOCUMENT ME!
Returns:
True if this and oth are equal.

accept

public java.lang.Object accept(org.opengis.style.StyleVisitor visitor,
                               java.lang.Object data)
Specified by:
accept in interface org.opengis.style.Font


Copyright © 1996-2010 Geotools. All Rights Reserved.