nextapp.echo2.webcontainer.propertyrender
Class FontRender

java.lang.Object
  extended by nextapp.echo2.webcontainer.propertyrender.FontRender

public class FontRender
extends java.lang.Object

Utility class for rendering nextapp.echo2.app.Font properties to CSS.


Method Summary
static java.lang.String renderFontFamilyCssAttributeValue(Font.Typeface typeface)
          Renders a 'font-family' CSS attribute value based on the specified Font.Typeface.
static java.lang.String renderFontStyleCssAttributeValue(Font font)
          Renders a 'font-style' CSS attribute value for the specified Font.
static java.lang.String renderFontWeightCssAttributeValue(Font font)
          Renders a 'font-weight' CSS attribute value for the specified Font.
static java.lang.String renderTextDecorationCssAttributeValue(Font font)
          Renders a 'text-decoration' CSS attribute value based on the specified Font
static void renderToStyle(CssStyle cssStyle, Component component)
          Renders the Font properties of the provided Component to a CSS style.
static void renderToStyle(CssStyle cssStyle, Font font)
          Renders a Font property to the given CSS style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

renderFontFamilyCssAttributeValue

public static java.lang.String renderFontFamilyCssAttributeValue(Font.Typeface typeface)
Renders a 'font-family' CSS attribute value based on the specified Font.Typeface.

Parameters:
typeface - the typeface
Returns:
the CSS attribute value

renderFontStyleCssAttributeValue

public static java.lang.String renderFontStyleCssAttributeValue(Font font)
Renders a 'font-style' CSS attribute value for the specified Font.

Parameters:
font - the font
Returns:
the CSS attribute value

renderFontWeightCssAttributeValue

public static java.lang.String renderFontWeightCssAttributeValue(Font font)
Renders a 'font-weight' CSS attribute value for the specified Font.

Parameters:
font - the font
Returns:
the CSS attribute value

renderTextDecorationCssAttributeValue

public static java.lang.String renderTextDecorationCssAttributeValue(Font font)
Renders a 'text-decoration' CSS attribute value based on the specified Font

Parameters:
font - the font
Returns:
the CSS attribute value

renderToStyle

public static void renderToStyle(CssStyle cssStyle,
                                 Component component)
Renders the Font properties of the provided Component to a CSS style.

Parameters:
cssStyle - the target CssStyle
component - the component

renderToStyle

public static void renderToStyle(CssStyle cssStyle,
                                 Font font)
Renders a Font property to the given CSS style. Null property values are ignored.

Parameters:
cssStyle - the target CssStyle
font - the property value