Echo.Sync
Alignment
Class Hierarchy:

Provides tools for rendering alignment properties.

Class Method Summary
Public getRenderedHorizontal()
Returns the render-able horizontal component of an alignment property.
Public getHorizontal()
Returns the horizontal component of an alignment property.
Public getVertical()
Returns the vertical component of an alignment property.
Public render()
Renders an alignment property to an element.

Class Method Detail
getRenderedHorizontal
Returns the render-able horizontal component of an alignment property. This method translates leading/trailing horizontal values to left/right based on the specified layout direction provider. If a provider is no given, leading defaults to left and trailing to right.
Parameters:
alignment (#Alignment) - the alignment
Returns:
(String) the rendered horizontal component, i.e., "left", "center", "right", or null

getHorizontal
Returns the horizontal component of an alignment property.
Parameters:
the (#Alignment) - alignment
Returns:
(String) the horizontal component, i.e., "left", "center", "right", "leading", "trailing", or null

getVertical
Returns the vertical component of an alignment property.
Parameters:
the (#Alignment) - alignment
Returns:
(String) the vertical component, i.e., "top", "middle", "bottom", or null

render
Renders an alignment property to an element.
Parameters:
alignment (#Alignment) - the alignment
the (Element) - target element
renderToElement (Boolean) - flag indicating whether the alignment state should be rendered to the element using attributes (true) or CSS (false)
layoutDirectionProvider - an (optional) object providing a getRenderLayoutDirection() method to determine if the element has a layout direction of left-to-right or right-to-left