/** * sets a current running state for a process and thereby disables all menus * that contain methods which could interfere. * * @param process */ public void setRunningProcess(String process) { this.process = process; this.processStartTime = System.currentTimeMillis(); updateMenuBarMode(process); }
/** * Resets the menus to normal mode after the process has ended. */ public void notifyTerminationOfProcess() { if (Boolean.parseBoolean(Config.config.getProperty("Notifications.Set")) && System.currentTimeMillis() - processStartTime > 500) { JOptionPane.showMessageDialog(desktop, process + " " + Config.language.getProperty("Progress.DialogEnd.Message"), Config.language.getProperty("Progress.DialogEnd.Title"), JOptionPane.INFORMATION_MESSAGE); } updateMenuBarMode("none"); }