Provides all the necessary classes needed to build real-time grids and integration with other systems.
Grid instances are constructed from an XML definition.
A grid can be defined inline, where the grid specifies precisely which row model, columns and decorators it has. An example of an inline grid is displayed below:
<grid displayedColumns="description, rate"> <gridRowModel> <caplin.rttp-container-grid-data-provider container="/CONTAINER/FX/G8" /> </gridRowModel> <columnDefinitions> <column id="description" /> <column id="rate" /> <column id="size" /> </columnDefinitions> <decorators> <dragDecorator /> </decorators> </grid>
Alternatively a grid can be defined using a template. This allows central configuration of the core characteristics of a particular type of grid, which can be modified without having to update every grid instance. An example of a grid defined with a template is included below:
Grid Definition
<grid displayedColumns="description, bidSize, bid, ask, askSize" />
Grid Template Definition File
<gridDefinitions xmlns="http://www.caplin.com/CaplinTrader/grid"> <dataProviderMappings> <dataProviderMapping id="rttpContainerGridDataProvider" className="caplin.grid.RttpContainerGridDataProvider"/> </dataProviderMappings> <decoratorMappings> <decoratorMapping id="dragDecorator" className="caplin.grid.decorator.DragDecorator"/> </decoratorMappings> <templates> <gridTemplate id="FX" displayedColumns="description, bid, ask"> <decorators> <dragDecorator /> </decorators> <columnDefinitions> <column id="description" /> <column id="bid" /> <column id="ask" /> <column id="bidSize" /> <column id="askSize" /> </columnDefinitions> </gridTemplate> </templates> </gridDefinitions>