=================================================================== RCS file: /home/cvs/OpenXM/src/OpenMath/PolyCalc.java,v retrieving revision 1.1.1.1 retrieving revision 1.4 diff -u -p -r1.1.1.1 -r1.4 --- OpenXM/src/OpenMath/PolyCalc.java 1999/11/02 11:52:34 1.1.1.1 +++ OpenXM/src/OpenMath/PolyCalc.java 1999/11/02 15:10:31 1.4 @@ -1,3 +1,7 @@ +/** + * $OpenXM: OpenXM/src/OpenMath/PolyCalc.java,v 1.3 1999/11/02 15:07:40 tam Exp $ + */ + import JP.ac.kobe_u.math.tam.OpenXM.*; import java.applet.*; import java.awt.*; @@ -91,20 +95,35 @@ class PolyCalc extends Applet{ add(poly2); } + + public void start(){ textarea.append("Connecting to "+ host +"("+ ControlPort +","+ DataPort +")\n"); try{ - oxm = new OpenXM("localhost",1200,1300); + oxm = new OpenXM(host,ControlPort,DataPort); + textarea.append("Connected.\n"); }catch(java.io.IOException e){ textarea.append("failed.\n"); stop(); - return; } - textarea.append("Connected.\n"); } + private static String usage(){ + String ret = ""; + + ret += "usage\t: java PolyCalc [options]\n"; + ret += "options\t:\n"; + ret += "\t -h \t show this message\n"; + ret += "\t -host hostname \t (default localhost)\n"; + ret += "\t -data port \t (default 1300)\n"; + ret += "\t -control port \t (default 1200)\n"; + + return ret; + } + + public static void main(String argv[]){ Frame frame = new Frame("Polynomial Calculator"); Applet applet; @@ -113,7 +132,7 @@ class PolyCalc extends Applet{ for(int i=0;i