diff --git a/collated/Sebastian Quek.md b/collated/Sebastian Quek.md
index d223472..c38cc53 100644
--- a/collated/Sebastian Quek.md
+++ b/collated/Sebastian Quek.md
@@ -1,11 +1,12 @@
# Sebastian Quek
-###### CommandBarController.java
+###### main\java\gui\CommandBarController.java
```java
public class CommandBarController extends TextField {
private static final String COMMAND_BAR_LAYOUT_FXML = "/main/resources/layouts/CommandBar.fxml";
+ private Logic logic;
- public CommandBarController() {
+ public CommandBarController(Logic logic) {
FXMLLoader loader = new FXMLLoader(getClass().getResource(COMMAND_BAR_LAYOUT_FXML));
loader.setController(this);
loader.setRoot(this);
@@ -14,21 +15,22 @@ public class CommandBarController extends TextField {
} catch (IOException e) {
e.printStackTrace();
}
+ this.logic = logic;
}
- public CommandBarController(String text) {
- this();
+ public CommandBarController(String text, Logic logic) {
+ this(logic);
this.setText(text);
this.selectAll();
}
@FXML
public void onKeyPress(KeyEvent event) {
- Logic.handleKeyPress(this, event.getCode(), this.getText());
+ logic.handleKeyPress(this, event.getCode(), this.getText());
}
}
```
-###### MainApp.java
+###### main\java\gui\MainApp.java
```java
public class MainApp extends Application {
@@ -48,10 +50,12 @@ public class MainApp extends Application {
public void start(Stage primaryStage) {
initRootLayout();
initPrimaryStage(primaryStage);
+
+ Logic logic = initLogic();
// Add components to RootLayout
- addCommandBar();
- addOverview();
+ addCommandBar(logic);
+ addOverview();
}
/**
@@ -77,17 +81,21 @@ public class MainApp extends Application {
this.primaryStage.setScene(new Scene(rootLayout));
this.primaryStage.show();
}
+
+ private Logic initLogic() {
+ return new Logic();
+ }
private void addOverview() {
rootLayout.setCenter(new OverviewLayoutController());
}
- private void addCommandBar() {
- rootLayout.setBottom(new CommandBarController(COMMAND_BAR_DEFAULT_TEXT));
+ private void addCommandBar(Logic logic) {
+ rootLayout.setBottom(new CommandBarController(COMMAND_BAR_DEFAULT_TEXT, logic));
}
}
```
-###### OverviewLayoutController.java
+###### main\java\gui\OverviewLayoutController.java
```java
public class OverviewLayoutController extends StackPane {
@FXML
@@ -126,3 +134,31 @@ public class OverviewLayoutController extends StackPane {
}
}
```
+###### main\resources\layouts\CommandBar.fxml
+```fxml
+
+```
+###### main\resources\layouts\Overview.fxml
+```fxml
+
+
+
+
+
+
+
+```
+###### main\resources\layouts\RootLayout.fxml
+```fxml
+
+```
+###### main\resources\styles\stylesheet.css
+```css
+
+#root {
+ -fx-padding: 10px;
+}
+```
diff --git a/src/main/resources/layouts/CommandBar.fxml b/src/main/resources/layouts/CommandBar.fxml
index ba25a31..b04fa3c 100644
--- a/src/main/resources/layouts/CommandBar.fxml
+++ b/src/main/resources/layouts/CommandBar.fxml
@@ -4,6 +4,6 @@
-
+
diff --git a/src/main/resources/layouts/Overview.fxml b/src/main/resources/layouts/Overview.fxml
index d6772dc..3ee7e12 100644
--- a/src/main/resources/layouts/Overview.fxml
+++ b/src/main/resources/layouts/Overview.fxml
@@ -5,6 +5,7 @@
+
diff --git a/src/main/resources/layouts/RootLayout.fxml b/src/main/resources/layouts/RootLayout.fxml
index 2a023f9..b3a6cf1 100644
--- a/src/main/resources/layouts/RootLayout.fxml
+++ b/src/main/resources/layouts/RootLayout.fxml
@@ -5,7 +5,7 @@
-
+
diff --git a/src/main/resources/styles/stylesheet.css b/src/main/resources/styles/stylesheet.css
index 2a50280..d35eee4 100644
--- a/src/main/resources/styles/stylesheet.css
+++ b/src/main/resources/styles/stylesheet.css
@@ -1,3 +1,5 @@
+/* @author Sebastian Quek */
+
#root {
-fx-padding: 10px;
}
\ No newline at end of file