From 949e1bfa83b7cd7615c25fca630ecb6d9861928b Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Mon, 23 Nov 2015 21:11:37 +0100 Subject: Add first version of Notepad-- --- src/de/fhswf/in/inf/se/notepadMinusMinus/Main.java | 44 +++++++++ .../in/inf/se/notepadMinusMinus/model/Grade.java | 104 ++++++++++++++++++++ .../in/inf/se/notepadMinusMinus/view/mainView.fxml | 105 +++++++++++++++++++++ .../notepadMinusMinus/view/mainViewController.java | 12 +++ 4 files changed, 265 insertions(+) create mode 100644 src/de/fhswf/in/inf/se/notepadMinusMinus/Main.java create mode 100644 src/de/fhswf/in/inf/se/notepadMinusMinus/model/Grade.java create mode 100644 src/de/fhswf/in/inf/se/notepadMinusMinus/view/mainView.fxml create mode 100644 src/de/fhswf/in/inf/se/notepadMinusMinus/view/mainViewController.java (limited to 'src/de/fhswf/in/inf/se') diff --git a/src/de/fhswf/in/inf/se/notepadMinusMinus/Main.java b/src/de/fhswf/in/inf/se/notepadMinusMinus/Main.java new file mode 100644 index 0000000..9481abe --- /dev/null +++ b/src/de/fhswf/in/inf/se/notepadMinusMinus/Main.java @@ -0,0 +1,44 @@ +package de.fhswf.in.inf.se.notepadMinusMinus; + +import de.fhswf.in.inf.se.notepadMinusMinus.model.Grade; +import javafx.application.Application; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.fxml.FXMLLoader; +import javafx.scene.Scene; +import javafx.scene.layout.BorderPane; +import javafx.stage.Stage; + +public class Main extends Application +{ + private ObservableList gradeList = FXCollections + .observableArrayList(); + + @Override + public void start(Stage primaryStage) + { + try + { + BorderPane root = (BorderPane) FXMLLoader + .load(getClass().getResource("view/mainView.fxml")); + Scene scene = new Scene(root); + primaryStage.setScene(scene); + primaryStage.setMaximized(true); + primaryStage.show(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + public static void main(String[] args) + { + launch(args); + } + + public ObservableList getGradeList() + { + return gradeList; + } +} diff --git a/src/de/fhswf/in/inf/se/notepadMinusMinus/model/Grade.java b/src/de/fhswf/in/inf/se/notepadMinusMinus/model/Grade.java new file mode 100644 index 0000000..0b1528f --- /dev/null +++ b/src/de/fhswf/in/inf/se/notepadMinusMinus/model/Grade.java @@ -0,0 +1,104 @@ +/** + * + */ +package de.fhswf.in.inf.se.notepadMinusMinus.model; + +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.beans.property.SimpleStringProperty; +import javafx.beans.property.StringProperty; + +/** + * TODO Add comment here + * + * @author $Author: $ + * @version $Revision: $, $Date: $ UTC + */ +public class Grade +{ + private IntegerProperty semester = new SimpleIntegerProperty(); + + private StringProperty modulename = new SimpleStringProperty(); + + private IntegerProperty ects = new SimpleIntegerProperty(); + + private IntegerProperty grade = new SimpleIntegerProperty(); + + private IntegerProperty attempt = new SimpleIntegerProperty(); + + public final IntegerProperty semesterProperty() + { + return this.semester; + } + + public final int getSemester() + { + return this.semesterProperty().get(); + } + + public final void setSemester(final int semester) + { + this.semesterProperty().set(semester); + } + + public final StringProperty modulenameProperty() + { + return this.modulename; + } + + public final String getModulename() + { + return this.modulenameProperty().get(); + } + + public final void setModulename(final java.lang.String modulename) + { + this.modulenameProperty().set(modulename); + } + + public final IntegerProperty ectsProperty() + { + return this.ects; + } + + public final int getEcts() + { + return this.ectsProperty().get(); + } + + public final void setEcts(final int ects) + { + this.ectsProperty().set(ects); + } + + public final IntegerProperty gradeProperty() + { + return this.grade; + } + + public final int getGrade() + { + return this.gradeProperty().get(); + } + + public final void setGrade(final int grade) + { + this.gradeProperty().set(grade); + } + + public final IntegerProperty attemptProperty() + { + return this.attempt; + } + + public final int getAttempt() + { + return this.attemptProperty().get(); + } + + public final void setAttempt(final int attempt) + { + this.attemptProperty().set(attempt); + } + +} diff --git a/src/de/fhswf/in/inf/se/notepadMinusMinus/view/mainView.fxml b/src/de/fhswf/in/inf/se/notepadMinusMinus/view/mainView.fxml new file mode 100644 index 0000000..841458b --- /dev/null +++ b/src/de/fhswf/in/inf/se/notepadMinusMinus/view/mainView.fxml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +