Caplin Trader 5.1.0

Class: module:ct-element/styler/StaleStyler

module:ct-element/styler/StaleStyler()

new module:ct-element/styler/StaleStyler()

Applies CSS styles to reflect the status of the object.

Stylers are instantiated by the RendererFactory, which reads RendererType specifications from XML and instantiates the stylers by name.

Extends:

Extends

Methods

style(value, attributes, control) → {string}

Styles the supplied control with a stale CSS style, according to the supplied renderer attributes.

Parameters:
Name Type Description
value string

The field value, which may be partially formatted, depending on when the Styler is applied.

attributes Map

Renderer attributes, containing all needed state information needed.

Properties
Name Type Description
recordStatus string

The model field representing the record status (object status).

staleClass string

The CSS class to apply when the instrument is stale.

control module:ct-element/Control

The control to style

Overrides:
Returns:

The field value

Type
string

toString() → {string}

Returns a human-readable string representation of the styler, which is useful for debugging.

Overrides:
  • module:ct-element/Styler#toString
Returns:

The string representation

Type
string