Skip to content

Commit

Permalink
Fixes: Syntax sql fix, able to reopen it after disselecting, and cate…
Browse files Browse the repository at this point in the history
…gories appear with a little style.
  • Loading branch information
AdrianBalunan committed Apr 22, 2026
1 parent 3d48338 commit b9b2367
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ public void start(Stage stage) throws Exception {
stage.setFullScreen(true);

stage.show();
// Re-enter fullscreen when restored from taskbar
stage.iconifiedProperty().addListener((obs, wasIconified, isNowIconified) -> {
if (!isNowIconified) {
stage.setFullScreen(true);
}
});
}

@Override
Expand Down Expand Up @@ -78,9 +84,8 @@ public void init() {
*/

// Comment out the two below to use already generated database.
CharityRegistry charityRegistry = scraper.getAPIAndURLCharityData();

db.addAPIDataToTable(charityRegistry.getAllCharities());
//CharityRegistry charityRegistry = scraper.getAPIAndURLCharityData();
//db.addAPIDataToTable(charityRegistry.getAllCharities());
}
} catch (Exception e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ private void loadPage(){

for (String category : categories) {
CheckBox cb = new CheckBox(category);
cb.setStyle("-fx-font-size: 12; -fx-padding: 10 0 0 20; -fx-text-fill: black" );

cb.setOnAction(
e -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ public static void LoadScene(String sceneName, Stage stage, Charity charity, Str
stage.setScene(scene);
stage.setFullScreen(true);
stage.show();
// Re-enter fullscreen when restored from taskbar
stage.iconifiedProperty().addListener((obs, wasIconified, isNowIconified) -> {
if (!isNowIconified) {
stage.setFullScreen(true);
}
});
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public CharityRegistry getCharitiesFromDB() {
LEFT JOIN User u ON f.user_id = u.UUID_user
LEFT JOIN Charity_Categories cc ON cc.Charities_UUID_charities = c.UUID_charities
LEFT JOIN Categories cat ON cat.category_id = cc.Categories_category_id
INNER JOIN CharityVanity cv ON cv.UUID_charity = c.UUID_charities;
INNER JOIN CharityVanity cv ON cv.UUID_charity = c.UUID_charities
ORDER BY c.UUID_charities;
""";
Statement stmt = conn.createStatement();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<padding><Insets top="10.0" /></padding>
<children>
<!-- FILTER SIDEBAR -->
<VBox prefWidth="160.0"
<VBox fx:id="categoryList" prefWidth="160.0"
style="-fx-background-color: transparent; -fx-border-color: #2F8F8B; -fx-border-radius: 10; -fx-border-width: 2;">
<children>
<Label textFill="black" text="Categories:">
Expand Down

0 comments on commit b9b2367

Please sign in to comment.