Complete reset to original sources

This commit is contained in:
Imbus 2024-06-03 18:44:49 +02:00
parent acbfa9bda4
commit 7879178b1a
41 changed files with 61 additions and 63 deletions

View file

@ -37,7 +37,7 @@ java {
application { application {
// Define the main class for the application. // Define the main class for the application.
mainClass.set("gui.XL") mainClass.set("xl.gui.XL")
} }
tasks.named<Test>("test") { tasks.named<Test>("test") {

View file

@ -1,4 +1,4 @@
package expr; package xl.expr;
class Add extends BinaryExpr { class Add extends BinaryExpr {

View file

@ -1,4 +1,4 @@
package expr; package xl.expr;
abstract class BinaryExpr extends Expr { abstract class BinaryExpr extends Expr {

View file

@ -1,6 +1,6 @@
package expr; package xl.expr;
import util.XLException; import xl.util.XLException;
class Div extends BinaryExpr { class Div extends BinaryExpr {

View file

@ -1,4 +1,4 @@
package expr; package xl.expr;
public interface Environment { public interface Environment {

View file

@ -1,4 +1,4 @@
package expr; package xl.expr;
/** /**
* An <code>Expr</code> object represents a real valued expression that may contain variables. The * An <code>Expr</code> object represents a real valued expression that may contain variables. The

View file

@ -1,11 +1,11 @@
package expr; package xl.expr;
import java.io.IOException; import java.io.IOException;
import java.io.Reader; import java.io.Reader;
import java.io.StreamTokenizer; import java.io.StreamTokenizer;
import java.io.StringReader; import java.io.StringReader;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import util.XLException; import xl.util.XLException;
/** /**
* An <code>ExprParser</code> object is a parser provides a factory method for building <code>Expr * An <code>ExprParser</code> object is a parser provides a factory method for building <code>Expr

View file

@ -1,4 +1,4 @@
package expr; package xl.expr;
class Mul extends BinaryExpr { class Mul extends BinaryExpr {

View file

@ -1,6 +1,6 @@
package expr; package xl.expr;
import util.NumberAdjustment; import xl.util.NumberAdjustment;
class Num extends Expr { class Num extends Expr {

View file

@ -1,4 +1,4 @@
package expr; package xl.expr;
class Sub extends BinaryExpr { class Sub extends BinaryExpr {

View file

@ -1,4 +1,4 @@
package expr; package xl.expr;
import java.io.IOException; import java.io.IOException;

View file

@ -1,4 +1,4 @@
package expr; package xl.expr;
class Variable extends Expr { class Variable extends Expr {

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import java.awt.Color; import java.awt.Color;
import javax.swing.JLabel; import javax.swing.JLabel;

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import java.awt.Color; import java.awt.Color;

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import java.awt.Color; import java.awt.Color;
import javax.swing.JTextField; import javax.swing.JTextField;

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import java.awt.Color; import java.awt.Color;
import java.awt.GridLayout; import java.awt.GridLayout;

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import static java.awt.Color.LIGHT_GRAY; import static java.awt.Color.LIGHT_GRAY;
import static javax.swing.SwingConstants.RIGHT; import static javax.swing.SwingConstants.RIGHT;

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import static java.awt.BorderLayout.CENTER; import static java.awt.BorderLayout.CENTER;
import static java.awt.BorderLayout.WEST; import static java.awt.BorderLayout.WEST;

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import java.awt.Color; import java.awt.Color;

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import java.awt.Color; import java.awt.Color;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import java.awt.Color; import java.awt.Color;
import java.util.Observable; import java.util.Observable;

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import static java.awt.BorderLayout.CENTER; import static java.awt.BorderLayout.CENTER;
import static java.awt.BorderLayout.WEST; import static java.awt.BorderLayout.WEST;

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import static java.awt.BorderLayout.CENTER; import static java.awt.BorderLayout.CENTER;
import static java.awt.BorderLayout.NORTH; import static java.awt.BorderLayout.NORTH;
@ -6,8 +6,7 @@ import static java.awt.BorderLayout.SOUTH;
import javax.swing.JFrame; import javax.swing.JFrame;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities; import xl.gui.menu.XLMenuBar;
import gui.menu.XLMenuBar;
public class XL extends JFrame { public class XL extends JFrame {
@ -45,7 +44,6 @@ public class XL extends JFrame {
} }
public static void main(String[] args) { public static void main(String[] args) {
// Run on the Event Dispatch Thread new XL(new XLList(), new XLCounter());
SwingUtilities.invokeLater(() -> new XL(new XLList(), new XLCounter()));
} }
} }

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
public class XLCounter { public class XLCounter {

View file

@ -1,4 +1,4 @@
package gui; package xl.gui;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;

View file

@ -1,4 +1,4 @@
package gui.menu; package xl.gui.menu;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;

View file

@ -1,4 +1,4 @@
package gui.menu; package xl.gui.menu;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;

View file

@ -1,10 +1,10 @@
package gui.menu; package xl.gui.menu;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import javax.swing.JMenuItem; import javax.swing.JMenuItem;
import gui.XL; import xl.gui.XL;
import gui.XLList; import xl.gui.XLList;
class CloseMenuItem extends JMenuItem implements ActionListener { class CloseMenuItem extends JMenuItem implements ActionListener {

View file

@ -1,9 +1,9 @@
package gui.menu; package xl.gui.menu;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import javax.swing.JFileChooser; import javax.swing.JFileChooser;
import gui.StatusLabel; import xl.gui.StatusLabel;
import gui.XL; import xl.gui.XL;
class LoadMenuItem extends OpenMenuItem { class LoadMenuItem extends OpenMenuItem {

View file

@ -1,9 +1,9 @@
package gui.menu; package xl.gui.menu;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import javax.swing.JMenuItem; import javax.swing.JMenuItem;
import gui.XL; import xl.gui.XL;
class NewMenuItem extends JMenuItem implements ActionListener { class NewMenuItem extends JMenuItem implements ActionListener {

View file

@ -1,4 +1,4 @@
package gui.menu; package xl.gui.menu;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -8,8 +8,8 @@ import javax.swing.JFileChooser;
import javax.swing.JMenuItem; import javax.swing.JMenuItem;
import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter; import javax.swing.filechooser.FileNameExtensionFilter;
import gui.StatusLabel; import xl.gui.StatusLabel;
import gui.XL; import xl.gui.XL;
public abstract class OpenMenuItem extends JMenuItem implements ActionListener { public abstract class OpenMenuItem extends JMenuItem implements ActionListener {

View file

@ -1,9 +1,9 @@
package gui.menu; package xl.gui.menu;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import javax.swing.JFileChooser; import javax.swing.JFileChooser;
import gui.StatusLabel; import xl.gui.StatusLabel;
import gui.XL; import xl.gui.XL;
class SaveMenuItem extends OpenMenuItem { class SaveMenuItem extends OpenMenuItem {

View file

@ -1,10 +1,10 @@
package gui.menu; package xl.gui.menu;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import javax.swing.JMenu; import javax.swing.JMenu;
import gui.XL; import xl.gui.XL;
import gui.XLList; import xl.gui.XLList;
public class WindowMenu extends JMenu implements Observer { public class WindowMenu extends JMenu implements Observer {

View file

@ -1,9 +1,9 @@
package gui.menu; package xl.gui.menu;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import javax.swing.JMenuItem; import javax.swing.JMenuItem;
import gui.XL; import xl.gui.XL;
class WindowMenuItem extends JMenuItem implements ActionListener { class WindowMenuItem extends JMenuItem implements ActionListener {

View file

@ -1,10 +1,10 @@
package gui.menu; package xl.gui.menu;
import javax.swing.JMenu; import javax.swing.JMenu;
import javax.swing.JMenuBar; import javax.swing.JMenuBar;
import gui.StatusLabel; import xl.gui.StatusLabel;
import gui.XL; import xl.gui.XL;
import gui.XLList; import xl.gui.XLList;
public class XLMenuBar extends JMenuBar { public class XLMenuBar extends JMenuBar {

View file

@ -1,4 +1,4 @@
package util; package xl.util;
/** /**
* Adjustment.java Created: Tue Oct 24 2005 * Adjustment.java Created: Tue Oct 24 2005

View file

@ -1,4 +1,4 @@
package util; package xl.util;
/** /**
* NumberAdjustment.java Created: Mon OTue 24 2005 * NumberAdjustment.java Created: Mon OTue 24 2005

View file

@ -1,4 +1,4 @@
package util; package xl.util;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;

View file

@ -1,4 +1,4 @@
package util; package xl.util;
public class XLException extends RuntimeException { public class XLException extends RuntimeException {

View file

@ -1,4 +1,4 @@
package util; package xl.util;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.PrintStream; import java.io.PrintStream;