NextApp Echo2
v2.1.1

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(nextapp.echo2.app.Font.Typeface typeface)
          Renders a 'font-family' CSS attribute value based on the specified Font.Typeface.
static java.lang.String renderFontStyleCssAttributeValue(nextapp.echo2.app.Font font)
          Renders a 'font-style' CSS attribute value for the specified Font.
static java.lang.String renderFontWeightCssAttributeValue(nextapp.echo2.app.Font font)
          Renders a 'font-weight' CSS attribute value for the specified Font.
static java.lang.String renderTextDecorationCssAttributeValue(nextapp.echo2.app.Font font)
          Renders a 'text-decoration' CSS attribute value based on the specified Font
static void renderToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle, nextapp.echo2.app.Component component)
          Renders the Font properties of the provided Component to a CSS style.
static void renderToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle, nextapp.echo2.app.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(nextapp.echo2.app.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(nextapp.echo2.app.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(nextapp.echo2.app.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(nextapp.echo2.app.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(nextapp.echo2.webrender.output.CssStyle cssStyle,
                                 nextapp.echo2.app.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(nextapp.echo2.webrender.output.CssStyle cssStyle,
                                 nextapp.echo2.app.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

NextApp Echo2
v2.1.1