private cReportControls getControlsInZOrder(cReportControls col)
{
int i = 0;
cReportControl ctrl = null;
cReportControls ctrls = null;
ctrls = new cReportControls();
ctrls.setCopyColl(col.getCopyColl());
ctrls.setTypeSection(col.getTypeSection());
ctrls.setSectionLine(col.getSectionLine());
// we load a new collection ordered by zorder
//
while (col.count() > 0)
{
// we search the lower zorder in this collection
//
i = 32767;
for (int _i = 0; _i < col.count(); _i++)
{
ctrl = col.item(_i);
if (ctrl.getLabel().getAspect().getNZOrder() < i)
{
i = ctrl.getLabel().getAspect().getNZOrder();
}
}
for (int _i = 0; _i < col.count(); _i++)
{
ctrl = col.item(_i);
if (ctrl.getLabel().getAspect().getNZOrder() == i)
{
col.remove(ctrl.getKey());
ctrls.add(ctrl, ctrl.getKey());
break;
}
}
i = i + 1;
}
return ctrls;
}