From 0480c720e7e94ac0fb6111aaeea580bb9ea1b6de Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 30 Apr 2025 12:27:00 +0200 Subject: tie structural section to visual column in model class GUI --- .../com/example/portfolio2/GUI.java | 37 ++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) (limited to 'src/com.example.portfolio2/com/example/portfolio2/GUI.java') diff --git a/src/com.example.portfolio2/com/example/portfolio2/GUI.java b/src/com.example.portfolio2/com/example/portfolio2/GUI.java index e1f8fb3..8135ecb 100644 --- a/src/com.example.portfolio2/com/example/portfolio2/GUI.java +++ b/src/com.example.portfolio2/com/example/portfolio2/GUI.java @@ -12,6 +12,39 @@ public class GUI extends UI { // (declared explicitly only to silence javadoc) public GUI() { } - // TODO: extend with sections specific to graphical interface, - // e.g. widgets like statusbar or menu. + /// structural sections of user interface + public enum Section { + + /// main programme + PROGRAM("Program", 0), + + /// first subject module + SUBJECT1("Subject 1", 1), + + /// second subject module + SUBJECT2("Subject 2", 2), + + /// elective courses + ELECTIVE("Elective", 3); + + /// text label + public final String label; + + /// column position + public final int column; + + /// instantiation + /// + /// @param label text label + /// @param column column position + private Section(String label, int column) { + this.label = label; + this.column = column; + } + } + +/* public static UI.Section asUISection () { + return UI.Section.valueOf(this); + } +*/ } -- cgit v1.2.3