From 3cac94d6845cf6a075cf74d252705355fc6cc4ce Mon Sep 17 00:00:00 2001 From: Brendan Matteoli Date: Fri, 24 Apr 2020 16:46:47 -0400 Subject: [PATCH 1/2] project2 --- .classpath | 9 +++++++-- errorlog.txt | 0 history.txt | 0 src/wrestlingtournamentcli/DarkThemeChanges.css | 8 ++++++++ src/wrestlingtournamentcli/Main.java | 14 +++++++++++++- 5 files changed, 28 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 53e5234..b703667 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 @@ -496,6 +497,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 BorderPane soccerRoot = new BorderPane(); @@ -538,10 +540,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, 2, 4); introRoot.setCenter(introLayout); //Initializing introduction UI elements importTeams.setMinWidth(110); @@ -598,7 +603,7 @@ public void start(Stage stage) throws Exception { layout.add(Weight, 1, 10); layout.add(TotalWins, 1,11); layout.add(TotalMatch, 1, 12); - layout.add(start, 0, 6); + //layout.add(start, 0, 6); layout.add(compareWrestlers, 0, 7); layout.add( compareWrestlersTxt, 1, 7); @@ -618,6 +623,13 @@ public void start(Stage stage) throws Exception { Model soccerModel = new Model("soccer"); stage.setScene(soccerScene); }); + theme.setOnAction(e ->{ + if(theme.isSelected()) { + root.getStylesheets().add(getClass().getResource("DarkThemeChanges.css").toExternalForm()); + } else { + root.getStylesheets().remove(getClass().getResource("DarkThemeChanges.css").toExternalForm()); + } + }); viewTeams.setOnAction(e -> { ArrayList show = Model.printTeams(); for(int i = 0; i < show.size(); i++) { From e05370f4b568fe0f81342a9c4d316195805825e2 Mon Sep 17 00:00:00 2001 From: Brendan Matteoli Date: Fri, 24 Apr 2020 16:52:40 -0400 Subject: [PATCH 2/2] classpath revert --- .classpath | 9 ++------- 1 file changed, 2 insertions(+), 7 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