final AnalyzerBeanDescriptor<?> descriptor = analyzerJob.getDescriptor();
final Icon icon = IconUtils.getDescriptorIcon(descriptor, IconUtils.ICON_SIZE_LARGE);
final String resultLabel = LabelUtils.getLabel(analyzerJob);
final JXTaskPane taskPane = WidgetFactory.createTaskPane(resultLabel, icon);
final DCPanel taskPanePanel = new DCPanel(WidgetUtils.BG_COLOR_BRIGHT, WidgetUtils.BG_COLOR_BRIGHTEST);
taskPanePanel.setLayout(new BorderLayout());
taskPane.add(taskPanePanel);
taskPanePanel.add(new LoadingIcon());
_progressInformationPanel.addUserLog("Rendering result for " + resultLabel);
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
String title = taskPane.getTitle();
JXTaskPane[] taskPanes = _taskPaneContainer.getTaskPanes();
boolean added = false;
for (int i = 0; i < taskPanes.length; i++) {
JXTaskPane existingTaskPane = taskPanes[i];
if (existingTaskPane.getTitle().compareTo(title) > 0) {
_taskPaneContainer.add(taskPane, i);
added = true;
break;
}
}