Caplin Trader 4.8.0

Interface: module:caplin/component/InstrumentReceiver

module:caplin/component/InstrumentReceiver

The InstrumentReceiver interface is primarily implemented by components that wish to participate in drag&drop operations. By implementing this one interface however, trader applications that wish to employ other mechanisms for instrument addition, can do this in a generalized way that will work with all components.

Methods

canReceive()

Whether a receiver is currently accepting new objects.
Implementations:

canReceiveMultipleObjects()

Whether the receiver is able to handle multiple objects.
Implementations:

canReceiveObjects(objects)

Use this to determine if the objects being dropped can be received.
Parameters:
Name Type Description
objects Array The list of object names about to passed to this receiver
Implementations:
See:

getLastReceiveFailureMessage()

This method is abstract and must be implemented by subclasses.

This method is used when module:caplin/component/InstrumentReceiver#canReceiveObjects returns false and an error message is required to explain why the objects were not accepted.

Implementations:

getSuccessMessage()

This method is abstract and must be implemented by subclasses.

This method is used when module:caplin/component/InstrumentReceiver#canReceiveObjects returns true and a success message is required to explain when the objects are accepted.

Implementations:

receiveObjects(objects, indexopt)

The callback method that is invoked when an object is dropped onto the implementing object.
Parameters:
Name Type Attributes Description
objects Array The list of object names being passed to this receiver
index number <optional>
The index to insert the new objects at. If not included, objects should be appended to the end.
Implementations: