The following code creates a shelf with
two empty slots, one showing an alarm.
IltDefaultDataSource dataSource = new IltDefaultDataSource();
IltShelf s1 = new IltShelf(4, 20, 100, 0);
s1.setAttributeValue(IltShelf.PositionAttribute, new IlpPoint(50, 50));
dataSource.addObject(s1);
IltEmptySlot e0 = new IltEmptySlot(null, "e0");
e0.setAttributeValue(IltEmptySlot.PositionAttribute,
new IlpShelfItemPosition(0, 0, 1, 1));
dataSource.addObject(e0);
IltEmptySlot e2 = new IltEmptySlot(new IltOSIObjectState(), "e2");
e2.setState(IltOSI.State.Administrative.Locked);
e2.getAlarmState().setNewAlarmCount(IltAlarm.Severity.Critical, 1);
e2.setAttributeValue(IltEmptySlot.PositionAttribute,
new IlpShelfItemPosition(2, 0, 1, 1));
dataSource.addObject(e2);
dataSource.setParent(e0.getIdentifier(), s1.getIdentifier());
dataSource.setParent(e2.getIdentifier(), s1.getIdentifier());
The result looks like this: