return new ElementEditUndoEntry(band.getObjectID(), index, veElement, null);
}
if (data instanceof GroupHeader)
{
final RelationalGroup g = (RelationalGroup) parent;
final GroupHeader oldHeader = g.getHeader();
final GroupHeader newHeader = new GroupHeader();
g.setHeader(newHeader);
return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newHeader), oldHeader, newHeader);
}
if (data instanceof GroupFooter)
{
final RelationalGroup g = (RelationalGroup) parent;
final GroupFooter oldFooter = g.getFooter();
final GroupFooter newFooter = new GroupFooter();
g.setFooter(newFooter);
return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newFooter), oldFooter, newFooter);
}
if (data instanceof ReportFooter)
{
final AbstractReportDefinition g = (AbstractReportDefinition) parent;
final ReportFooter oldFooter = g.getReportFooter();
final ReportFooter newFooter = new ReportFooter();
g.setReportFooter(newFooter);
return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newFooter), oldFooter, newFooter);
}
if (data instanceof ReportHeader)
{
final AbstractReportDefinition g = (AbstractReportDefinition) parent;
final ReportHeader oldHeader = g.getReportHeader();
final ReportHeader newHeader = new ReportHeader();
g.setReportHeader(newHeader);
return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newHeader), oldHeader, newHeader);
}
if (data instanceof PageHeader)
{
final AbstractReportDefinition g = (AbstractReportDefinition) parent;
final PageHeader oldHeader = g.getPageHeader();
final PageHeader newHeader = new PageHeader();
g.setPageHeader(newHeader);
return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newHeader), oldHeader, newHeader);
}
if (data instanceof PageFooter)
{
final AbstractReportDefinition g = (AbstractReportDefinition) parent;
final PageFooter oldFooter = g.getPageFooter();
final PageFooter newFooter = new PageFooter();
g.setPageFooter(newFooter);
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;
}