diff --git a/src/FileSelectScreen.java b/src/FileSelectScreen.java index 839beaf80d5381a7642ec33291c216e2512b268e..600edc868150545a2a64be612e8cffa2262551fb 100644 --- a/src/FileSelectScreen.java +++ b/src/FileSelectScreen.java @@ -173,29 +173,28 @@ public class FileSelectScreen { Thread t = new Thread( () -> { QueryExecutor queryExecutor = new QueryExecutor(); - ArrayList<Button> buttonsList = getLogButtons(continueButton, selectLogButtons, removeLogButtons); - Platform.runLater(() -> attemptGoDataViewScreen(continueButton, buttonsList, queryExecutor)); + storeSelectedLogs(); + Platform.runLater(() -> attemptGoDataViewScreen(continueButton, queryExecutor, stackPane)); } ); t.start(); } - private void attemptGoDataViewScreen(Button continueButton, ArrayList<Button> buttonsList, QueryExecutor queryExecutor) { + private void attemptGoDataViewScreen(Button continueButton, QueryExecutor queryExecutor, StackPane stackPane) { Alert error = dbc.showAnyErrors(); if (error != null) { error.show(); - setDisable(false, buttonsList); continueButton.setText("Continue"); + stackPane.getChildren().remove(1); + stackPane.getChildren().get(0).setDisable(false); } else { - goToDataViewScreen(buttonsList, continueButton, queryExecutor); + goToDataViewScreen(continueButton, queryExecutor); } } - private void goToDataViewScreen(ArrayList<Button> buttons, Button continueButton, QueryExecutor qry_exec) { - setDisable(false, buttons); + private void goToDataViewScreen(Button continueButton, QueryExecutor qry_exec) { continueButton.setText("Continue"); - // open the next screen stage.setMinWidth(1200); stage.setMinHeight(700); @@ -204,24 +203,16 @@ public class FileSelectScreen { fontSizeHandler.updateFontSize(fontSizeHandler.DATA_VIEW_SCREEN); } - private ArrayList<Button> getLogButtons(Button continueButton, Button[] selectLogButtons, Button[] removeLogButtons) { - ArrayList<Button> buttonsList = new ArrayList<>(); - + private void storeSelectedLogs() { if (logsGiven[0]) { dbc.storeImpressionLog(logsPath[0]); - buttonsList.add(removeLogButtons[0]); } if (logsGiven[1]) { dbc.storeServerLog(logsPath[1]); - buttonsList.add(removeLogButtons[1]); } if (logsGiven[2]) { dbc.storeClickLog(logsPath[2]); - buttonsList.add(removeLogButtons[2]); } - buttonsList.addAll(Arrays.asList(continueButton, selectLogButtons[0], selectLogButtons[1], selectLogButtons[2])); - - return buttonsList; } // sets up the GridPane with valid properties diff --git a/stylesheets/stylesheet.css b/stylesheets/stylesheet.css index 2cecba1ea68a86f2a48cf99ee8ec54152b26fe3a..b1caa685d1d8a9890cbd6253eaafd74491a8c4b5 100644 --- a/stylesheets/stylesheet.css +++ b/stylesheets/stylesheet.css @@ -1,7 +1,8 @@ +/* .root { - -fx-base: rgb(220, 229, 242); - -fx-background: rgb(153, 203, 232); -} + -fx-base: rgb(247, 252, 252); + -fx-background: rgb(222, 227, 227); +}*/ /* .button {