summaryrefslogtreecommitdiff
path: root/src/MetadataView.java
diff options
context:
space:
mode:
authorArghKevin <kagheli@student.sdccd.edu>2024-05-25 19:00:13 -0700
committerArghKevin <kagheli@student.sdccd.edu>2024-05-25 19:00:13 -0700
commite1fa91563afe8ea44a715508249b1027e83f2bcb (patch)
tree4b595ee869c4b6b9a26c7495f0fafd514de7d641 /src/MetadataView.java
parenta5efa4b382a8526ce541a910c9df53a195f5f919 (diff)
Implmented interactive buttons.
Diffstat (limited to 'src/MetadataView.java')
-rw-r--r--src/MetadataView.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/MetadataView.java b/src/MetadataView.java
new file mode 100644
index 0000000..5837aca
--- /dev/null
+++ b/src/MetadataView.java
@@ -0,0 +1,35 @@
+import javax.swing.JTextArea;
+import java.awt.*;
+
+/*
+ * @author
+ * Kian Agheli
+ *
+ * References:
+ * https://docs.oracle.com/javase/tutorial/uiswing/components/textarea.html
+ *
+ * Date:
+ * 2024-05-25
+ *
+ * Purpose of class:
+ * Provide an area to show metadata.
+ */
+
+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" +
+ "Each color corresponds with a line on the graph to the right.\n" +
+ "The graph tracks monthly views.";
+
+ public MetadataView() {
+ super(); // Call parent constructor
+ setEditable(false); // Disable editing of the widget.
+ setFocusable(false); // Disable focusing of the widget.
+ setText(defaultText); // Set to the default text.
+ }
+
+ /* Reset the MetadataView. Set the text to the default. */
+ public void reset() {
+ setText(defaultText);
+ }
+}