private void sendChatElements() { ChatElements chatElements = new ChatElements(); chatElements.setNickname(Settings.getNickname()); try { ObjectOutputStream objectOutput = new ObjectOutputStream(output); objectOutput.writeObject(chatElements); } catch (IOException e) { connectionDirector.connectionBroken(); close(); e.printStackTrace(); } }
@Override public void actionPerformed(ActionEvent e) { if (e.getSource().equals(help)) try { Desktop.getDesktop().browse(new URI("http://" + Settings.getHost() + "/syncrop.html")); } catch (IOException | URISyntaxException e1) { logger.logError(e1, "occured when trying to load syncrop.html"); } else if (e.getSource().equals(about)) trayIcon.displayMessage( "Syncrop", "Syncrop is a free online syncronization service hosted on Realm of Pi.", TrayIcon.MessageType.NONE); else if (e.getSource().equals(update)) { if (WindowsUpdator.isUpdateAvailable()) WindowsUpdator.update(); } else if (e.getSource().equals(exit)) { logger.log("User terminated Syncrop from the notification area"); System.exit(0); } }
public World(Settings<O> settings) { super(settings.getCoordinateSystem()); this.settings = settings; }