setForeground(new JProgressBar().getForeground());
super.paint(graphics);
// System.out.println(getForeground());
}
};
CommandMonitor cm = new CommandMonitor() {
public void signalProgress() {
try {
progress.setIndeterminate(mcWr.get().hasIndeterminateProgress());
if (!mcWr.get().hasIndeterminateProgress())
progress.setValue((int)(mcWr.get().getProgress() * 100));
// progress.setForeground(progress.getForeground());
progress.setStringPainted(true);
progress.setString(i18n.getValue((String) commandsToOngoingKeys.get(mcWr)));
mbl.repaint();
}
catch (NullPointerException exc) {
// Nothing has to be done: weak reference is cleared.
}
}
};
commandMonitors.add(cm);
cm.signalProgress();
return progress;
}