application.invokeLater(new Runnable() {
@Override
public void run() {
if (notRunningCount >= 1) {
for (final Cluster cluster : allClusterCheckboxes.keySet()) {
final MyButton loadButton = allLoadButtons.get(cluster);
if (loadButton != null) {
loadButton.setEnabled(false);
}
}
/* enable start etc marked clusters button */
loadMarkedClustersButton.setEnabled(runningCount == 0);
}
if (runningCount >= 1) {
unloadMarkedClustersButton.setEnabled(notRunningCount == 0);
}
//TODO: still not working
removeMarkedClustersButton.setEnabled(true);
}
});
} else {
/* deselecting */
application.invokeLater(new Runnable() {
@Override
public void run() {
if (notRunningCount == 0) {
for (final Cluster cluster : allClusterCheckboxes.keySet()) {
final MyButton loadButton = allLoadButtons.get(cluster);
if (loadButton != null) {
if (cluster.getClusterTab() == null) {
loadButton.setEnabled(true);
}
}
}
loadMarkedClustersButton.setEnabled(false);
if (runningCount > 0) {