final Map.Entry<String, String> entry = entryIterator.next();
loader.register(entry.getKey(), entry.getValue());
}
}
final XulDomContainer container = loader.loadXul(DIALOG_DEFINITION_FILE);
final Document documentRoot = container.getDocumentRoot();
for (int i = 0; i < plugins.length; i++)
{
final ReportDesignerUiPlugin plugin = plugins[i];
final String[] strings = plugin.getOverlaySources();
for (int j = 0; j < strings.length; j++)
{
final String source = strings[j];
documentRoot.addOverlay(source);
}
}
for (int i = 0; i < plugins.length; i++)
{
final ReportDesignerUiPlugin plugin = plugins[i];
final XulEventHandler[] xulEventHandlers = plugin.createEventHandlers();
for (int j = 0; j < xulEventHandlers.length; j++)
{
final XulEventHandler eventHandler = xulEventHandlers[j];
container.addEventHandler(eventHandler);
}
}
container.initialize();
final XulComponent root = documentRoot.getRootElement();
if (root instanceof XulWindow)
{
window = (XulWindow) root;