]> dxcluster.org Git - spider.git/commitdiff
Add updates to the java client from Rene, OZ1LQH
authorg0vgs <g0vgs>
Tue, 31 Dec 2002 12:22:44 +0000 (12:22 +0000)
committerg0vgs <g0vgs>
Tue, 31 Dec 2002 12:22:44 +0000 (12:22 +0000)
12 files changed:
Changes
spider-web/StreamListener.class
spider-web/beam.class
spider-web/beam.java
spider-web/dxannounce.class
spider-web/dxannounce.java
spider-web/idleTime.class
spider-web/setDate.class
spider-web/spiderclient.class
spider-web/spiderclient.java
spider-web/spiderframe.class
spider-web/spiderframe.java

diff --git a/Changes b/Changes
index 8a4971f702955cfef79276122b494e3f6d347733..430db59a0be0f04a6121e1864ec4c24eed0f06d0 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,5 @@
+31Dec02=======================================================================
+1. Update files in the java client with fixes and additions from Rene, OZ1LQH
 05Dec02=======================================================================
 1. Fix SSID issues with AGWMsg.
 2. updated show/hftable, vhftable, hfstats, vhfstats and dxstats after K1XX
index a22ce617bec915ec4ed4eb45ed58d79b927c52a1..272484b627757487da293ed0b92f682613f826a0 100644 (file)
Binary files a/spider-web/StreamListener.class and b/spider-web/StreamListener.class differ
index 2a2d393dea02f7e81dad46ab7ad6dd695b36d60d..7b475e47ec78b8b323b5212a785cf493c3cccf16 100644 (file)
Binary files a/spider-web/beam.class and b/spider-web/beam.class differ
index d73417b4c7ebf3cb3ca64f047b939f8cf8ee6c5d..7184f3b4d4a2a74fd9e194e0202c5663e9b1385a 100755 (executable)
@@ -6,7 +6,8 @@ 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));
                p1.add(new Label("Enter Your Choice (Call/Prefix/Other) "));
@@ -26,7 +27,6 @@ public class beam extends Dialog
                if (arg.equals("OK")) {
                        dispose();
                        parent.setPrefix(prefix.getText());
-                       
                }
                else if (arg.equals("Cancel")) {
                        dispose();
index 0b02b4c9e76f92cd37c30aa16e790618351f485c..6e9ab84714874b519ffcc0cc059d977a90490ba1 100644 (file)
Binary files a/spider-web/dxannounce.class and b/spider-web/dxannounce.class differ
index 163c8fad027bb0388e4399e8c9386cc2ebb717cd..c4c833f554cf4cb175b289fd76d4277e36ff08d5 100755 (executable)
@@ -7,8 +7,9 @@ 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));
@@ -25,10 +26,6 @@ public class dxannounce extends Dialog
                // p3.add(freq = new TextField(Remarks,30));
                // add("Center",p3);
 
-
-
-
-
                Panel p2 = new Panel();
                p2.add(new Button("OK"));
                p2.add(new Button("Cancel"));
@@ -36,7 +33,6 @@ public class dxannounce extends Dialog
                
                resize(250,150);
                
-               
                show();
        }
        
@@ -46,12 +42,8 @@ public class dxannounce extends Dialog
                        parent.setCall2(call2.getText());
                        parent.setFreq(freq.getText());
                        parent.setRemarks(remarks.getText());
-                       
-
-
                }
 
-
                else if (arg.equals("Cancel")) {
                        dispose();
                }
