summaryrefslogtreecommitdiffstats
path: root/src/de/fhswf
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/fhswf')
-rw-r--r--src/de/fhswf/in/inf/se/notepadMinusMinus/Main.java2
-rw-r--r--src/de/fhswf/in/inf/se/notepadMinusMinus/model/Grades.java75
-rw-r--r--src/de/fhswf/in/inf/se/notepadMinusMinus/view/MainView.fxml7
-rw-r--r--src/de/fhswf/in/inf/se/notepadMinusMinus/view/MainViewController.java37
4 files changed, 1 insertions, 120 deletions
diff --git a/src/de/fhswf/in/inf/se/notepadMinusMinus/Main.java b/src/de/fhswf/in/inf/se/notepadMinusMinus/Main.java
index c154f3f..93b4b79 100644
--- a/src/de/fhswf/in/inf/se/notepadMinusMinus/Main.java
+++ b/src/de/fhswf/in/inf/se/notepadMinusMinus/Main.java
@@ -176,8 +176,6 @@ public class Main extends Application
Grades wrapper = (Grades) um.unmarshal(file);
grades.setGrades(wrapper.getGrades());
- grades.setColloquium(wrapper.getColloquium());
- grades.setThesis(wrapper.getThesis());
// Save the file path to the registry.
setGradesFilePath(file);
diff --git a/src/de/fhswf/in/inf/se/notepadMinusMinus/model/Grades.java b/src/de/fhswf/in/inf/se/notepadMinusMinus/model/Grades.java
index 18622cd..d5c4b6f 100644
--- a/src/de/fhswf/in/inf/se/notepadMinusMinus/model/Grades.java
+++ b/src/de/fhswf/in/inf/se/notepadMinusMinus/model/Grades.java
@@ -1,15 +1,10 @@
package de.fhswf.in.inf.se.notepadMinusMinus.model;
-import java.math.BigDecimal;
import java.util.List;
-import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import javafx.beans.property.ObjectProperty;
-import javafx.beans.property.Property;
-import javafx.beans.property.SimpleObjectProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@@ -25,12 +20,6 @@ public class Grades
ObservableList<Grade> grades = FXCollections
.observableArrayList(Grade.extractor());
- private ObjectProperty<BigDecimal> thesis = new SimpleObjectProperty<>(
- new BigDecimal("0.0"));
-
- private ObjectProperty<BigDecimal> colloquium = new SimpleObjectProperty<>(
- new BigDecimal("0.0"));
-
/**
* Get the {@link Grades} as a {@link List}.
*
@@ -64,68 +53,4 @@ public class Grades
return grades;
}
- /**
- * Get the thesis grade {@link Property}.
- *
- * @return The {@link Property} grade of the thesis.
- */
- public final ObjectProperty<BigDecimal> thesisProperty()
- {
- return this.thesis;
- }
-
- /**
- * Set the grade of the thesis.
- *
- * @return The grade of the thesis.
- */
- @XmlAttribute(name = "thesis")
- public final BigDecimal getThesis()
- {
- return this.thesisProperty().get();
- }
-
- /**
- * Set the grade of the thesis.
- *
- * @param thesis
- * The new grade of the thesis.
- */
- public final void setThesis(final BigDecimal thesis)
- {
- this.thesisProperty().set(thesis);
- }
-
- /**
- * Get the colloquium grade {@link Property}.
- *
- * @return The colloquium grade {@link Property}.
- */
- public final ObjectProperty<BigDecimal> colloquiumProperty()
- {
- return this.colloquium;
- }
-
- /**
- * Get the colloquium grade.
- *
- * @return The colloquium grade.
- */
- @XmlAttribute(name = "colloquium")
- public final BigDecimal getColloquium()
- {
- return this.colloquiumProperty().get();
- }
-
- /**
- * Set the colloquium grade.
- *
- * @param colloquium
- * The new colloquium grade.
- */
- public final void setColloquium(final BigDecimal colloquium)
- {
- this.colloquiumProperty().set(colloquium);
- }
-
}
diff --git a/src/de/fhswf/in/inf/se/notepadMinusMinus/view/MainView.fxml b/src/de/fhswf/in/inf/se/notepadMinusMinus/view/MainView.fxml
index 513a551..3ea8fec 100644
--- a/src/de/fhswf/in/inf/se/notepadMinusMinus/view/MainView.fxml
+++ b/src/de/fhswf/in/inf/se/notepadMinusMinus/view/MainView.fxml
@@ -7,7 +7,7 @@
<?import javafx.scene.layout.*?>
<?import javafx.scene.layout.BorderPane?>
-<BorderPane prefHeight="300.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.fhswf.in.inf.se.notepadMinusMinus.view.MainViewController">
+<BorderPane prefHeight="300.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/8.0.121" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.fhswf.in.inf.se.notepadMinusMinus.view.MainViewController">
<top>
<MenuBar BorderPane.alignment="CENTER">
<menus>
@@ -76,7 +76,6 @@
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
- <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="ECTS:" />
@@ -85,10 +84,6 @@
<Label fx:id="averageGradeLabel" text="0,00" GridPane.columnIndex="3" />
<Button mnemonicParsing="false" onAction="#handleNewValue" text="Neu" GridPane.columnIndex="4" />
<Button fx:id="deleteButton" disable="true" mnemonicParsing="false" onAction="#handleDeleteValue" text="Löschen" GridPane.columnIndex="5" />
- <Label text="Bachelor&#10;Arbeit" GridPane.rowIndex="1" />
- <ComboBox fx:id="thesisComboBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="1" />
- <Label text="Kolloquium" GridPane.columnIndex="3" GridPane.rowIndex="1" />
- <ComboBox fx:id="colloquiumComboBox" prefWidth="150.0" GridPane.columnIndex="4" GridPane.columnSpan="2" GridPane.rowIndex="1" />
</children>
<opaqueInsets>
<Insets />
diff --git a/src/de/fhswf/in/inf/se/notepadMinusMinus/view/MainViewController.java b/src/de/fhswf/in/inf/se/notepadMinusMinus/view/MainViewController.java
index da9aba1..abbb20a 100644
--- a/src/de/fhswf/in/inf/se/notepadMinusMinus/view/MainViewController.java
+++ b/src/de/fhswf/in/inf/se/notepadMinusMinus/view/MainViewController.java
@@ -11,7 +11,6 @@ import javafx.application.Platform;
import javafx.collections.ListChangeListener.Change;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
-import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableColumn.SortType;
@@ -55,18 +54,8 @@ public class MainViewController
@FXML
private Button deleteButton;
- @FXML
- private ComboBox<BigDecimal> colloquiumComboBox;
-
- @FXML
- private ComboBox<BigDecimal> thesisComboBox;
-
private Main main;
- private final int ectsThesis = 12;
-
- private final int ectsColloquium = 3;
-
/**
* Initializes the generated MainView.
*
@@ -116,9 +105,6 @@ public class MainViewController
deleteButton.disableProperty().bind(gradeTable.getSelectionModel()
.selectedIndexProperty().lessThan(0));
- thesisComboBox.setItems(Grade.gradeValuesProperty());
- colloquiumComboBox.setItems(Grade.gradeValuesProperty());
-
// Sort Table on JavaFX Application Thread
Platform.runLater(() -> {
semesterColumn.setSortType(SortType.ASCENDING);
@@ -139,17 +125,8 @@ public class MainViewController
this.main = main;
gradeTable.setItems(main.getGradesObject().gradesProperty());
- thesisComboBox.valueProperty()
- .bindBidirectional(main.getGradesObject().colloquiumProperty());
- colloquiumComboBox.valueProperty()
- .bindBidirectional(main.getGradesObject().thesisProperty());
-
gradeTable.getItems().addListener((
Change<? extends Grade> change) -> calculateEctsAndAverageGrade());
- thesisComboBox.valueProperty()
- .addListener((change) -> calculateEctsAndAverageGrade());
- colloquiumComboBox.valueProperty()
- .addListener((change) -> calculateEctsAndAverageGrade());
}
/**
@@ -188,8 +165,6 @@ public class MainViewController
if (main != null)
{
gradeTable.getItems().clear();
- colloquiumComboBox.setValue(new BigDecimal(0.0));
- thesisComboBox.setValue(new BigDecimal(0.0));
main.setOpenFile(null);
}
}
@@ -319,18 +294,6 @@ public class MainViewController
grade.getGrade().multiply(new BigDecimal(grade.getEcts())));
}
}
- if (thesisComboBox.getValue().compareTo(BigDecimal.ZERO) != 0)
- {
- sumEcts += ectsThesis;
- gradesSumWeighted = gradesSumWeighted.add(thesisComboBox.getValue()
- .multiply(new BigDecimal(ectsThesis)));
- }
- if (colloquiumComboBox.getValue().compareTo(BigDecimal.ZERO) != 0)
- {
- sumEcts += ectsColloquium;
- gradesSumWeighted = gradesSumWeighted.add(colloquiumComboBox
- .getValue().multiply(new BigDecimal(ectsColloquium)));
- }
if (sumEcts > 0)
{
ectsSumLabel.setText(String.valueOf(sumEcts));