Thread: [Mathlib-commitlog] SF.net SVN: mathlib:[584] JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
Status: Beta
Brought to you by:
st_mueller
|
From: <st_...@us...> - 2008-12-30 22:02:35
|
Revision: 584
http://mathlib.svn.sourceforge.net/mathlib/?rev=584&view=rev
Author: st_mueller
Date: 2008-12-30 22:02:27 +0000 (Tue, 30 Dec 2008)
Log Message:
-----------
first beta versin of text user interface
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
Modified: JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
===================================================================
--- JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2008-12-30 21:36:17 UTC (rev 583)
+++ JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2008-12-30 22:02:27 UTC (rev 584)
@@ -1,16 +1,12 @@
package jmathlib.ui.text;
import jmathlib.core.interpreter.*;
-import jmathlib.core.interfaces.RemoteAccesible;
+import jmathlib.core.interfaces.*;
import jmathlib.ui.common.Console;
-import java.awt.*;
-import java.awt.event.*;
-import java.applet.*;
import java.io.*;
-import java.util.Vector;
-public class textUI implements RemoteAccesible, MathLibOutput
+public class TextUI implements RemoteAccesible, MathLibOutput
{
/**store whether executing lines or entering a function def*/
private boolean interactiveMode;
@@ -27,14 +23,13 @@
/**stores the input stream*/
private DataInputStream input;
- public textUI()
+ public TextUI()
{
interactiveMode = true;
functionCode = "";
exiting = false;
interpreter = new Interpreter(true, null);
- interpreter.setOutputPanel((MathLibOutput)this);
- interpreter.setDebug(false);
+ interpreter.setOutputPanel(this);
input = new DataInputStream(System.in);
}
@@ -50,7 +45,7 @@
public static void main(String[] args)
{
- MathLibTUI tui = new MathLibTUI();
+ TextUI tui = new TextUI();
if(args.length == 0)
{
tui.run();
@@ -101,7 +96,7 @@
String answerString = "";
//process the function
- answerString = interpreter.readFunction(functionCode, true, false);
+ //answerString = interpreter.readFunction(functionCode, true, false);
interactiveMode = true;
@@ -114,6 +109,9 @@
}
}
+ /**
+ * method for the interpreter to display its outpout
+ */
public void displayText(String text)
{
System.out.println(text);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2008-12-31 18:01:21
|
Revision: 597
http://mathlib.svn.sourceforge.net/mathlib/?rev=597&view=rev
Author: st_mueller
Date: 2008-12-31 18:01:17 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
Modified: JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
===================================================================
--- JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2008-12-31 17:53:17 UTC (rev 596)
+++ JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2008-12-31 18:01:17 UTC (rev 597)
@@ -28,8 +28,11 @@
interactiveMode = true;
functionCode = "";
exiting = false;
+
interpreter = new Interpreter(true, null);
interpreter.setOutputPanel(this);
+ interpreter.executeExpression("startup");
+
input = new DataInputStream(System.in);
}
@@ -46,15 +49,13 @@
public static void main(String[] args)
{
TextUI tui = new TextUI();
- if(args.length == 0)
- {
- tui.run();
- }
- else
+ if(args.length != 0)
{
String filename = args[0];
tui.interpretLine(filename);
}
+
+ tui.run();
}
public void close()
@@ -76,17 +77,10 @@
}
else
{
- if(line.equalsIgnoreCase("exit") || line.equalsIgnoreCase("quit"))
- {
- close();
- }
- else
- {
String answerString = interpreter.executeExpression(line);
displayText(answerString);
displayPrompt();
- }
}
}
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-08 16:45:50
|
Revision: 833
http://mathlib.svn.sourceforge.net/mathlib/?rev=833&view=rev
Author: st_mueller
Date: 2009-02-08 16:45:39 +0000 (Sun, 08 Feb 2009)
Log Message:
-----------
removed applet-parameter from Interpreter-constructor
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
Modified: JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
===================================================================
--- JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2009-02-05 21:39:14 UTC (rev 832)
+++ JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2009-02-08 16:45:39 UTC (rev 833)
@@ -29,7 +29,7 @@
functionCode = "";
exiting = false;
- interpreter = new Interpreter(true, null);
+ interpreter = new Interpreter(true);
interpreter.setOutputPanel(this);
interpreter.executeExpression("startup");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-03-01 13:29:06
|
Revision: 899
http://mathlib.svn.sourceforge.net/mathlib/?rev=899&view=rev
Author: st_mueller
Date: 2009-03-01 13:29:03 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
use Console.java from jmathlib.ui.common
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
Modified: JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
===================================================================
--- JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2009-03-01 13:27:42 UTC (rev 898)
+++ JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2009-03-01 13:29:03 UTC (rev 899)
@@ -1,12 +1,21 @@
+/*
+ * This file is part or JMathLib
+ *
+ * Check it out at http://www.jmathlib.de
+ *
+ * Author: st...@he...
+ * (c) 2008-2009
+ */
package jmathlib.ui.text;
import jmathlib.core.interpreter.*;
-import jmathlib.core.interfaces.*;
-import jmathlib.ui.common.Console;
+import jmathlib.core.interfaces.RemoteAccessible;
+import jmathlib.core.interfaces.JMathLibOutput;
import java.io.*;
-public class TextUI implements RemoteAccesible, JMathLibOutput
+/** text GUI for JMathLib */
+public class TextUI implements RemoteAccessible, JMathLibOutput
{
/**store whether executing lines or entering a function def*/
private boolean interactiveMode;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|