index 174de88005a14e07a255405001c817afab3b7a7a..c15111e2902791a72d7e8e6f0bbe18b6c9d589a1 100644 (file)
Binary files a/spider-web/idleTime.class and b/spider-web/idleTime.class differ
index 0e31ec32e3fdd587605afe9f265c6ac8d67ccb8d..c15643801d80a35fb962cf135ea50a9f82c43490 100644 (file)
Binary files a/spider-web/setDate.class and b/spider-web/setDate.class differ
index 4d45a246520f52b62fb36c0f2cce18f2104229d1..d2ad6457a061810a75f4dc0e9c9707cf8441ead5 100644 (file)
Binary files a/spider-web/spiderclient.class and b/spider-web/spiderclient.class differ
index d47fa93164a51fee6d8ff7441ff520434885913a..87e487c09c1ad027415a8bfa0ee4410af98424b8 100755 (executable)
@@ -15,8 +15,8 @@ public class spiderclient extends Applet {
                p = getParameter("CALL");
                if (p != null) cf.setCall(p);
                
-        p = getParameter("PASSWORD");
-        if (p != null) cf.setPassword(p);
+               p = getParameter("PASSWORD");
+               if (p != null) cf.setPassword(p);
         
                p = getParameter("FULLNAME");
                if (p != null) cf.setFullname(p);
index a4b83833143e7407bb6d4b11c9d1c923cdb7636a..dd34ecd6c3194bceb8b76c3d73f80f93abed5328 100644 (file)
Binary files a/spider-web/spiderframe.class and b/spider-web/spiderframe.class differ
index 6f6f60c2675331f3147ebfed4710ff4bee252606..f3ee2f3b9b36b3809e7f393c6e0114f19cea08cb 100755 (executable)
@@ -56,11 +56,14 @@ menubar.add(show);
 
                set = new Menu("Settings");
                set.add(new MenuItem("Set Beep"));
+               set.add(new MenuItem("Set No Beep"));
                set.add(new MenuItem("Set QTH / City"));
                set.add(new MenuItem("Set Name"));
                set.add(new MenuItem("Set Locator"));
                set.add(new MenuItem("Set HomeNode"));
-        set.add(new MenuItem("Show Personal Settings"));
+               set.add(new MenuItem("Set DX-Grid"));
+               set.add(new MenuItem("Set No DX-Grid"));
+               set.add(new MenuItem("Show Personal Settings"));
 menubar.add(set); 
 
 
@@ -77,10 +80,6 @@ menubar.add(mailbox);
 
 
 
-
-
-
-
                this.setMenuBar(menubar);
 
                setLayout(new BorderLayout());
@@ -143,100 +142,90 @@ menubar.add(mailbox);
                gbc.gridheight = h;
                gbl.setConstraints(c, gbc);
                p.add(c);
-       }
+               }
 
        public void setColors() {
                output.setBackground(OutBackgroundColor);
                output.setForeground(OutForegroundColor);
                input.setBackground(InBackgroundColor);
                input.setForeground(InForegroundColor);
-       }
+               }
        
        public void setFonts() {
                output.setFont(OutFont);
                input.setFont(InFont);
-       }
+               }
        
        public void initPrintStream(PrintStream out) {
                this.out = out;
-       }
+               }
        
        public void setText(String s) {
                int i;
                
-                for (i=0; i < s.length(); i++) {
+               for (i=0; i < s.length(); i++) {
                        if (s.charAt(i) == '\007')
                                parent.beep();
-                }
+               }
                output.appendText(s +'\n');
-                idle.resetTimer();
-       }
+               idle.resetTimer();
+               }
        
        public void setCall(String s) {
                Call = s;
-       }
+               }
 
-    public void setPassword(String s) {
-        Password = s ;
-    }
+       public void setPassword(String s) {
+               Password = s ;
+               }
 
        public void setPrefix(String s) {
                Prefix = s;
                }
-       
-       
-
+               
        public void setCall2(String s) {
                Call2 = s;
                }
        
-      public void setFreq(String s) {
+       public void setFreq(String s) {
                Freq = s;
                }
        
-
-      public void setRemarks(String s) {
+       public void setRemarks(String s) {
                Remarks = s;
                }
        
-
-
-       
        public void setTime(String s) {
                DateLabel.setText(s);
-       }
+               }
 
        public void setIdle(String s) {
                IdleLabel.setText(s);
-       }
+               }
        
        public String getCall() {
                return Call;
-       }
+               }
        
-    public String getPassword() {
-        return Password;
-    }
+        public String getPassword() {
+               return Password;
+               }
     
        public String setPrefix(){
-              return Prefix;
-              }
+               return Prefix;
+               }
        
        public String setCall2(){
-              return Call2;
-              }
+               return Call2;
+               }
        
        public String setFreq(){
-              return Freq;
-              }
+               return Freq;
+               }
        
        public String setRemarks(){
-              return Remarks;
-              }
-       
-       
-       
-       
+               return Remarks;
+               }
        
        public void setFullname(String s) {
                Fullname = s;
@@ -244,35 +233,35 @@ menubar.add(mailbox);
                        connect_menuitem.disable();
                else
                        connect_menuitem.enable();
-       }
+               }
        
        public String getFullname() {
                return Fullname;
-       }
+               }
        
        public void setHostname(String s) {
                Hostname = s;
-       }
+               }
                
        public String getHostname() {
                return Hostname;
-       }
+               }
        
        public void setPort(String s) {
                Port = s;
-       }
+               }
        
        public String getPort() {
                return Port;
-       }
+               }
 
        public void setChannel(String s) {
                Channel = s;
-       }
+               }
        
        public String getChannel() {
                return Channel;
-       }
+               }
        
 //     public void login() {
 //             PersonalPreferences pp = new PersonalPreferences(this, Call, Fullname, OutFont);
