return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newFooter), oldFooter, newFooter);
}
if (data instanceof ItemBand)
{
final GroupDataBody g = (GroupDataBody) parent;
final ItemBand oldBand = g.getItemBand();
final ItemBand newBand = new ItemBand();
g.setItemBand(newBand);
return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newBand), oldBand, newBand);
}
if (data instanceof NoDataBand)
{
final GroupDataBody g = (GroupDataBody) parent;
final NoDataBand oldBand = g.getNoDataBand();
final NoDataBand newBand = new NoDataBand();
g.setNoDataBand(newBand);
return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newBand), oldBand, newBand);
}
if (data instanceof DetailsHeader)
{
final GroupDataBody g = (GroupDataBody) parent;
final DetailsHeader oldHeader = g.getDetailsHeader();
final DetailsHeader newHeader = new DetailsHeader();
g.setDetailsHeader(newHeader);
return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newHeader), oldHeader, newHeader);
}
if (data instanceof DetailsFooter)
{
final GroupDataBody g = (GroupDataBody) parent;
final DetailsFooter oldFooter = g.getDetailsFooter();
final DetailsFooter newFooter = new DetailsFooter();
g.setDetailsFooter(newFooter);
return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newFooter), oldFooter, newFooter);
}
return null;
}