{
throw new UnsupportedOperationException();
}
final JTabbedPane editorPanes = getReportEditorPane();
final IndexedPropertyChangeEvent ievt = (IndexedPropertyChangeEvent) evt;
if (ievt.getNewValue() != null)
{
// added
final ReportRenderContext renderContext = (ReportRenderContext) ievt.getNewValue();
DefaultReportDesignerContext reportDesignerContext = getContext();
final ReportRendererComponent rendererComponent = new ReportRendererComponent(reportDesignerContext, renderContext);
final String title = renderContext.getTabName();
final Icon icon = renderContext.getIcon();
final TabRenderer tabRenderer = new TabRenderer(icon, title, reportDesignerContext, editorPanes);
editorPanes.addTab(title, null, rendererComponent);
editorPanes.setTabComponentAt(editorPanes.getTabCount() - 1, tabRenderer);
editorPanes.setSelectedComponent(rendererComponent);
renderContext.addPropertyChangeListener("tabName",
new DocumentNameChangeHandler(renderContext, tabRenderer, editorPanes.getTabCount() - 1));
}
else if (ievt.getOldValue() != null)
{
if (editorPanes.getTabCount() <= 0)
{
return;
}
// removed
int index = ievt.getIndex();
final ReportRenderContext reportRenderContext = (ReportRenderContext) ievt.getOldValue();
boolean removedTab = false;
for (int i = 0; i < editorPanes.getTabCount(); i++)
{
final Component tabContent = editorPanes.getComponentAt(i);