@@ -280,27 +269,20 @@ menubar.add(mailbox);
        
        public void antrichtung () {
                beam pp = new beam (this, Prefix,OutFont);
-       }
+               }
        
-               public void dxannounce () {
-               dxannounce pp = new dxannounce (this, Call2, Freq, Remarks, OutFont);
-       }
+//             public void dxannounce () {
+//             dxannounce pp = new dxannounce (this, Call2, Freq, Remarks, OutFont);
+//     }
        
 
-       
-       
-       
-               
        public boolean handleEvent(Event evt) {
                if (evt.id == Event.KEY_PRESS) {
                        if (evt.key == '\n') {
                                
-                               
-                               
                                idle.resetTimer();
                                output.appendText(input.getText()+'\n');
                                out.println(input.getText());
-                                               
 
                                if (MaxInputPos < 255) {
                                        InputPos++;                     
@@ -334,11 +316,9 @@ menubar.add(mailbox);
                                else {
                                        input.setText("");      
                                }
-                               
                        } 
                        return true;
                }
-               
                return super.handleEvent(evt);
        }
 
@@ -406,6 +386,10 @@ menubar.add(mailbox);
        }
        
        public boolean action(Event evt, Object arg) {
+               Prefix =  "";
+               Call2 = "";
+               Freq = "";
+               Remarks = "";
                if (evt.target instanceof MenuItem) {
                        if (arg.equals("Quit")) {
                                this.hide();
@@ -441,82 +425,80 @@ menubar.add(mailbox);
                                if (Connected) out.println("sh/wwv");
                        } else if (arg.equals("Show Beam Direction")) {
                                beam pp = new beam(this, Prefix, OutFont);
-                               if (Connected) out.println ("sh/heading " + Prefix );
+                               if ((Connected) && !(Prefix.equals(""))) out.println ("sh/heading " + Prefix );
                        } else if (arg.equals("Search DX")) {
                                beam pp = new beam(this, Prefix, OutFont);
-                               if (Connected) out.println ("sh/dx " + Prefix );
+                               if ((Connected) && !(Prefix.equals(""))) out.println ("sh/dx " + Prefix );
                        
                        } else if (arg.equals("Search QSL Info")) {
                                beam pp = new beam(this, Prefix, OutFont);
-                               if (Connected) out.println ("sh/qsl " + Prefix );
+                               if ((Connected) && !(Prefix.equals(""))) out.println ("sh/qsl " + Prefix );
                         
 
                        } else if (arg.equals("Search Address")) {
                                beam pp = new beam(this, Prefix, OutFont);
-                               if (Connected) out.println ("sh/qrz " + Prefix );
+                               if ((Connected) && !(Prefix.equals(""))) out.println ("sh/qrz " + Prefix );
                        
 
                        } else if (arg.equals("Search QSL Manager")) {
                                beam pp = new beam(this, Prefix, OutFont);
-                               if (Connected) out.println ("sh/qsl " + Prefix );
+                               if ((Connected) && !(Prefix.equals(""))) out.println ("sh/qsl " + Prefix );
                        
 
                        } else if (arg.equals("Search DXCC")) {
                                beam pp = new beam(this, Prefix, OutFont);
-                               if (Connected) out.println ("sh/pr " + Prefix );
+                               if ((Connected) && !(Prefix.equals(""))) out.println ("sh/pr " + Prefix );
                        
                        // button settings
 
                        } else if (arg.equals("Set Beep")) {
                                if (Connected) out.println("set/beep");
                        
-                       }else if (arg.equals("Set QTH / City")) {
-                               beam pp = new beam(this, Prefix, OutFont);
-                               if (Connected) out.println ("set/qth " + Prefix );
+                       } else if (arg.equals("Set No Beep")) {
+                               if (Connected) out.println("set/nobeep");
                        
-
-                       }else if (arg.equals("Set Name")) {
+                       } else if (arg.equals("Set QTH / City")) {
                                beam pp = new beam(this, Prefix, OutFont);
-                               if (Connected) out.println ("set/name " + Prefix );
+                               if ((Connected) && !(Prefix.equals(""))) out.println ("set/qth " + Prefix );
+                               
+                       } else if (arg.equals("Set Name")) {
+                               beam pp = new beam(this, Prefix, OutFont);
+                               if ((Connected) && !(Prefix.equals(""))) out.println ("set/name " + Prefix );
                        
-                       }
-                       else if (arg.equals("Set Locator")) {
+                       } else if (arg.equals("Set Locator")) {
                                beam pp = new beam(this, Prefix, OutFont);
-                               if (Connected) out.println ("set/qra " + Prefix );
+                               if ((Connected) && !(Prefix.equals(""))) out.println ("set/qra " + Prefix );
                        
-                       }
-                       else if (arg.equals("Set HomeNode")) {
-                               if (Connected) out.println ("set/homenode " + Prefix );
+                       } else if (arg.equals("Set HomeNode")) {
+                               beam pp = new beam(this, Prefix, OutFont);
+                               if ((Connected) && !(Prefix.equals(""))) out.println ("set/homenode " + Prefix );
 
-            }
-                       else if (arg.equals("Show Personal Settings")) {
-                               if (Connected) out.println ("sh/sta " + Call );
+                       } else if (arg.equals("Set DX-Grid")) {
+                               if (Connected) out.println("set/dxgrid");
                        
+                       } else if (arg.equals("Set No DX-Grid")) {
+                               if (Connected) out.println("set/nodxgrid");
+                       
+                       } else if (arg.equals("Show Personal Settings")) {
+                               if (Connected) out.println ("sh/sta " + Call );
                        }
 
                        // dx announce
 
                        else if (arg.equals("DXannounce")) {
                                dxannounce pp = new dxannounce(this, Call2, Freq, Remarks, OutFont);
-                               if (Connected) out.println ("dx " + Freq + " " + Call2 + " " + Remarks );
-       
+                               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")) {
+                       } else if (arg.equals("Last 50 Msgs")) {
                                if (Connected) out.println ("dir/50" );
-                        }
-                        else if (arg.equals("New Messages")) {
+                       } else if (arg.equals("New Messages")) {
                                if (Connected) out.println ("dir/new" );
-                        }
-                        else if (arg.equals("Own Messages")) {
+                       } else if (arg.equals("Own Messages")) {
                                if (Connected) out.println ("dir/own" );
-                        }
-                               
-
-
+                       }                       
                        else return false;
                }
                else if (evt.target instanceof Button) {
@@ -529,10 +511,8 @@ menubar.add(mailbox);
                                        parent.dodisconnect();
                                } else return false;
                        }
