Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## nextapp.echo2.webcontainer.propertyrender
Class AlignmentRender

    java.lang.Object
      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(Alignment alignment, 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, Alignment alignment)` Renders an `Alignment` property to the given element.
`static void` | `renderToElement(org.w3c.dom.Element element, Alignment alignment, Component component)` Renders an `Alignment` property to the given element.
`static void` | `renderToStyle(CssStyle cssStyle, Alignment alignment)` Renders an `Alignment` property to the given CSS style.
`static void` | `renderToStyle(CssStyle cssStyle, Alignment alignment, 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(Alignment alignment,
                                            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,
                                       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,
                                       Alignment alignment,
                                       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(CssStyle cssStyle,
                                     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(CssStyle cssStyle,
                                     Alignment alignment,
                                     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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD