-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
422 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
package logiledus; | ||
|
||
import javafx.application.HostServices; | ||
import javafx.scene.Scene; | ||
|
||
public class Mediator{ | ||
|
||
private HostServices hostServices; | ||
private AppPreferences preferences; | ||
private Scene scene; | ||
|
||
public static Mediator getInstance(){ return MediatorHolder.INSTANCE; } | ||
|
||
public void setHostServices(HostServices hostServices){ this.hostServices = hostServices; } | ||
public void setPreferences(AppPreferences preferences){ this.preferences = preferences; } | ||
public void setScene(Scene scene){ this.scene = scene; } | ||
|
||
private static class MediatorHolder{ | ||
private static final Mediator INSTANCE = new Mediator(); | ||
} | ||
|
||
public HostServices getHostServices() { return hostServices; } | ||
public AppPreferences getPreferences() { return preferences; } | ||
|
||
public void setTheme(String themeString){ | ||
scene.getStylesheets().remove(0); | ||
scene.getStylesheets().add(themeString); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.