Пример #1
0
 @Action
 public void hostFieldDidChange(final NSNotification sender) {
   String input = hostField.stringValue();
   if (ProtocolFactory.isURL(input)) {
     final Host parsed = Host.parse(input);
     host.setProtocol(parsed.getProtocol());
     host.setPort(parsed.getPort());
     host.setHostname(parsed.getHostname());
     host.setDefaultPath(parsed.getDefaultPath());
   } else {
     host.setHostname(input);
   }
   this.itemChanged();
   this.init();
   this.reachable();
 }