summaryrefslogtreecommitdiff
path: root/NET/worlds/console/ProxyServerDialog.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-03 16:38:41 -0700
committerFuwn <[email protected]>2021-05-03 16:38:41 -0700
commite1e781bb2135ef78592226f1a3eaba4925702f1f (patch)
tree8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/console/ProxyServerDialog.java
downloadworlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz
worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/console/ProxyServerDialog.java')
-rw-r--r--NET/worlds/console/ProxyServerDialog.java91
1 files changed, 91 insertions, 0 deletions
diff --git a/NET/worlds/console/ProxyServerDialog.java b/NET/worlds/console/ProxyServerDialog.java
new file mode 100644
index 0000000..adc62f0
--- /dev/null
+++ b/NET/worlds/console/ProxyServerDialog.java
@@ -0,0 +1,91 @@
+/* */ 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
+ */ \ No newline at end of file