aboutsummaryrefslogtreecommitdiff
path: root/src/com.example.portfolio2/com/example/portfolio2/Controller.java
diff options
context:
space:
mode:
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) {