From d2be7e844050dd58c85c6f49217be48c0ec36c63 Mon Sep 17 00:00:00 2001 From: Brendan Matteoli Date: Wed, 15 Apr 2020 00:59:50 -0400 Subject: [PATCH 1/3] fixing project2 --- .classpath | 9 +++++++-- errorlog.txt | 0 history.txt | 0 src/wrestlingtournamentcli/DarkThemeChanges.css | 8 ++++++++ src/wrestlingtournamentcli/Main.java | 15 ++++++++++++++- 5 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 errorlog.txt create mode 100644 history.txt create mode 100644 src/wrestlingtournamentcli/DarkThemeChanges.css diff --git a/.classpath b/.classpath index 6817fa1..950320e 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,11 @@ - + + + + + + - \ No newline at end of file + diff --git a/errorlog.txt b/errorlog.txt new file mode 100644 index 0000000..e69de29 diff --git a/history.txt b/history.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/wrestlingtournamentcli/DarkThemeChanges.css b/src/wrestlingtournamentcli/DarkThemeChanges.css new file mode 100644 index 0000000..dd2bf5d --- /dev/null +++ b/src/wrestlingtournamentcli/DarkThemeChanges.css @@ -0,0 +1,8 @@ +.root { + -fx-base: #3f474f; + -fx-accent: #e7eff7 ; + -fx-default-button: #7f878f ; + -fx-focus-color: #efefef; + -fx-focused-text-base-color : ladder(-fx-selection-bar, -fx-light-text-color 40%, -fx-dark-text-color 40%, -fx-dark-text-color 60%, + -fx-mid-text-color 60%); +} \ No newline at end of file diff --git a/src/wrestlingtournamentcli/Main.java b/src/wrestlingtournamentcli/Main.java index 33d6acc..6718786 100644 --- a/src/wrestlingtournamentcli/Main.java +++ b/src/wrestlingtournamentcli/Main.java @@ -25,6 +25,7 @@ import javafx.stage.FileChooser; import javafx.stage.Stage; import javafx.scene.control.Tooltip; +import javafx.scene.control.ToggleButton; /** * @author Jared Murphy * @author Cody Francis @@ -497,6 +498,7 @@ public void start(Stage stage) throws Exception { GridPane introLayout = new GridPane(); Button wrestling = new Button(); Button soccer = new Button(); + ToggleButton theme = new ToggleButton(); Label introMenu = new Label("Please select the sport you would like to manage:"); //UI elements for selection Screen @@ -540,10 +542,13 @@ public void start(Stage stage) throws Exception { wrestling.setPadding(new Insets(10,10,10,10)); soccer.setText("Soccer"); soccer.setPadding(new Insets(10,10,10,10)); + theme.setText("Theme"); + theme.setPadding(new Insets(10,10,10,10)); introLayout.setPadding(new Insets(300,100,100,100)); introLayout.add(introMenu, 0, 0); introLayout.add(wrestling, 2,3 ); introLayout.add(soccer, 3, 3); + introLayout.add(theme, 4, 3); introRoot.setCenter(introLayout); //Initializing introduction UI elements @@ -616,7 +621,15 @@ public void start(Stage stage) throws Exception { stage.setScene(soccerScene); }); - + theme.setOnAction(e -> { + + if(!(theme.isSelected())) { + root.getStylesheets().remove(getClass().getResource("DarkThemeChanges.css").toExternalForm()); + } else { + root.getStylesheets().add(getClass().getResource("DarkThemeChanges.css").toExternalForm()); + } + + }); viewTeams.setOnAction(e -> { From 912e7c1d94f2147d68a4ee374d6815620ed38232 Mon Sep 17 00:00:00 2001 From: Brendan Matteoli Date: Wed, 15 Apr 2020 01:12:28 -0400 Subject: [PATCH 2/3] fixing project2-classpathRevert --- .classpath | 9 ++------- src/wrestlingtournamentcli/Main.java | 9 +++++---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.classpath b/.classpath index 950320e..6817fa1 100644 --- a/.classpath +++ b/.classpath @@ -1,11 +1,6 @@ - - - - - - + - + \ No newline at end of file diff --git a/src/wrestlingtournamentcli/Main.java b/src/wrestlingtournamentcli/Main.java index 6718786..e91b02c 100644 --- a/src/wrestlingtournamentcli/Main.java +++ b/src/wrestlingtournamentcli/Main.java @@ -548,7 +548,7 @@ public void start(Stage stage) throws Exception { introLayout.add(introMenu, 0, 0); introLayout.add(wrestling, 2,3 ); introLayout.add(soccer, 3, 3); - introLayout.add(theme, 4, 3); + introLayout.add(theme, 2, 4); introRoot.setCenter(introLayout); //Initializing introduction UI elements @@ -623,10 +623,11 @@ public void start(Stage stage) throws Exception { }); theme.setOnAction(e -> { - if(!(theme.isSelected())) { - root.getStylesheets().remove(getClass().getResource("DarkThemeChanges.css").toExternalForm()); - } else { + if(theme.isSelected()) { root.getStylesheets().add(getClass().getResource("DarkThemeChanges.css").toExternalForm()); + + } else { + root.getStylesheets().remove(getClass().getResource("DarkThemeChanges.css").toExternalForm()); } }); From 88f18e0b5ef175dc0e5944d2f8277074ff578c10 Mon Sep 17 00:00:00 2001 From: Brendan Matteoli Date: Fri, 24 Apr 2020 16:24:50 -0400 Subject: [PATCH 3/3] small test edit --- .classpath | 9 +++++++-- src/wrestlingtournamentcli/Main.java | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.classpath b/.classpath index 6817fa1..950320e 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,11 @@ - + + + + + + - \ No newline at end of file + diff --git a/src/wrestlingtournamentcli/Main.java b/src/wrestlingtournamentcli/Main.java index e91b02c..e14d5ae 100644 --- a/src/wrestlingtournamentcli/Main.java +++ b/src/wrestlingtournamentcli/Main.java @@ -590,7 +590,7 @@ public void start(Stage stage) throws Exception { layout.add(viewWrestlers, 0, 2); layout.add(save, 0, 5); layout.add(saveTournament, 1, 5); - layout.add(start, 0, 6); + //layout.add(start, 0, 6); layout.add(compareWrestlers, 0, 7);