aboutsummaryrefslogtreecommitdiff
path: root/src/com.example.portfolio2
diff options
context:
space:
mode:
Diffstat (limited to 'src/com.example.portfolio2')
-rw-r--r--src/com.example.portfolio2/com/example/portfolio2/Window.java22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/com.example.portfolio2/com/example/portfolio2/Window.java b/src/com.example.portfolio2/com/example/portfolio2/Window.java
index 2a92241..6977d6b 100644
--- a/src/com.example.portfolio2/com/example/portfolio2/Window.java
+++ b/src/com.example.portfolio2/com/example/portfolio2/Window.java
@@ -26,8 +26,20 @@ public final class Window extends Application {
// (declared explicitly only to silence javadoc)
public Window() { }
+ /// window width
+ private static final int WINDOW_WIDTH = 1000;
+
+ /// window height
+ private static final int WINDOW_HEIGHT = 500;
+
+ /// box width
+ private static final int LIST_WIDTH = 250;
+
+ /// box height
+ private static final int LIST_HEIGHT = 35;
+
/// Label styling
- public static final String LABEL_STYLE =
+ private static final String LABEL_STYLE =
"-fx-font-weight: bold;-fx-font-size: 18;-fx-padding: 10";
/// Storage model
@@ -56,9 +68,9 @@ public final class Window extends Application {
for (ActivityColumn col : columns) {
col.nameLabel.setStyle(LABEL_STYLE);
col.ectsLabel.setStyle(LABEL_STYLE);
- col.categoryCombo.setPrefSize(250, 35);
- col.activitySelect.setPrefSize(250, 35);
- col.area.setPrefWidth(250);
+ col.categoryCombo.setPrefSize(LIST_WIDTH, LIST_HEIGHT);
+ col.activitySelect.setPrefSize(LIST_WIDTH, LIST_HEIGHT);
+ col.area.setPrefWidth(LIST_WIDTH);
// all boxes share same activity logic
col.activitySelect.setOnAction(event -> {
@@ -102,7 +114,7 @@ public final class Window extends Application {
// define HBox and scene for columns
HBox root = new HBox(columns.get(0).asVBox(), columns.get(1).asVBox(), columns.get(2).asVBox(), columns.get(3).asVBox());
- Scene scene = new Scene(root, 1000, 500);
+ Scene scene = new Scene(root, WINDOW_WIDTH, WINDOW_HEIGHT);
stage.setTitle("Course Selector RUC: Ultimate Deluxe Edition");
stage.setScene(scene);
stage.show();