/* */ package NET.worlds.console; /* */ /* */ import NET.worlds.core.IniFile; /* */ import java.awt.Button; /* */ import java.awt.GridBagConstraints; /* */ import java.awt.Label; /* */ import java.awt.TextField; /* */ import java.util.Properties; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ class ProxyServerDialog /* */ extends OkCancelDialog /* */ { /* */ private static final long serialVersionUID = 8421990344972629940L; /* 23 */ private Label ipLabel = new Label("Proxy IP"); /* 24 */ private TextField ipText = new TextField("", 15); /* 25 */ private Label portLabel = new Label("Proxy Port"); /* 26 */ private TextField portText = new TextField("", 3); /* */ /* */ public ProxyServerDialog() /* */ { /* 30 */ super(Console.getFrame(), null, Console.message("Proxy-Server"), "Cancel", "Ok", "", false); /* 31 */ this.ipText.setText(IniFile.gamma().getIniString("Proxy Server IP", "")); /* 32 */ this.portText.setText(IniFile.gamma().getIniString("Proxy Server Port", "")); /* */ } /* */ /* */ protected synchronized boolean done(boolean confirmed) /* */ { /* 37 */ if (confirmed) { /* 38 */ Properties p = System.getProperties(); /* 39 */ IniFile.gamma().setIniString("Proxy Server IP", this.ipText.getText()); /* 40 */ IniFile.gamma().setIniString("Proxy Server Port", /* 41 */ this.portText.getText()); /* 42 */ p.remove("socksProxyHost"); /* 43 */ p.remove("socksProxyPort"); /* 44 */ p.put("socksProxyHost", this.ipText.getText()); /* 45 */ p.put("socksProxyPort", this.portText.getText()); /* 46 */ System.setProperties(p); /* */ } /* */ /* 49 */ return super.done(confirmed); /* */ } /* */ /* */ public void build() /* */ { /* 54 */ GridBagConstraints c = new GridBagConstraints(); /* */ /* 56 */ c.gridx = 1; /* 57 */ c.gridy = 1; /* 58 */ c.weightx = 1.0D; /* 59 */ c.weighty = 1.0D; /* */ /* 61 */ add(this.gbag, this.ipLabel, c); /* */ /* 63 */ c.gridy = 2; /* 64 */ add(this.gbag, this.portLabel, c); /* */ /* 66 */ c.gridx = 2; /* 67 */ c.gridy = 1; /* 68 */ c.weightx = 3.0D; /* 69 */ add(this.gbag, this.ipText, c); /* */ /* 71 */ c.gridy = 2; /* 72 */ add(this.gbag, this.portText, c); /* */ /* 74 */ this.okButton.setFont(bfont); /* 75 */ this.cancelButton.setFont(bfont); /* */ /* 77 */ c.gridx = 1; /* 78 */ c.gridy = 3; /* 79 */ c.weightx = 1.0D; /* 80 */ add(this.gbag, this.okButton, c); /* */ /* 82 */ c.gridx = 4; /* 83 */ add(this.gbag, this.cancelButton, c); /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\ProxyServerDialog.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */