Automate switching between languages
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
package app.model;
|
||||
|
||||
import javafx.scene.Scene;
|
||||
|
||||
/**
|
||||
* Data model of the application
|
||||
* Data model of the application.
|
||||
*
|
||||
* Contains a static reference to state that has to be accessed
|
||||
* by multiple pieces in the application, including the primary scene.
|
||||
*/
|
||||
public class Model {
|
||||
private static String activeFilePath;
|
||||
private static String currentProjectPath;
|
||||
private static ProgrammingLanguage currentProgrammingLanguage;
|
||||
private static Scene scene;
|
||||
|
||||
public static String getActiveFilePath() {
|
||||
return activeFilePath;
|
||||
@@ -20,7 +26,15 @@ public class Model {
|
||||
return currentProgrammingLanguage;
|
||||
}
|
||||
|
||||
public static Scene getScene() {
|
||||
return scene;
|
||||
}
|
||||
|
||||
public static void setLanguage(ProgrammingLanguage language) {
|
||||
Model.currentProgrammingLanguage = language;
|
||||
}
|
||||
|
||||
public static void setScene(Scene scene) {
|
||||
Model.scene = scene;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user