Ejemplo n.º 1
0
 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();
   }
 }
Ejemplo n.º 2
0
 @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);
   }
 }
Ejemplo n.º 3
0
 public World(Settings<O> settings) {
   super(settings.getCoordinateSystem());
   this.settings = settings;
 }