PropertyWidgetFactory.class);
final RowProcessingAnalyzerJobBuilderPanel presenter = new RowProcessingAnalyzerJobBuilderPanel(
excelOutputAnalyzerBuilder, false, propertyWidgetFactory);
final AbstractDialog dialog = new AbstractDialog(_windowContext) {
private static final long serialVersionUID = 1L;
@Override
public String getWindowTitle() {
return "Save " + _table.getName() + " as Excel spreadsheet";
}
@Override
protected int getDialogWidth() {
return 500;
}
@Override
protected JComponent getDialogContent() {
final AnalyzerBeanDescriptor<ExcelOutputAnalyzer> descriptor = excelOutputAnalyzerBuilder.getDescriptor();
final CloseableTabbedPane tabbedPane = new CloseableTabbedPane();
tabbedPane.addTab(descriptor.getDisplayName(),
IconUtils.getDescriptorIcon(descriptor, IconUtils.ICON_SIZE_LARGE), presenter.createJComponent());
tabbedPane.setUnclosableTab(0);
return tabbedPane;
}
@Override
protected String getBannerTitle() {
return "Save " + _table.getName() + "\nas Excel spreadsheet file";
}
};
final JButton runButton = new JButton("Run", ImageManager.getInstance().getImageIcon("images/actions/execute.png"));
runButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Injector injector = Guice.createInjector(new DCModule(_parentModule, ajb) {
@Override
public String getJobFilename() {
return "Save " + _table.getName() + " as Excel spreadsheet";
}
});
ResultWindow window = injector.getInstance(ResultWindow.class);
window.setVisible(true);
dialog.dispose();
window.startAnalysis();
}
});
presenter.addToButtonPanel(runButton);
dialog.setVisible(true);
}