Echo.Sync
Border
Class Hierarchy:

Provides tools for rendering border properties.

Class Field Summary
Internal _PARSER_PX
Regular expression to validate/parse a CSS border expression, e.
Internal _PARSER
Regular expression to validate/parse a pixel-based CSS border expression, e.
Internal _TEST_EXTENT_PX
Regular expression to test whether an extent string is a properly formatted integer pixel value.

Class Method Summary
Public compose()
Creates a border property from a size, style, and color.
Public isMultisided()
Determines if a border is multisided.
Public parse()
Parses a border into size, style, and color components.
Public render()
Renders a border to a DOM element.
Public renderClear()
Renders a border to a DOM element, clearing an existing border if the border value is null.
Public getPixelSize()
Determines the size of a particular side of the border in pixels.

Class Method Detail
compose
Creates a border property from a size, style, and color.
Parameters:
size (#Extent) - the border size
the (String) - border style
the (#Color) - border color
Returns:
(#Border) a border object

isMultisided
Determines if a border is multisided.
Parameters:
border (#Border) - the border to analyze
Returns:
(Boolean) true if the border is multisided

parse
Parses a border into size, style, and color components.
Parameters:
border (#Border) - the border to parse
Returns:
an object containing size, style, and color properties of the border

render
Renders a border to a DOM element.
Parameters:
border (#Border) - the border to render
the (Element) - target DOM element
styleAttribute (String) - the CSS style attribute name (defaults to "border" if omitted)

renderClear
Renders a border to a DOM element, clearing an existing border if the border value is null.
Parameters:
border (#Border) - the border to render
the (Element) - target DOM element
styleAttribute (String) - the CSS style attribute name (defaults to "border" if omitted)

getPixelSize
Determines the size of a particular side of the border in pixels.
Parameters:
border (#Border) - the border
sideName (String) - , the border side name, "left", "right", "bottom", or "top" (defaults to "top" if omitted)
Returns:
({Number}) the border size in pixels