NextApp Echo2
v2.1.1

nextapp.echo2.webcontainer.propertyrender
Class AlignmentRender

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

public class AlignmentRender
extends java.lang.Object

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


Method Summary
static int getRenderedHorizontal(nextapp.echo2.app.Alignment alignment, nextapp.echo2.app.Component component)
          Returns the horizontal property of an Alignment object, with Alignment.LEADING and Alignment.TRAILING automatically translated based on the layout direction of the provided Component.
static void renderToElement(org.w3c.dom.Element element, nextapp.echo2.app.Alignment alignment)
          Renders an Alignment property to the given element.
static void renderToElement(org.w3c.dom.Element element, nextapp.echo2.app.Alignment alignment, nextapp.echo2.app.Component component)
          Renders an Alignment property to the given element.
static void renderToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle, nextapp.echo2.app.Alignment alignment)
          Renders an Alignment property to the given CSS style.
static void renderToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle, nextapp.echo2.app.Alignment alignment, nextapp.echo2.app.Component component)
          Renders an Alignment 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

getRenderedHorizontal

public static int getRenderedHorizontal(nextapp.echo2.app.Alignment alignment,
                                        nextapp.echo2.app.Component component)
Returns the horizontal property of an Alignment object, with Alignment.LEADING and Alignment.TRAILING automatically translated based on the layout direction of the provided Component. If the provided component is null, a left-to-right layout direction will be assumed.

Parameters:
alignment - the Alignment to analyze
component - the Component to analyze
Returns:
the horizontal alignment constant

renderToElement

public static void renderToElement(org.w3c.dom.Element element,
                                   nextapp.echo2.app.Alignment alignment)
Renders an Alignment property to the given element. The 'align' and 'valign' attributes will be set if they can be derived from the provided Alignment. Null property values are ignored.

Parameters:
element - the target Element
alignment - the property value

renderToElement

public static void renderToElement(org.w3c.dom.Element element,
                                   nextapp.echo2.app.Alignment alignment,
                                   nextapp.echo2.app.Component component)
Renders an Alignment property to the given element. The 'align' and 'valign' attributes will be set if they can be derived from the provided Alignment. Null property values are ignored.

Parameters:
element - the target Element
alignment - the property value
component - The Component for which the style is being rendered (necessary for property translation of leading/trailing alignment settings).

renderToStyle

public static void renderToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle,
                                 nextapp.echo2.app.Alignment alignment)
Renders an Alignment property to the given CSS style. The 'text-align' and 'vertical-align' properties will be set if they can be derived from the provided Alignment. Null property values are ignored.

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

renderToStyle

public static void renderToStyle(nextapp.echo2.webrender.output.CssStyle cssStyle,
                                 nextapp.echo2.app.Alignment alignment,
                                 nextapp.echo2.app.Component component)
Renders an Alignment property to the given CSS style. The 'text-align' and 'vertical-align' properties will be set if they can be derived from the provided Alignment. Null property values are ignored.

Parameters:
cssStyle - the target CssStyle
component - The Component for which the style is being rendered (necessary for property translation of leading/trailing alignment settings).
alignment - the property value

NextApp Echo2
v2.1.1