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 {
// Define the main class for the application.
mainClass.set("gui.XL")
mainClass.set("xl.gui.XL")
}
tasks.named<Test>("test") {

View file

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

View file

@ -1,4 +1,4 @@
package expr;
package xl.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 {

View file

@ -1,4 +1,4 @@
package expr;
package xl.expr;
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

View file

@ -1,11 +1,11 @@
package expr;
package xl.expr;
import java.io.IOException;
import java.io.Reader;
import java.io.StreamTokenizer;
import java.io.StringReader;
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

View file

@ -1,4 +1,4 @@
package expr;
package xl.expr;
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 {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
package gui;
package xl.gui;
import static java.awt.Color.LIGHT_GRAY;
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.WEST;

View file

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

View file

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

View file

@ -1,4 +1,4 @@
package gui;
package xl.gui;
import java.awt.Color;
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.WEST;

View file

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

View file

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

View file

@ -1,4 +1,4 @@
package gui;
package xl.gui;
import java.util.ArrayList;
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.ActionListener;

View file

@ -1,4 +1,4 @@
package gui.menu;
package xl.gui.menu;
import java.awt.event.ActionEvent;
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.ActionListener;
import javax.swing.JMenuItem;
import gui.XL;
import gui.XLList;
import xl.gui.XL;
import xl.gui.XLList;
class CloseMenuItem extends JMenuItem implements ActionListener {

View file

@ -1,9 +1,9 @@
package gui.menu;
package xl.gui.menu;
import java.io.FileNotFoundException;
import javax.swing.JFileChooser;
import gui.StatusLabel;
import gui.XL;
import xl.gui.StatusLabel;
import xl.gui.XL;
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.ActionListener;
import javax.swing.JMenuItem;
import gui.XL;
import xl.gui.XL;
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.ActionListener;
@ -8,8 +8,8 @@ import javax.swing.JFileChooser;
import javax.swing.JMenuItem;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
import gui.StatusLabel;
import gui.XL;
import xl.gui.StatusLabel;
import xl.gui.XL;
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 javax.swing.JFileChooser;
import gui.StatusLabel;
import gui.XL;
import xl.gui.StatusLabel;
import xl.gui.XL;
class SaveMenuItem extends OpenMenuItem {

View file

@ -1,10 +1,10 @@
package gui.menu;
package xl.gui.menu;
import java.util.Observable;
import java.util.Observer;
import javax.swing.JMenu;
import gui.XL;
import gui.XLList;
import xl.gui.XL;
import xl.gui.XLList;
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.ActionListener;
import javax.swing.JMenuItem;
import gui.XL;
import xl.gui.XL;
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.JMenuBar;
import gui.StatusLabel;
import gui.XL;
import gui.XLList;
import xl.gui.StatusLabel;
import xl.gui.XL;
import xl.gui.XLList;
public class XLMenuBar extends JMenuBar {

View file

@ -1,4 +1,4 @@
package util;
package xl.util;
/**
* 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

View file

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

View file

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

View file

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