/** * Saves the settings for team mapping, last deployment, and current username/server to the * settings file Called by the GuiMenuBar and WindowListeners */ public void saveSettings() { for (VirtualMachineExt each : vmRootEntities) { TEAMS.put(each.getName(), each.getTeam()); } SETTINGS_READER.lastServer = getCurrentServer(); SETTINGS_READER.lastUser = getCurrentUsername(); SETTINGS_READER.save(); LOG.write("Settings Saved Successfully"); }
public void setTeam(VirtualMachine vm) { try { String choice = (String) JOptionPane.showInputDialog( main, "Select Team", "Team: ", JOptionPane.INFORMATION_MESSAGE, null, TEAM_NAMES, null); if (choice != null) { LOG.write("Changing " + vm.getName() + " to " + choice); TEAMS.put(vm.getName(), choice); ThreadExt thread = new CommandOperationsThread(vm, MOVE, this, choice); thread.start(); } } catch (RuntimeException e) { disconnect(); } }