Renderer
transforms machine readable data to a screen caplin.control.Control, and
captures user gestures which are then communicated back to one or more
caplin.element.RendererEventListeners.
This interface allows caplin.element.Handlers to interact with the Renderer
.
Attributes | Name and Description |
---|---|
|
caplin.element.Renderer()
|
Attributes | Name and Description |
---|---|
|
void
addRendererEventListener(caplin.element.RendererEventListener oRendererEventListener)
Adds a caplin.element.RendererEventListener to which the Renderer will communicates user-gestures. |
|
void
clear()
Clears the renderer value and all associated state, including the displayed value. |
|
void
clearState()
Clears the renderer state without clearing the displayed value. |
|
void
disable()
Disables the renderer control. |
|
void
enable()
Enables the renderer control. |
|
void
focus()
Moves the focus to this renderer. |
|
Map
getFieldValues()
Returns the fields relating to the currently displayed value. |
|
Variant
getFormattedValue()
Returns the formatted downstream value. |
|
String
getName()
Returns the renderer name. |
|
String
getNamespace()
Returns the renderer namespace. |
|
Variant
getParsedValue()
Returns the parsed upstream value. |
|
Variant
getUnformattedValue()
Returns the unformatted downstream value. |
|
Variant
getUnparsedValue()
Returns the unparsed upstream value. |
|
Variant
getValue()
Gets the renderer value. |
|
boolean
isEnabled()
Determines whether the control is enabled. |
|
void
raiseEvent(String sType, Map mRendererEvent)
Raises a renderer event. |
|
void
removeRendererEventListener(caplin.element.RendererEventListener oRendererEventListener)
Removes a caplin.element.RendererEventListener to which the Renderer will communicate user-gestures. |
|
void
select()
Moves the focus and highlights this renderer. |
|
void
setValue(Variant vRendererValue)
Sets the renderer value. |
|
String
toString()
Returns a human-readable string representation of the renderer, which is useful for debugging. |
|
void
updateFields(Map mFieldValues)
Updates the renderer with the supplied fields. |
|
void
updateFieldValues(Map mFieldValues)
Updates the field values. |
►
caplin.element.Renderer()
►
void
addRendererEventListener(caplin.element.RendererEventListener oRendererEventListener)
Adds a caplin.element.RendererEventListener to which the Renderer will communicates user-gestures.
caplin.element.RendererEventListener | oRendererEventListener | The renderer event listener. |
►
void
clear()
Clears the renderer value and all associated state, including the displayed value. The renderer will remain bound to the DOM.
►
void
clearState()
Clears the renderer state without clearing the displayed value. This is a performant version of clear for when you are going to update the displayed value immediately after clearing.
►
void
disable()
Disables the renderer control. Does nothing if the control has no concept of enabled/disabled.
►
void
enable()
Enables the renderer control. Does nothing if the control has no concept of enabled/disabled.
►
void
focus()
Moves the focus to this renderer. Does nothing if the control has no concept of focus.
►
Map
getFieldValues()
Returns the fields relating to the currently displayed value.
►
Variant
getFormattedValue()
Returns the formatted downstream value.
►
String
getName()
Returns the renderer name. This is set by the framework that instantiates the Renderer (e.g. the grid) and represents the field context (e.g. "Bid Price").
►
String
getNamespace()
Returns the renderer namespace. This is set by the framework that instantiates the Renderer (e.g. the grid) and represents the record context (e.g. "/FX/GBPUSD").
►
Variant
getParsedValue()
Returns the parsed upstream value.
►
Variant
getUnformattedValue()
Returns the unformatted downstream value.
►
Variant
getUnparsedValue()
Returns the unparsed upstream value.
►
Variant
getValue()
Gets the renderer value.
►
boolean
isEnabled()
Determines whether the control is enabled.
►
void
raiseEvent(String sType, Map mRendererEvent)
Raises a renderer event.
String | sType | The renderer event type. |
Map | mRendererEvent | The renderer event to raise. |
►
void
removeRendererEventListener(caplin.element.RendererEventListener oRendererEventListener)
Removes a caplin.element.RendererEventListener to which the Renderer will communicate user-gestures.
caplin.element.RendererEventListener | oRendererEventListener | The renderer event listener. |
►
void
select()
Moves the focus and highlights this renderer. Does nothing if the control has no concept of focus.
►
void
setValue(Variant vRendererValue)
Sets the renderer value.
Variant | vRendererValue | The renderer value. |
►
String
toString()
Returns a human-readable string representation of the renderer, which is useful for debugging.
►
void
updateFields(Map mFieldValues)
Updates the renderer with the supplied fields. The field values will be reflected in the control on the next call to {caplin.element.Renderer#refresh}. The Renderer might depend on these fields either because it has been bound to them in the constructor, or if the XML renderer definition refers to these fields using the ${} notation. Additional field values can be supplied and they will have no effect on the displayed value, but they will be returned by {caplin.element.Renderer#getFieldValues}. This can exploited to hold additional information about the value (such as price ID or timestamp).
Map | mFieldValues | the new field values. |
►
void
updateFieldValues(Map mFieldValues)
Updates the field values.
Map | mFieldValues | The field values. |