Echo.Sync
TriCellTable
Class Hierarchy:

Renders a table with two or three cells, suitable for laying out buttons, labels, and similar components.

Constructor Summary
Public Echo.Sync.TriCellTable()
Creates a new TriCellTable

Class Field Summary
Public INVERTED
Orientation flag indicating inverted (trailing-leading or bottom-top) orientation.
Public VERTICAL
Orientation flag indicating vertical (top-bottom or bottom-top) orientation.
Public LEADING_TRAILING
Orientation value indicating horizontal orientation, leading first, trailing second.
Public TRAILING_LEADING
Orientation value indicating horizontal orientation, trailing first, leading second.
Public TOP_BOTTOM
Orientation value indicating vertical orientation, top first, bottom second.
Public BOTTOM_TOP
Orientation value indicating vertical orientation, bottom first, top second.

Class Method Summary
Internal _createTablePrototype()
Creates a prototype DOM element hierarchy for a TriCellTable, which may be cloned for purposes of performance enhancement.
Public getInvertedOrientation()
Returns the inverted orientation value which should be used for a component (the opposite of that which would be returned by getOrientation().
Public getOrientation()
Determines the orientation value which should be used to a component.

Instance Method Summary
Internal _addColumn()
Appends a TD element to a TR element, if TD element is not null.
Internal _addRow()
If the TD element is not null, creates a TR row element and appends the TD element to it; then appends the TR element to the table body.
Internal _addSpacer()
Adds a spacer DIV to the specified parent element.
Internal _configure2()
Configures a two-celled TriCellTable.
Internal _configure3()
Configures a two-celled TriCellTable.

Constructor Detail
Echo.Sync.TriCellTable()
Creates a new TriCellTable
Parameters:
orientation0_1 (Number) - the orientation of element 0 with respect to element 1, one of the following values:
  • LEADING_TRAILING (element 0 is leading element 1)
  • TRAILING_LEADING (element 1 is leading element 0)
  • TOP_BOTTOM (element 0 is above element 1)
  • BOTTOM_TOP (element 1 is above element 0)
margin0_1 (Number) - the margin size between element 0 and element 1
orientation01_2 (Number) - (omitted for two-cell tables) the orientation of Elements 0 and 1 with respect to Element 2, one of the following values:
  • LEADING_TRAILING (elements 0 and 1 are leading element 2)
  • TRAILING_LEADING (element 2 is trailing elements 0 and 1)
  • TOP_BOTTOM (elements 0 and 1 are above element 2)
  • BOTTOM_TOP (element 2 is above elements 0 and 1)
margin01_2 (Number) - (omitted for two-cell tables) the margin size between the combination of elements 0 and 1 and element 2

Class Method Detail
_createTablePrototype
Creates a prototype DOM element hierarchy for a TriCellTable, which may be cloned for purposes of performance enhancement.
Returns:
(Element) the prototype DOM element hierarchy

getInvertedOrientation
Returns the inverted orientation value which should be used for a component (the opposite of that which would be returned by getOrientation(). The rendered layout direction of the component will be factored when determining horizontal orientations.
Parameters:
component (Echo.Component) - the component
propertyName (String) - the alignment property name
defaultValue (#Alignment) - default alignment value to use if component does not have specified property
Returns:
(Number) the (inverted) orientation

getOrientation
Determines the orientation value which should be used to a component. The rendered layout direction of the component will be factored when determining horizontal orientations.
Parameters:
component (Echo.Component) - the component
propertyName (String) - the alignment property name
defaultValue (#Alignment) - default alignment value to use if component does not have specified property
Returns:
(Number) the orientation

Instance Method Detail
_addColumn
Appends a TD element to a TR element, if TD element is not null.
Parameters:
tr (Element) - the table row (TR) element
td (Element) - the table cell (TD) element

_addRow
If the TD element is not null, creates a TR row element and appends the TD element to it; then appends the TR element to the table body.
Parameters:
td (Element) - the table cell element

_addSpacer
Adds a spacer DIV to the specified parent element.
Parameters:
parentElement (Element) - the parent element to which the spacer DIV should be added
size (Number) - the pixel size of the spacer
vertical (Boolean) - boolean flag indicating the orientation of the spacer, true for vertical spacers, false for horizontal

_configure2
Configures a two-celled TriCellTable.
Parameters:
orientation0_1 (Number) - the orientation of element 0 with respect to element 1
margin0_1 (Number) - the margin size between element 0 and element 1

_configure3
Configures a two-celled TriCellTable.
Parameters:
orientation0_1 (Number) - the orientation of element 0 with respect to element 1
margin0_1 (Number) - the margin size between element 0 and element 1
orientation01_2 (Number) - the orientation of Elements 0 and 1 with respect to Element 2
margin01_2 (Number) - the margin size between the combination of elements 0 and 1 and element 2