예제 #1
0
 public void actionPerformed(ActionEvent event) {
   if (event.getSource().equals(launchBrowser)) {
     Configuration config = Configuration.getInstance();
     String ip = Util.getIPAddress();
     String protocol = "http" + (config.ssl ? "s" : "");
     String url = protocol + "://" + ip + ":" + config.port;
     Util.openURL(url);
   } else if (event.getSource().equals(stop)) {
     Util.shutdown();
     running = Util.isRunning();
     setStatus();
   } else if (event.getSource().equals(start)) {
     clearLogsDir();
     run();
     launchBrowser.requestFocusInWindow();
   }
 }
예제 #2
0
  public OwnerDialog(Araucaria parent) {

    super((Frame) null, true);
    araucaria = parent;
    propText = araucaria.getArgument().getSelectedProps();
    try {
      init();
      okButton.requestFocusInWindow();
      addDialogCloser(masterPanel);
      this.getRootPane().setDefaultButton(okButton);
      this.pack();
    } catch (Exception e) {
      e.printStackTrace();
    }
    Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
    this.setLocation(
        d.width / 2 - this.getSize().width / 2, d.height / 2 - this.getSize().height / 2);
  }
예제 #3
0
 public void setFocusOnStart() {
   start.requestFocusInWindow();
 }