The following example creates a card carrier with a card and adds
it to a shelf. Note the tags
<parent>
and
</parent>
, which define the parent object of the card items, and the
attribute
slotCount
, which defines the number of slots for the card carrier.
Note
The positioning of an object in a card carrier is given by an
IlpPoint
, not by an
IlpShelfItemPosition
as in the shelf.
<cplData>
<addObject id="Shelf">
<class>ilog.tgo.model.IltShelf</class>
<attribute name="name">Shelf</attribute>
<attribute name="slotSizes" javaClass="ilog.cpl.equipment.IlpSlotSizes">
<width>
<value>30</value>
<value>20</value>
<value>40</value>
</width>
<height>
<value>90</value>
<value>20</value>
</height>
</attribute>
<attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint">
<x>100</x> <y>50</y>
</attribute>
</addObject>
<addObject id="Carrier">
<class>ilog.tgo.model.IltCardCarrier</class>
<parent>Shelf</parent>
<attribute name="name">Carrier</attribute>
<attribute name="slotCount" javaClass="java.lang.Integer">2</attribute>
<attribute name="position"
javaClass="ilog.cpl.graphic.views.IlpShelfItemPosition">
<x>1</x> <y>0</y> <width>2</width> <height>2</height>
</attribute>
</addObject>
<addObject id="Card">
<class>ilog.tgo.model.IltCard</class>
<parent>Carrier</parent>
<attribute name="name">Card</attribute>
<attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint">
<x>0</x> <y>1</y>
</attribute>
</addObject>
</cplData>
The result looks like this: