return footer;
}
if (insert instanceof GroupBody)
{
final GroupBody body = (GroupBody) insert.derive();
try
{
g.setBody(body);
return body;
}
catch (final Exception e)
{
return null;
}
}
return null;
}
if (rawLeadSelection instanceof SubGroupBody)
{
final SubGroupBody body = (SubGroupBody) rawLeadSelection;
if (insert instanceof RelationalGroup || insert instanceof CrosstabGroup)
{
try
{
final Group group = (Group) insert.derive();
body.setGroup(group);
return group;
}
catch (Exception cne)
{
UncaughtExceptionsModel.getInstance().addException(cne);
return null;
}
}
return null;
}
if (rawLeadSelection instanceof GroupDataBody)
{
final GroupDataBody body = (GroupDataBody) rawLeadSelection;
if (insert instanceof DetailsHeader)
{
final DetailsHeader detailsHeader = (DetailsHeader) insert.derive();
body.setDetailsHeader(detailsHeader);
return detailsHeader;
}
if (insert instanceof DetailsFooter)
{
final DetailsFooter footer = (DetailsFooter) insert.derive();
body.setDetailsFooter(footer);
return footer;
}
if (insert instanceof ItemBand)
{
final ItemBand itemBand = (ItemBand) insert.derive();
body.setItemBand(itemBand);
return itemBand;
}
if (insert instanceof NoDataBand)
{
final NoDataBand noDataBand = (NoDataBand) insert.derive();
body.setNoDataBand(noDataBand);
return noDataBand;
}
return null;
}
if (rawLeadSelection instanceof CrosstabCellBody)
{
final CrosstabCellBody body = (CrosstabCellBody) rawLeadSelection;
if (insert instanceof CrosstabCell)
{
final CrosstabCell crosstabCell = (CrosstabCell) insert.derive();
body.addElement(crosstabCell);
return crosstabCell;
}
}
return null;