diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-11-23 21:11:37 +0100 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-11-23 21:11:37 +0100 |
| commit | 949e1bfa83b7cd7615c25fca630ecb6d9861928b (patch) | |
| tree | 5c566cc5cc6ff2f0b9ea3506b1e6f84ee38afe7f | |
| download | Notepad---949e1bfa83b7cd7615c25fca630ecb6d9861928b.tar.gz Notepad---949e1bfa83b7cd7615c25fca630ecb6d9861928b.zip | |
Add first version of Notepad--
| -rw-r--r-- | .classpath | 7 | ||||
| -rw-r--r-- | .project | 23 | ||||
| -rw-r--r-- | .settings/org.eclipse.jdt.core.prefs | 11 | ||||
| -rw-r--r-- | bin/.gitignore | 1 | ||||
| -rw-r--r-- | build.fxbuild | 8 | ||||
| -rw-r--r-- | src/de/fhswf/in/inf/se/notepadMinusMinus/Main.java | 44 | ||||
| -rw-r--r-- | src/de/fhswf/in/inf/se/notepadMinusMinus/model/Grade.java | 104 | ||||
| -rw-r--r-- | src/de/fhswf/in/inf/se/notepadMinusMinus/view/mainView.fxml | 105 | ||||
| -rw-r--r-- | src/de/fhswf/in/inf/se/notepadMinusMinus/view/mainViewController.java | 12 |
9 files changed, 315 insertions, 0 deletions
diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..3b2e843 --- /dev/null +++ b/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/.project b/.project new file mode 100644 index 0000000..78a3af4 --- /dev/null +++ b/.project @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>NotepadMinusMinus</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..fd04598 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1 @@ +/de/ diff --git a/build.fxbuild b/build.fxbuild new file mode 100644 index 0000000..3a07d47 --- /dev/null +++ b/build.fxbuild @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="ASCII"?> +<anttasks:AntTask xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:anttasks="http://org.eclipse.fx.ide.jdt/1.0" buildDirectory="${project}/build"> + <deploy> + <application name="Notepad--"/> + <info/> + </deploy> + <signjar/> +</anttasks:AntTask> 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<Grade> 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<Grade> 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 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.geometry.*?> +<?import javafx.scene.input.*?> +<?import java.lang.*?> +<?import javafx.scene.control.*?> +<?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"> + <top> + <MenuBar BorderPane.alignment="CENTER"> + <menus> + <Menu mnemonicParsing="false" text="Datei"> + <items> + <MenuItem mnemonicParsing="false" text="Neu"> + <accelerator> + <KeyCodeCombination alt="UP" code="N" control="UP" meta="UP" shift="UP" shortcut="DOWN" /> + </accelerator> + </MenuItem> + <MenuItem mnemonicParsing="false" text="Öffnen"> + <accelerator> + <KeyCodeCombination alt="UP" code="O" control="UP" meta="UP" shift="UP" shortcut="DOWN" /> + </accelerator> + </MenuItem> + <MenuItem mnemonicParsing="false" text="Speichern"> + <accelerator> + <KeyCodeCombination alt="UP" code="S" control="UP" meta="UP" shift="UP" shortcut="DOWN" /> + </accelerator> + </MenuItem> + <MenuItem mnemonicParsing="false" text="Speichern unter"> + <accelerator> + <KeyCodeCombination alt="UP" code="S" control="UP" meta="UP" shift="DOWN" shortcut="DOWN" /> + </accelerator> + </MenuItem> + <MenuItem mnemonicParsing="false" text="Schließen"> + <accelerator> + <KeyCodeCombination alt="UP" code="Q" control="UP" meta="UP" shift="UP" shortcut="DOWN" /> + </accelerator> + </MenuItem> + </items> + </Menu> + </menus> + </MenuBar> + </top> + <center> + <AnchorPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER"> + <children> + <TableView fx:id="noteTable" editable="true" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> + <columns> + <TableColumn prefWidth="75.0" text="Semester" /> + <TableColumn prefWidth="75.0" text="Modulname" /> + <TableColumn prefWidth="75.0" text="ECTS" /> + <TableColumn prefWidth="75.0" text="Note" /> + <TableColumn prefWidth="75.0" text="Versuch" /> + </columns> + <columnResizePolicy> + <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> + </columnResizePolicy> + </TableView> + </children> + </AnchorPane> + </center> + <bottom> + <GridPane BorderPane.alignment="CENTER"> + <columnConstraints> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + </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:" /> + <Label text="0" GridPane.columnIndex="1" /> + <Label text="Note:" GridPane.columnIndex="2" /> + <Label text="0,0" GridPane.columnIndex="3" /> + <Button mnemonicParsing="false" text="Neu" GridPane.columnIndex="4" /> + <Button disable="true" mnemonicParsing="false" text="Löschen" GridPane.columnIndex="5" /> + <Label text="Kolloquium" GridPane.rowIndex="1" /> + <ComboBox disable="true" prefWidth="150.0" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="1" /> + <ComboBox disable="true" prefWidth="150.0" GridPane.columnIndex="4" GridPane.columnSpan="2" GridPane.rowIndex="1" /> + <Label text="Bachelor Arbeit" GridPane.columnIndex="3" GridPane.rowIndex="1"> + <GridPane.margin> + <Insets /> + </GridPane.margin> + </Label> + </children> + <opaqueInsets> + <Insets /> + </opaqueInsets> + <padding> + <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" /> + </padding> + </GridPane> + </bottom> + <opaqueInsets> + <Insets /> + </opaqueInsets> +</BorderPane> diff --git a/src/de/fhswf/in/inf/se/notepadMinusMinus/view/mainViewController.java b/src/de/fhswf/in/inf/se/notepadMinusMinus/view/mainViewController.java new file mode 100644 index 0000000..3908116 --- /dev/null +++ b/src/de/fhswf/in/inf/se/notepadMinusMinus/view/mainViewController.java @@ -0,0 +1,12 @@ +package de.fhswf.in.inf.se.notepadMinusMinus.view; + +import de.fhswf.in.inf.se.notepadMinusMinus.model.Grade; +import javafx.fxml.FXML; +import javafx.scene.control.TableView; + +public class mainViewController +{ + @FXML + private TableView<Grade> noteTable; + +} |
