]> dxcluster.org Git - spider.git/commitdiff
add changes to java client from Rene, OZ1LQH
authorg0vgs <g0vgs>
Mon, 6 Jan 2003 08:42:18 +0000 (08:42 +0000)
committerg0vgs <g0vgs>
Mon, 6 Jan 2003 08:42:18 +0000 (08:42 +0000)
Changes
spider-web/beam.java
spider-web/dxannounce.java
spider-web/spider.cgi
spider-web/spiderclient.java
spider-web/spiderframe.java

diff --git a/Changes b/Changes
index 9e32e7ae934fa00e4b8640b1364f0d1e88291634..b4405806e312c54f1c7c4010fc684f7c6506cca5 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,9 @@
+06Jan03=======================================================================
+1. add the latest changes to the spider-web java interface from Rene, OZ1LQH.
+Please note that there is a change to the spider.cgi file this time so that
+the client show 'Connected to Node_Call' instead of the hostname.  You will
+need to update your cgi file when you update the changes.  Please make sure
+that you back up your old files first! (g0vgs)
 05Jan03=======================================================================
 1. fix some irritating messages caused by protocol loops in sh/c
 2. update copyright
index 7184f3b4d4a2a74fd9e194e0202c5663e9b1385a..574a6c17f692cf83c6d115c7e82d02844ce9efd5 100755 (executable)
@@ -6,7 +6,6 @@ public class beam extends Dialog
                super(parent, "Call/Prefix/Other", true);
                this.parent = parent;
                this.setFont(font);
-//             Prefix=""; // Make sure that the input field is always empty when box displayed.
                                                                
                Panel p1 = new Panel();
                p1.setLayout(new GridLayout(2,2));
index c4c833f554cf4cb175b289fd76d4277e36ff08d5..8627680bfe861c56607c216253b1e51d5bbc2c0d 100755 (executable)
@@ -7,9 +7,6 @@ public class dxannounce extends Dialog
                super(parent, "Dx Announce", true);
                this.parent = parent;
                this.setFont(font);
-//             Call2 = "";
-//             Freq = "";
-//             Remarks = ""; // Make sure that Call2, Freq and Remarks are empty when box is displayed.
                
                Panel p1 = new Panel();
                p1.setLayout(new GridLayout(3,2));
index 47a61ef32a2386a5368388cfe120ed4ce965f6a2..09ca06532ebaff61e64c7c621960e9786e2fdfc1 100755 (executable)
@@ -42,7 +42,7 @@ print <<'EOF';
         <META NAME="Author" CONTENT="Ian Norton.">
         <META NAME="DESCRIPTION" CONTENT="DX Cluster web interface">
     </HEAD>
+     
 <BODY BGCOLOR="#FFFFFF" LINK="#008080" ALINK="#000099" VLINK="#000099">         
 
     <H1>
@@ -74,6 +74,7 @@ if($ENV{CONTENT_LENGTH} > 0)
     print("        <PARAM NAME=\"PASSWORD\" VALUE=\"$password\">\n") ;
     print("        <PARAM NAME=\"HOSTNAME\" VALUE=\"$HOSTNAME\">\n") ;
     print("        <PARAM NAME=\"PORT\" VALUE=\"$PORT\">\n") ;
+    print("        <PARAM NAME=\"NODECALL\" VALUE=\"$NODECALL\">\n") ;
     print("    </APPLET>\n") ;
     print("</CENTER>\n") ;
     }
index 87e487c09c1ad027415a8bfa0ee4410af98424b8..542844efb1d88d3006341246aa0f12d30a0c727b 100755 (executable)
@@ -30,6 +30,9 @@ public class spiderclient extends Applet {
                p = getParameter("CHANNEL");
                if (p != null) cf.setChannel(p);
 
+               p = getParameter("NODECALL");
+               if (p != null) cf.setNodecall(p);
+               
                Beep = getAudioClip(getCodeBase(), "ding.au");
                // cf.login();
                cf.resize(655, 380);
@@ -49,9 +52,8 @@ public class spiderclient extends Applet {
                        out.println(cf.getCall());
 
                        if(cf.getPassword().length() > 0) {
-                out.println(cf.getPassword());
-            }
-
+                       out.println(cf.getPassword());
+                       }
                        // out.println(cf.getFullname());
                }
                catch (IOException e) { 
@@ -106,10 +108,6 @@ class StreamListener extends Thread {
                        // schrieb nur jede 2te zeile , deswegen //
                        // line = in.readLine();
                        
-                       
-                       
-                       
-                       
                        if (line == null) break;
                                cf.setText(line);
                        }
@@ -119,7 +117,6 @@ class StreamListener extends Thread {
                        cf.setText(e.toString());
                        cf.disconnected();
                }
-               
                finally { cf.setText("Connection closed by server."); }
        }
 }
