public void perform(OVTK2Desktop desktop) { if (!invisible.isSelected()) { desktop.actionPerformed(new ActionEvent(this, 0, "sync")); // wait here for sync to finish synchronized (this) { while (!desktop.getRunningProcess().equals("none")) { try { this.wait(100); } catch (InterruptedException ie) { ErrorDialog.show(ie); } } } } if (appearance.isSelected()) { // this should not be in a thread desktop.actionPerformed(new ActionEvent(this, 0, "saveappearance")); } } }
if (!desktop.getRunningProcess().equals("GraphSynchronization")) {