-               
                        else return false;
                }
-               
                return true;
        }
 
@@ -566,8 +546,8 @@ menubar.add(mailbox);
        private Label connectState = new Label("not connected");
        
  
-       private Color OutBackgroundColor = new Color(0,0,66);
-       private Color OutForegroundColor = new Color(255,255,0);
+       private Color OutBackgroundColor = Color.black;
+       private Color OutForegroundColor = Color.yellow;
        private Color OutOwnColor = Color.red;
        private Color InBackgroundColor = new Color(234,199,135);
        private Color InForegroundColor = Color.red;
@@ -589,11 +569,6 @@ menubar.add(mailbox);
         private String Remarks = new String ("");        
 
 
-
-
-
-
-
        private PrintStream out = null;
        
        private String InputBuffer[] = new String[256];
@@ -605,7 +580,6 @@ menubar.add(mailbox);
        private boolean Connected;
        
        private spiderclient parent;
-
 }
 
 class setDate extends Thread {
@@ -624,12 +598,9 @@ class setDate extends Thread {
                        cf.setTime(today.toLocaleString());
                }
        }
-       
        private Date today = new Date();
-       
 }
 
-
 class idleTime extends Thread {
 
        spiderframe cf;
@@ -646,7 +617,6 @@ class idleTime extends Thread {
        }
 
        public void run() {
-               
                for(;;) {
                        try { sleep(1000); } catch (InterruptedException e) {}
                        count++;