This class allows the trade model object that the created properties are bound to to be dynamically updated without any interruption in service.
Attributes | Name and Description |
---|---|
|
caplin.trading.presenter.TradeModelPropertyFactory(caplin.trading.trademodel.Trade oTradeModel)
Construct a new instance of |
Attributes | Name and Description |
---|---|
|
void
destroy()
Removes all listeners, and performs any necessary clean-up when the properties created by this factory are no longer needed. |
|
caplin.presenter.property.EditableProperty
getEditableProperty(String sPath)
Returns a new caplin.presenter.property.EditableProperty instance bound to the specified part of the trade model. |
|
caplin.presenter.property.Property
getProperty(String sPath)
Returns a new caplin.presenter.property.Property instance bound to the specified part of the trade model. |
|
caplin.trading.trademodel.Trade
getTrade()
Returns the trade model instance that all properties created by this factory are bound to. |
|
Object
getTradeLegFactory(int nLegIndex, Function fTradeModelPropertyFactory)
Returns a new name-spaced instance of |
|
Object
getTradeLegFactoryById(int nLegId, Function fTradeModelPropertyFactory)
Returns a new name-spaced instance of |
|
caplin.presenter.property.Property
getTradeStateProperty()
Returns a new caplin.presenter.property.Property instance bound to the overall state of the trade. |
|
void
setTrade(caplin.trading.trademodel.Trade oModel)
Replaces the |
►
caplin.trading.presenter.TradeModelPropertyFactory(caplin.trading.trademodel.Trade oTradeModel)
Construct a new instance of TradeModelPropertyFactory
, bound to the given caplin.trading.trademodel.Trade instance.
caplin.trading.trademodel.Trade | oTradeModel | The trade model instance that all created properties will be bound to. |
►
void
destroy()
Removes all listeners, and performs any necessary clean-up when the properties created by this factory are no longer needed.
►
caplin.presenter.property.EditableProperty
getEditableProperty(String sPath)
Returns a new caplin.presenter.property.EditableProperty instance bound to the specified part of the trade model.
String | sPath | the path to the property on the Trade object. |
►
caplin.presenter.property.Property
getProperty(String sPath)
Returns a new caplin.presenter.property.Property instance bound to the specified part of the trade model.
String | sPath | the path to the property on the Trade object |
►
caplin.trading.trademodel.Trade
getTrade()
Returns the trade model instance that all properties created by this factory are bound to.
►
Object
getTradeLegFactory(int nLegIndex, Function fTradeModelPropertyFactory)
Returns a new name-spaced instance of TradeModelPropertyFactory
(or
fTradeModelPropertyFactory
if you pass it to the method) where the specified trade leg acts as the
root element for any calls to #getProperty and #getEditableProperty.
int | nLegIndex | The index of the leg that will become the new root object. |
Function | fTradeModelPropertyFactory | (optional) The TradeModelPropertyFactory constructor that should be used, uses caplin.trading.presenter.TradeModelPropertyFactory if not provided. |
caplin.trading.presenter.TradeModelPropertyFactory#getTradeLegFactoryById
fTradeModelPropertyFactory
if provided.
►
Object
getTradeLegFactoryById(int nLegId, Function fTradeModelPropertyFactory)
Returns a new name-spaced instance of TradeModelPropertyFactory
(or fTradeModelPropertyFactory
if you pass it to the method) where the
specified trade leg acts as the root element for any calls to #getProperty and
#getEditableProperty.
int | nLegId | The ID of the leg that will become the new root object. |
Function | fTradeModelPropertyFactory | (optional) The TradeModelPropertyFactory constructor that should be used, uses caplin.trading.presenter.TradeModelPropertyFactory if not provided. |
fTradeModelPropertyFactory
if provided.
►
caplin.presenter.property.Property
getTradeStateProperty()
Returns a new caplin.presenter.property.Property instance bound to the overall state of the trade.
►
void
setTrade(caplin.trading.trademodel.Trade oModel)
Replaces the Trade
object referenced by the TradeModelPropertyFactory
and causes
all pre-existing properties to also be updated so that they reference this new Trade
.
caplin.trading.trademodel.Trade | oModel | The new trade model object that all properties will now be bound to. |