diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-16 13:55:19 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-16 13:55:19 +0100 |
| commit | fdcc6a15f3ef065f313233a9e00dfb44ea67406f (patch) | |
| tree | fd17cd62abac718e811ae14efe452bd00595c9f6 /IDE/src/main/java/org/elmahrouss/CodeEditorView.java | |
| parent | b46f68714d84d875b7894aca3877a87a4f04478c (diff) | |
meta: refactor IDE code.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'IDE/src/main/java/org/elmahrouss/CodeEditorView.java')
| -rw-r--r-- | IDE/src/main/java/org/elmahrouss/CodeEditorView.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/IDE/src/main/java/org/elmahrouss/CodeEditorView.java b/IDE/src/main/java/org/elmahrouss/CodeEditorView.java index e82fa59..441c654 100644 --- a/IDE/src/main/java/org/elmahrouss/CodeEditorView.java +++ b/IDE/src/main/java/org/elmahrouss/CodeEditorView.java @@ -20,13 +20,14 @@ import javafx.scene.paint.Color; /* * Editor view class */ -public class CodeEditorView extends Pane { +public class CodeEditorView extends Pane +{ private Pane linePane; private Label codeText; private boolean readOnly; private ConsoleWindow consoleWindow; private HBox codeBox; - private String filename = "untitled.c"; + private String fileName = "untitled.c"; CodeEditorView(boolean readOnly) { @@ -45,11 +46,11 @@ public class CodeEditorView extends Pane { linePane = new Pane(); - linePane.setStyle("-fx-background-color: #" + CodeEditorTheme.lineTheme); + linePane.setStyle("-fx-background-color: #" + CodeEditorTheme.LINE_THEME); linePane.setMinSize(52, 720); linePane.setMaxSize(52, 1080); - this.setStyle("-fx-background-color: #" + CodeEditorTheme.backgroundTheme); + this.setStyle("-fx-background-color: #" + CodeEditorTheme.BACKGROUND_THEME); this.setMinSize(1280, 720); this.setMaxSize(1920, 1080); @@ -70,14 +71,14 @@ public class CodeEditorView extends Pane { public void setReadOnly(Boolean readOnly) { this.readOnly = readOnly; } - public String getFilename() { return filename; } + public String getFilename() { return fileName; } - public void setFilename(String filename) + public void setFilename(String fileName) { if (readOnly) return; - this.filename = filename; + this.fileName = fileName; } public String getContents() { return codeText.getText(); } |
