return paletteScrollpane;
}
private void rebuildReportMenu()
{
final XulDesignerFrame xulDesignerFrame = context.getXulDesignerFrame();
final XulComponent reopenMenu = xulDesignerFrame.getXulComponentById("window.reports-area");// NON-NLS
if (reopenMenu == null)
{
return;
}
final List<XulComponent> xulComponents = reopenMenu.getChildNodes();
final XulComponent[] objects = xulComponents.toArray(new XulComponent[xulComponents.size()]);
for (int i = 0; i < objects.length; i++)
{
final XulComponent object = objects[i];
reopenMenu.removeChild(object);
}
final JTabbedPane tabbedPane = getReportEditorPane();
final int count = tabbedPane.getTabCount();
if (count > 0)
{
reopenMenu.addChild(new SwingMenuseparator(null, null, null, "menu-separator")); // NON-NLS
for (int i = 0; i < count; i++)
{
final Component at = tabbedPane.getTabComponentAt(i);
final String tabName;
if (at instanceof TabRenderer)
{
final TabRenderer renderer = (TabRenderer) at;
tabName = renderer.getTitle();
}
else
{
tabName = tabbedPane.getTitleAt(i);
}
final SelectTabAction action = new SelectTabAction(i, tabName);
final ActionSwingMenuitem actionSwingMenuitem = xulDesignerFrame.createMenu(action);
actionSwingMenuitem.setReportDesignerContext(context);
reopenMenu.addChild(actionSwingMenuitem);
}
}
}