diff --git a/app/build.gradle.kts b/app/build.gradle.kts index cbb139c..6ff8e86 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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") { diff --git a/app/src/main/java/expr/Add.java b/app/src/main/java/xl/expr/Add.java similarity index 94% rename from app/src/main/java/expr/Add.java rename to app/src/main/java/xl/expr/Add.java index ec8e6fb..8a68163 100644 --- a/app/src/main/java/expr/Add.java +++ b/app/src/main/java/xl/expr/Add.java @@ -1,4 +1,4 @@ -package expr; +package xl.expr; class Add extends BinaryExpr { diff --git a/app/src/main/java/expr/BinaryExpr.java b/app/src/main/java/xl/expr/BinaryExpr.java similarity index 98% rename from app/src/main/java/expr/BinaryExpr.java rename to app/src/main/java/xl/expr/BinaryExpr.java index 49cb462..85c9989 100644 --- a/app/src/main/java/expr/BinaryExpr.java +++ b/app/src/main/java/xl/expr/BinaryExpr.java @@ -1,4 +1,4 @@ -package expr; +package xl.expr; abstract class BinaryExpr extends Expr { diff --git a/app/src/main/java/expr/Div.java b/app/src/main/java/xl/expr/Div.java similarity index 89% rename from app/src/main/java/expr/Div.java rename to app/src/main/java/xl/expr/Div.java index b27ef43..e2b9def 100644 --- a/app/src/main/java/expr/Div.java +++ b/app/src/main/java/xl/expr/Div.java @@ -1,6 +1,6 @@ -package expr; +package xl.expr; -import util.XLException; +import xl.util.XLException; class Div extends BinaryExpr { diff --git a/app/src/main/java/expr/Environment.java b/app/src/main/java/xl/expr/Environment.java similarity index 81% rename from app/src/main/java/expr/Environment.java rename to app/src/main/java/xl/expr/Environment.java index eab570c..51a43b7 100644 --- a/app/src/main/java/expr/Environment.java +++ b/app/src/main/java/xl/expr/Environment.java @@ -1,4 +1,4 @@ -package expr; +package xl.expr; public interface Environment { diff --git a/app/src/main/java/expr/Expr.java b/app/src/main/java/xl/expr/Expr.java similarity index 98% rename from app/src/main/java/expr/Expr.java rename to app/src/main/java/xl/expr/Expr.java index 81499f5..7715418 100644 --- a/app/src/main/java/expr/Expr.java +++ b/app/src/main/java/xl/expr/Expr.java @@ -1,4 +1,4 @@ -package expr; +package xl.expr; /** * An Expr object represents a real valued expression that may contain variables. The diff --git a/app/src/main/java/expr/ExprParser.java b/app/src/main/java/xl/expr/ExprParser.java similarity index 99% rename from app/src/main/java/expr/ExprParser.java rename to app/src/main/java/xl/expr/ExprParser.java index a933265..f69465c 100644 --- a/app/src/main/java/expr/ExprParser.java +++ b/app/src/main/java/xl/expr/ExprParser.java @@ -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 ExprParser object is a parser provides a factory method for building Expr diff --git a/app/src/main/java/expr/Mul.java b/app/src/main/java/xl/expr/Mul.java similarity index 94% rename from app/src/main/java/expr/Mul.java rename to app/src/main/java/xl/expr/Mul.java index b5e2f24..2a5cffd 100644 --- a/app/src/main/java/expr/Mul.java +++ b/app/src/main/java/xl/expr/Mul.java @@ -1,4 +1,4 @@ -package expr; +package xl.expr; class Mul extends BinaryExpr { diff --git a/app/src/main/java/expr/Num.java b/app/src/main/java/xl/expr/Num.java similarity index 87% rename from app/src/main/java/expr/Num.java rename to app/src/main/java/xl/expr/Num.java index e724043..121b27f 100644 --- a/app/src/main/java/expr/Num.java +++ b/app/src/main/java/xl/expr/Num.java @@ -1,6 +1,6 @@ -package expr; +package xl.expr; -import util.NumberAdjustment; +import xl.util.NumberAdjustment; class Num extends Expr { diff --git a/app/src/main/java/expr/Sub.java b/app/src/main/java/xl/expr/Sub.java similarity index 94% rename from app/src/main/java/expr/Sub.java rename to app/src/main/java/xl/expr/Sub.java index 80d8141..7108153 100644 --- a/app/src/main/java/expr/Sub.java +++ b/app/src/main/java/xl/expr/Sub.java @@ -1,4 +1,4 @@ -package expr; +package xl.expr; class Sub extends BinaryExpr { diff --git a/app/src/main/java/expr/TestExpr.java b/app/src/main/java/xl/expr/TestExpr.java similarity index 98% rename from app/src/main/java/expr/TestExpr.java rename to app/src/main/java/xl/expr/TestExpr.java index 62765a3..e5b6b1f 100644 --- a/app/src/main/java/expr/TestExpr.java +++ b/app/src/main/java/xl/expr/TestExpr.java @@ -1,4 +1,4 @@ -package expr; +package xl.expr; import java.io.IOException; diff --git a/app/src/main/java/expr/Variable.java b/app/src/main/java/xl/expr/Variable.java similarity index 94% rename from app/src/main/java/expr/Variable.java rename to app/src/main/java/xl/expr/Variable.java index f96075e..b8d272f 100644 --- a/app/src/main/java/expr/Variable.java +++ b/app/src/main/java/xl/expr/Variable.java @@ -1,4 +1,4 @@ -package expr; +package xl.expr; class Variable extends Expr { diff --git a/app/src/main/java/gui/BorderPanel.java b/app/src/main/java/xl/gui/BorderPanel.java similarity index 93% rename from app/src/main/java/gui/BorderPanel.java rename to app/src/main/java/xl/gui/BorderPanel.java index 85c62e0..002580d 100644 --- a/app/src/main/java/gui/BorderPanel.java +++ b/app/src/main/java/xl/gui/BorderPanel.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import java.awt.BorderLayout; import java.awt.Color; diff --git a/app/src/main/java/gui/ColoredLabel.java b/app/src/main/java/xl/gui/ColoredLabel.java similarity index 96% rename from app/src/main/java/gui/ColoredLabel.java rename to app/src/main/java/xl/gui/ColoredLabel.java index 128f63a..408a33f 100644 --- a/app/src/main/java/gui/ColoredLabel.java +++ b/app/src/main/java/xl/gui/ColoredLabel.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import java.awt.Color; import javax.swing.JLabel; diff --git a/app/src/main/java/gui/CurrentLabel.java b/app/src/main/java/xl/gui/CurrentLabel.java similarity index 90% rename from app/src/main/java/gui/CurrentLabel.java rename to app/src/main/java/xl/gui/CurrentLabel.java index 525a488..68a78e2 100644 --- a/app/src/main/java/gui/CurrentLabel.java +++ b/app/src/main/java/xl/gui/CurrentLabel.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import java.awt.Color; diff --git a/app/src/main/java/gui/Editor.java b/app/src/main/java/xl/gui/Editor.java similarity index 91% rename from app/src/main/java/gui/Editor.java rename to app/src/main/java/xl/gui/Editor.java index ae7b4d8..1004b4d 100644 --- a/app/src/main/java/gui/Editor.java +++ b/app/src/main/java/xl/gui/Editor.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import java.awt.Color; import javax.swing.JTextField; diff --git a/app/src/main/java/gui/GridPanel.java b/app/src/main/java/xl/gui/GridPanel.java similarity index 94% rename from app/src/main/java/gui/GridPanel.java rename to app/src/main/java/xl/gui/GridPanel.java index b70ab60..a9ff152 100644 --- a/app/src/main/java/gui/GridPanel.java +++ b/app/src/main/java/xl/gui/GridPanel.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import java.awt.Color; import java.awt.GridLayout; diff --git a/app/src/main/java/gui/RowLabels.java b/app/src/main/java/xl/gui/RowLabels.java similarity index 95% rename from app/src/main/java/gui/RowLabels.java rename to app/src/main/java/xl/gui/RowLabels.java index 82a4b15..a2b909f 100644 --- a/app/src/main/java/gui/RowLabels.java +++ b/app/src/main/java/xl/gui/RowLabels.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import static java.awt.Color.LIGHT_GRAY; import static javax.swing.SwingConstants.RIGHT; diff --git a/app/src/main/java/gui/SheetPanel.java b/app/src/main/java/xl/gui/SheetPanel.java similarity index 94% rename from app/src/main/java/gui/SheetPanel.java rename to app/src/main/java/xl/gui/SheetPanel.java index 4f777e8..74ca92d 100644 --- a/app/src/main/java/gui/SheetPanel.java +++ b/app/src/main/java/xl/gui/SheetPanel.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import static java.awt.BorderLayout.CENTER; import static java.awt.BorderLayout.WEST; diff --git a/app/src/main/java/gui/SlotLabel.java b/app/src/main/java/xl/gui/SlotLabel.java similarity index 91% rename from app/src/main/java/gui/SlotLabel.java rename to app/src/main/java/xl/gui/SlotLabel.java index 5f26e9b..5807b19 100644 --- a/app/src/main/java/gui/SlotLabel.java +++ b/app/src/main/java/xl/gui/SlotLabel.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import java.awt.Color; diff --git a/app/src/main/java/gui/SlotLabels.java b/app/src/main/java/xl/gui/SlotLabels.java similarity index 98% rename from app/src/main/java/gui/SlotLabels.java rename to app/src/main/java/xl/gui/SlotLabels.java index 2423216..e1497d8 100644 --- a/app/src/main/java/gui/SlotLabels.java +++ b/app/src/main/java/xl/gui/SlotLabels.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import java.awt.Color; import java.util.ArrayList; diff --git a/app/src/main/java/gui/StatusLabel.java b/app/src/main/java/xl/gui/StatusLabel.java similarity index 95% rename from app/src/main/java/gui/StatusLabel.java rename to app/src/main/java/xl/gui/StatusLabel.java index c902879..03389eb 100644 --- a/app/src/main/java/gui/StatusLabel.java +++ b/app/src/main/java/xl/gui/StatusLabel.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import java.awt.Color; import java.util.Observable; diff --git a/app/src/main/java/gui/StatusPanel.java b/app/src/main/java/xl/gui/StatusPanel.java similarity index 94% rename from app/src/main/java/gui/StatusPanel.java rename to app/src/main/java/xl/gui/StatusPanel.java index 2c31617..a6087bf 100644 --- a/app/src/main/java/gui/StatusPanel.java +++ b/app/src/main/java/xl/gui/StatusPanel.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import static java.awt.BorderLayout.CENTER; import static java.awt.BorderLayout.WEST; diff --git a/app/src/main/java/gui/XL.java b/app/src/main/java/xl/gui/XL.java similarity index 86% rename from app/src/main/java/gui/XL.java rename to app/src/main/java/xl/gui/XL.java index 80f0b07..d4c3e69 100644 --- a/app/src/main/java/gui/XL.java +++ b/app/src/main/java/xl/gui/XL.java @@ -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()); } } diff --git a/app/src/main/java/gui/XLCounter.java b/app/src/main/java/xl/gui/XLCounter.java similarity index 92% rename from app/src/main/java/gui/XLCounter.java rename to app/src/main/java/xl/gui/XLCounter.java index 7bf609a..7bcf68b 100644 --- a/app/src/main/java/gui/XLCounter.java +++ b/app/src/main/java/xl/gui/XLCounter.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; public class XLCounter { diff --git a/app/src/main/java/gui/XLList.java b/app/src/main/java/xl/gui/XLList.java similarity index 97% rename from app/src/main/java/gui/XLList.java rename to app/src/main/java/xl/gui/XLList.java index 7a937ef..7018072 100644 --- a/app/src/main/java/gui/XLList.java +++ b/app/src/main/java/xl/gui/XLList.java @@ -1,4 +1,4 @@ -package gui; +package xl.gui; import java.util.ArrayList; import java.util.Iterator; diff --git a/app/src/main/java/gui/menu/ClearAllMenuItem.java b/app/src/main/java/xl/gui/menu/ClearAllMenuItem.java similarity index 94% rename from app/src/main/java/gui/menu/ClearAllMenuItem.java rename to app/src/main/java/xl/gui/menu/ClearAllMenuItem.java index ca9a04c..dce2215 100644 --- a/app/src/main/java/gui/menu/ClearAllMenuItem.java +++ b/app/src/main/java/xl/gui/menu/ClearAllMenuItem.java @@ -1,4 +1,4 @@ -package gui.menu; +package xl.gui.menu; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; diff --git a/app/src/main/java/gui/menu/ClearMenuItem.java b/app/src/main/java/xl/gui/menu/ClearMenuItem.java similarity index 94% rename from app/src/main/java/gui/menu/ClearMenuItem.java rename to app/src/main/java/xl/gui/menu/ClearMenuItem.java index f3e85a8..c1954f9 100644 --- a/app/src/main/java/gui/menu/ClearMenuItem.java +++ b/app/src/main/java/xl/gui/menu/ClearMenuItem.java @@ -1,4 +1,4 @@ -package gui.menu; +package xl.gui.menu; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; diff --git a/app/src/main/java/gui/menu/CloseMenuItem.java b/app/src/main/java/xl/gui/menu/CloseMenuItem.java similarity index 91% rename from app/src/main/java/gui/menu/CloseMenuItem.java rename to app/src/main/java/xl/gui/menu/CloseMenuItem.java index ebb1225..4373217 100644 --- a/app/src/main/java/gui/menu/CloseMenuItem.java +++ b/app/src/main/java/xl/gui/menu/CloseMenuItem.java @@ -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 { diff --git a/app/src/main/java/gui/menu/LoadMenuItem.java b/app/src/main/java/xl/gui/menu/LoadMenuItem.java similarity index 86% rename from app/src/main/java/gui/menu/LoadMenuItem.java rename to app/src/main/java/xl/gui/menu/LoadMenuItem.java index a8ccfb3..c833104 100644 --- a/app/src/main/java/gui/menu/LoadMenuItem.java +++ b/app/src/main/java/xl/gui/menu/LoadMenuItem.java @@ -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 { diff --git a/app/src/main/java/gui/menu/NewMenuItem.java b/app/src/main/java/xl/gui/menu/NewMenuItem.java similarity index 90% rename from app/src/main/java/gui/menu/NewMenuItem.java rename to app/src/main/java/xl/gui/menu/NewMenuItem.java index c5cc4cc..ae2aeb9 100644 --- a/app/src/main/java/gui/menu/NewMenuItem.java +++ b/app/src/main/java/xl/gui/menu/NewMenuItem.java @@ -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 { diff --git a/app/src/main/java/gui/menu/OpenMenuItem.java b/app/src/main/java/xl/gui/menu/OpenMenuItem.java similarity index 95% rename from app/src/main/java/gui/menu/OpenMenuItem.java rename to app/src/main/java/xl/gui/menu/OpenMenuItem.java index a3c14a5..39c3f88 100644 --- a/app/src/main/java/gui/menu/OpenMenuItem.java +++ b/app/src/main/java/xl/gui/menu/OpenMenuItem.java @@ -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 { diff --git a/app/src/main/java/gui/menu/SaveMenuItem.java b/app/src/main/java/xl/gui/menu/SaveMenuItem.java similarity index 86% rename from app/src/main/java/gui/menu/SaveMenuItem.java rename to app/src/main/java/xl/gui/menu/SaveMenuItem.java index 169a08e..84b5807 100644 --- a/app/src/main/java/gui/menu/SaveMenuItem.java +++ b/app/src/main/java/xl/gui/menu/SaveMenuItem.java @@ -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 { diff --git a/app/src/main/java/gui/menu/WindowMenu.java b/app/src/main/java/xl/gui/menu/WindowMenu.java similarity index 89% rename from app/src/main/java/gui/menu/WindowMenu.java rename to app/src/main/java/xl/gui/menu/WindowMenu.java index 2b8b375..8b5073f 100644 --- a/app/src/main/java/gui/menu/WindowMenu.java +++ b/app/src/main/java/xl/gui/menu/WindowMenu.java @@ -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 { diff --git a/app/src/main/java/gui/menu/WindowMenuItem.java b/app/src/main/java/xl/gui/menu/WindowMenuItem.java similarity index 91% rename from app/src/main/java/gui/menu/WindowMenuItem.java rename to app/src/main/java/xl/gui/menu/WindowMenuItem.java index 0ffd3d8..afa6d29 100644 --- a/app/src/main/java/gui/menu/WindowMenuItem.java +++ b/app/src/main/java/xl/gui/menu/WindowMenuItem.java @@ -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 { diff --git a/app/src/main/java/gui/menu/XLMenuBar.java b/app/src/main/java/xl/gui/menu/XLMenuBar.java similarity index 87% rename from app/src/main/java/gui/menu/XLMenuBar.java rename to app/src/main/java/xl/gui/menu/XLMenuBar.java index 25bed14..cbbf837 100644 --- a/app/src/main/java/gui/menu/XLMenuBar.java +++ b/app/src/main/java/xl/gui/menu/XLMenuBar.java @@ -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 { diff --git a/app/src/main/java/util/Adjustment.java b/app/src/main/java/xl/util/Adjustment.java similarity index 99% rename from app/src/main/java/util/Adjustment.java rename to app/src/main/java/xl/util/Adjustment.java index 96b06f0..c3e6003 100644 --- a/app/src/main/java/util/Adjustment.java +++ b/app/src/main/java/xl/util/Adjustment.java @@ -1,4 +1,4 @@ -package util; +package xl.util; /** * Adjustment.java Created: Tue Oct 24 2005 diff --git a/app/src/main/java/util/NumberAdjustment.java b/app/src/main/java/xl/util/NumberAdjustment.java similarity index 99% rename from app/src/main/java/util/NumberAdjustment.java rename to app/src/main/java/xl/util/NumberAdjustment.java index 5e5db88..e77b721 100644 --- a/app/src/main/java/util/NumberAdjustment.java +++ b/app/src/main/java/xl/util/NumberAdjustment.java @@ -1,4 +1,4 @@ -package util; +package xl.util; /** * NumberAdjustment.java Created: Mon OTue 24 2005 diff --git a/app/src/main/java/util/XLBufferedReader.java b/app/src/main/java/xl/util/XLBufferedReader.java similarity index 97% rename from app/src/main/java/util/XLBufferedReader.java rename to app/src/main/java/xl/util/XLBufferedReader.java index 308b223..34ce774 100644 --- a/app/src/main/java/util/XLBufferedReader.java +++ b/app/src/main/java/xl/util/XLBufferedReader.java @@ -1,4 +1,4 @@ -package util; +package xl.util; import java.io.BufferedReader; import java.io.FileNotFoundException; diff --git a/app/src/main/java/util/XLException.java b/app/src/main/java/xl/util/XLException.java similarity index 88% rename from app/src/main/java/util/XLException.java rename to app/src/main/java/xl/util/XLException.java index 76cb9ea..ef70535 100644 --- a/app/src/main/java/util/XLException.java +++ b/app/src/main/java/xl/util/XLException.java @@ -1,4 +1,4 @@ -package util; +package xl.util; public class XLException extends RuntimeException { diff --git a/app/src/main/java/util/XLPrintStream.java b/app/src/main/java/xl/util/XLPrintStream.java similarity index 97% rename from app/src/main/java/util/XLPrintStream.java rename to app/src/main/java/xl/util/XLPrintStream.java index 1490357..8ff5525 100644 --- a/app/src/main/java/util/XLPrintStream.java +++ b/app/src/main/java/xl/util/XLPrintStream.java @@ -1,4 +1,4 @@ -package util; +package xl.util; import java.io.FileNotFoundException; import java.io.PrintStream;