From f2ab466a586d4f9482e92c0248c96150de13a2a7 Mon Sep 17 00:00:00 2001 From: ArghKevin Date: Sat, 25 May 2024 20:51:17 -0700 Subject: Finalize README and program comments in preparation for submission. --- src/CSVReader.java | 1 + src/ComparisonView.java | 2 +- src/FamilyButton.java | 1 + src/FamilyButtonListener.java | 2 ++ src/JSONReader.java | 1 + src/MetadataView.java | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/CSVReader.java b/src/CSVReader.java index 62e7845..fe7d18b 100644 --- a/src/CSVReader.java +++ b/src/CSVReader.java @@ -16,6 +16,7 @@ import java.util.Arrays; * Read from and interpret CSV files. */ +// CSVReader is a reader public class CSVReader extends Reader { private String[] header; // A CSV file has-a header. One line, multiple fields. // Array of HashMaps. Headers are keys, values are on each line of the CSV following the header. diff --git a/src/ComparisonView.java b/src/ComparisonView.java index 636cd18..c74de02 100644 --- a/src/ComparisonView.java +++ b/src/ComparisonView.java @@ -30,7 +30,7 @@ public class ComparisonView extends JFrame { private Font textFont; // A ComparisonView has a preferred text font private Font buttonFont; // A ComparisonView has a preferred button font private final int TEXT_SIZE = 20; // A ComparisonView has a constant text size. - private FamilyButton buttons[]; // A ComparisonView has an array of buttons. + private FamilyButton[] buttons; // A ComparisonView has an array of buttons. private final int BUTTON_MAX = 10; // A ComparisonView has a set maximum number of buttons. /** diff --git a/src/FamilyButton.java b/src/FamilyButton.java index 994e848..0bef3df 100644 --- a/src/FamilyButton.java +++ b/src/FamilyButton.java @@ -14,6 +14,7 @@ import javax.swing.JToggleButton; * Provide an interative button to toggle FontFamily metadata. */ +// FamilyButton is a JToggleButton public class FamilyButton extends JToggleButton { private FontFamily family; // A FamilyButton has-a font family diff --git a/src/FamilyButtonListener.java b/src/FamilyButtonListener.java index 95a4bc4..906b349 100644 --- a/src/FamilyButtonListener.java +++ b/src/FamilyButtonListener.java @@ -12,6 +12,8 @@ import java.awt.event.*; * Purpose of class: * Listen for state changes in an instantiation of FamilyButton. */ + +// FamilyButtonListener is an ItemListener public class FamilyButtonListener implements ItemListener { private MetadataView metadataView; // A FamilyButtonListener has a metadataView diff --git a/src/JSONReader.java b/src/JSONReader.java index 4cc72ad..6f0bbdb 100644 --- a/src/JSONReader.java +++ b/src/JSONReader.java @@ -21,6 +21,7 @@ import java.io.*; * Read from and interpret JSON files. */ +// JSONReader is a Reader public class JSONReader extends Reader { /* metadata.pb is not exactly JSON, but so close to it that it's practically a subset of JSON with fewer quotation diff --git a/src/MetadataView.java b/src/MetadataView.java index 5837aca..46cfd24 100644 --- a/src/MetadataView.java +++ b/src/MetadataView.java @@ -15,6 +15,7 @@ import java.awt.*; * Provide an area to show metadata. */ +// MetadataView is a JTextArea public class MetadataView extends JTextArea { // A MetadataView has-a default text. private final String defaultText = "Toggle a font family using a colorful button below.\n" + -- cgit v1.2.3