The following code illustrates cards
associated with an array shelf through the use of slot spanning.
// create data source
IltDefaultDataSource dataSource = new IltDefaultDataSource();
// Create shelf
IltShelf s1 = new IltShelf(5, 20, 4, 25, 0);
s1.setAttributeValue(IltShelf.PositionAttribute,
new IlpPoint(50, 50));
dataSource.addObject(s1);
// Create cards
IltCard c1 = new IltCard(null, "c1");
c1.setAttributeValue(IltCard.PositionAttribute,
new IlpShelfItemPosition(0, 0, 2.8f, 1.9f));
dataSource.addObject(c1);
IltCard c2 = new IltCard(null, "c2");
c2.setAttributeValue(IltCard.PositionAttribute,
new IlpShelfItemPosition(0, 2, 2.8f, 1.9f));
dataSource.addObject(c2);
IltCard c3 = new IltCard(null, "c3");
c3.setAttributeValue(IltCard.PositionAttribute,
new IlpShelfItemPosition(3, 0, 1.8f, 3.9f));
dataSource.addObject(c3);
// create relationship
dataSource.setParent(c1.getIdentifier(), s1.getIdentifier());
dataSource.setParent(c2.getIdentifier(), s1.getIdentifier());
dataSource.setParent(c3.getIdentifier(), s1.getIdentifier());
The result looks like this: