Caplin Trader 4.7.1

Class: module:caplin/popout/PopoutService

module:caplin/popout/PopoutService

Constructor

new module:caplin/popout/PopoutService()

Service to be used inside a popout window to enable communication with its associated module:caplin/popout/Popout from the application's main window. Any events raised by the associated module:caplin/popout/Popout will also be raised by this service. This service can be accessed from the module:caplin/core/ServiceRegistry using the alias "caplin.popout-service". This service should only be referenced in windows opened using module:caplin/popout/Popout. Such windows are required to reference this service.

Methods

fireEvent(name, properties)

Fires the given event on this service and on the Popout associated with this popout window.
Parameters:
Name Type Description
name string The name of the event.
properties Object A map of properties to be passed along with the event

getProperties() → {map}

Gets a map of all properties set on the Popout associated with this popout window.
Returns:
The map of properties.
Type
map

getProperty(propertyName) → {var}

Gets the value for a given property set on the Popout associated with this popout window.
Parameters:
Name Type Description
propertyName String The name of the property to get.
Returns:
The value of the property.
Type
var

getWindowGeometrics() → {Object}

Returns the current position and dimensions of this popout window.
Returns:
Contains geometric properties with integer values. Included properties are: 'width', 'height', 'left' and 'top'.
Type
Object

resizeWindow(width, height)

Resizes this popout window to the given dimensions.
Parameters:
Name Type Description
width int The desired width of the popout window.
height int The desired height of the popout window.

setProperties(properties)

Sets properties on the Popout associated with this popout window.
Parameters:
Name Type Description
properties Object The map of properties to set.