aboutsummaryrefslogtreecommitdiff
path: root/src/com.example.portfolio2/com/example/portfolio2/Controller.java
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-04-29 07:19:10 +0200
committerJonas Smedegaard <dr@jones.dk>2025-04-29 07:19:10 +0200
commit705b7a5a32793f7ed8a24b8b35afe3f9d49348be (patch)
tree7cffeb0de03a4638b87f04e01e7193eacbeaeede /src/com.example.portfolio2/com/example/portfolio2/Controller.java
parenta5c3599d7bc7a9ef5583ad2d50a55975f030fbea (diff)
tidy whitespace
Diffstat (limited to 'src/com.example.portfolio2/com/example/portfolio2/Controller.java')
-rw-r--r--src/com.example.portfolio2/com/example/portfolio2/Controller.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/com.example.portfolio2/com/example/portfolio2/Controller.java b/src/com.example.portfolio2/com/example/portfolio2/Controller.java
index a948809..036236f 100644
--- a/src/com.example.portfolio2/com/example/portfolio2/Controller.java
+++ b/src/com.example.portfolio2/com/example/portfolio2/Controller.java
@@ -12,7 +12,7 @@ import javafx.scene.control.TextArea;
import java.util.List;
/// Bachelorizer - Controller
-class Controller{
+class Controller {
/// Storage model
private Database store;
@@ -29,8 +29,9 @@ class Controller{
///
/// @param store Storage model
/// @param view Application view
- Controller(final Database store, final Window view){
- this.store = store; this.view = view;
+ Controller(final Database store, final Window view) {
+ this.store = store;
+ this.view = view;
}
/// callback when category box is selected
@@ -74,7 +75,7 @@ class Controller{
void onSubjectModuleSelected(final ComboBox<String> subject1, final ComboBox<String> subject2, final List<String> subjectModules) {
// Beautiful loop we've created to remove option chosen in one subject module box from the other
- for (String sub : subjectModules) {
+ for (String sub: subjectModules) {
if (sub.equals(subject1.getValue())) {
subject2.getItems().remove(subject1.getValue());
} else if (!sub.equals(subject1.getValue()) && !subject2.getItems().contains(sub)) {
@@ -99,7 +100,7 @@ class Controller{
/// @param textArea whole text area
void updateArea(final ComboBox<String> combo, final TextArea textArea) {
textArea.clear();
- for(String s : store.getParticipation(combo.getValue())) {
+ for (String s: store.getParticipation(combo.getValue())) {
textArea.appendText(s + "\n");
}
}
@@ -108,7 +109,7 @@ class Controller{
/// @param ectslabel text display area for ECTS points
/// @param comboBox involved activity box
void updateEcts(final Label ectslabel, final ComboBox<String> comboBox) {
- ectslabel.setText("ECTS: "+store.getSumEcts(comboBox.getValue()));
+ ectslabel.setText("ECTS: " + store.getSumEcts(comboBox.getValue()));
}
void fillElective(final ComboBox<String> electiveBox) {