index f3ee2f3b9b36b3809e7f393c6e0114f19cea08cb..83e865f47f6231897a747cd33912d0678ff5e88b 100755 (executable)
@@ -44,10 +44,11 @@ menubar.add(commands);
                show = new Menu("Show");
                show.add(new MenuItem("Show Last DX"));
                show.add(new MenuItem("Show Beam Direction"));
-                            show.add(new MenuItem("Show WWV"));
-                            show.add(new MenuItem("Search DX"));
+                show.add(new MenuItem("Show WWV"));
+                show.add(new MenuItem("Show WCY"));
+                show.add(new MenuItem("Search DX"));
                show.add(new MenuItem("Search Address"));
-                            show.add(new MenuItem("Search QSL Manager"));
+                show.add(new MenuItem("Search QSL Manager"));
                show.add(new MenuItem("Search QSL Info"));
                show.add(new MenuItem("Search DXCC"));
                show.add(new MenuItem("Status"));
@@ -175,6 +176,10 @@ menubar.add(mailbox);
                Call = s;
                }
 
+       public void setNodecall(String s) {
+               Nodecall = s ;
+               }
+               
        public void setPassword(String s) {
                Password = s ;
                }
@@ -348,7 +353,7 @@ menubar.add(mailbox);
        
        public void connected() {
                connect_menuitem.setLabel("Disconnect");
-               connectState.setText("Connected to "+Hostname+":"+Port);
+               connectState.setText("Connected to " + Nodecall);
                input.setEditable(true);
                copy_menuitem.enable();
                Connected = true;
@@ -359,7 +364,7 @@ menubar.add(mailbox);
        public void disconnected() {
                Connected = false;
                connect_menuitem.setLabel("Connect");
-               connectState.setText("Disconnected from "+Hostname);
+               connectState.setText("Disconnected from " + Nodecall);
                input.setEditable(false);
                copy_menuitem.disable();
                paste_menuitem.disable();
@@ -386,10 +391,12 @@ menubar.add(mailbox);
        }
        
        public boolean action(Event evt, Object arg) {
-               Prefix =  "";
+               
+               Prefix =  ""; // Make sure that the following variables are empty !
                Call2 = "";
                Freq = "";
                Remarks = "";
+               
                if (evt.target instanceof MenuItem) {
                        if (arg.equals("Quit")) {
                                this.hide();
@@ -423,6 +430,8 @@ menubar.add(mailbox);
                                if (Connected) out.println("sh/c");
                        } else if (arg.equals("Show WWV")) {
                                if (Connected) out.println("sh/wwv");
+                       } else if (arg.equals("Show WCY")) {
+                               if (Connected) out.println("sh/wcy");
                        } else if (arg.equals("Show Beam Direction")) {
                                beam pp = new beam(this, Prefix, OutFont);
                                if ((Connected) && !(Prefix.equals(""))) out.println ("sh/heading " + Prefix );
@@ -467,7 +476,7 @@ menubar.add(mailbox);
                        
                        } else if (arg.equals("Set Locator")) {
                                beam pp = new beam(this, Prefix, OutFont);
-                               if ((Connected) && !(Prefix.equals(""))) out.println ("set/qra " + Prefix );
+                               if ((Connected) && !(Prefix.equals(""))) out.println ("set/qra " + Prefix );
                        
                        } else if (arg.equals("Set HomeNode")) {
                                beam pp = new beam(this, Prefix, OutFont);
@@ -489,7 +498,9 @@ menubar.add(mailbox);
                                dxannounce pp = new dxannounce(this, Call2, Freq, Remarks, OutFont);
                                if ((Connected) && !(Call2.equals(""))) out.println ("dx " + Freq + " " + Call2 + " " + Remarks );
                        }
+                       
                        // mailbox
+                       
                         else if (arg.equals("Last 10 Msgs")) {
                                if (Connected) out.println ("dir" );
                        } else if (arg.equals("Last 50 Msgs")) {
@@ -561,7 +572,7 @@ menubar.add(mailbox);
        private String Hostname = new String("localhost");
        private String Port = new String("3600");
        private String Channel = new String("0");
-
+       private String Nodecall = new String("nodecall");
 
         private String Prefix = new String ("");        
         private String Call2 = new String ("");