positionen UI DB

This commit is contained in:
hendrik 2018-04-02 15:07:58 +02:00
parent 5244a615ca
commit 247bd9a20b
9 changed files with 365 additions and 181 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXColorPicker?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
@ -70,8 +70,8 @@
<columns>
<TreeTableColumn fx:id="columnColor" editable="false" prefWidth="135.0" resizable="false" sortable="false" text="Farbe" />
<TreeTableColumn fx:id="columnPrize" editable="false" prefWidth="117.0" resizable="false" sortable="false" text="Preis" />
<TreeTableColumn fx:id="columnPositionsEdit" editable="false" prefWidth="1002.666748046875" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="3000.0" prefWidth="92.333251953125" resizable="false" sortable="false" text="Nummer" />
<TreeTableColumn fx:id="columnPositionsEdit" editable="false" prefWidth="982.0" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="3000.0" prefWidth="111.0" resizable="false" sortable="false" text="Nummer" />
</columns>
</TreeTableView>
<Button fx:id="btnSaveEntry" layoutX="66.0" layoutY="620.0" mnemonicParsing="false" onAction="#btnSaveEntryAction" text="Ausgewählten Eintrag speichern">
@ -100,12 +100,12 @@
</font>
</Label>
<JFXTextField fx:id="tftNewValue" layoutX="380.0" layoutY="50.0" prefHeight="25.0" prefWidth="58.0" />
<JFXColorPicker fx:id="colorChooser" layoutX="340.0" layoutY="90.0" />
<Label fx:id="lableNewColor" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="455.0" layoutY="90.0" prefHeight="34.0" prefWidth="105.0" text="Farbe:">
<font>
<Font name="Cantarell Regular" size="18.0" />
</font>
</Label>
<ChoiceBox fx:id="colorChoise" layoutX="292.0" layoutY="95.0" prefWidth="150.0" />
</children>
</AnchorPane>
</content>
@ -122,11 +122,11 @@
<children>
<TreeTableView fx:id="jobsTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="541.0" prefWidth="1346.0">
<columns>
<TreeTableColumn fx:id="columnValue" editable="false" prefWidth="90.6666259765625" resizable="false" text="Betrag" />
<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="90.6666259765625" resizable="false" text="Betrag" />
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="91.0" resizable="false" text="Zustand" />
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="981.333251953125" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="99.666748046875" resizable="false" text="Zeit" />
<TreeTableColumn fx:id="columnNumber" editable="false" maxWidth="3000.0" prefWidth="83.6666259765625" resizable="false" text="Nummer" />
<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="83.6666259765625" resizable="false" text="Nummer" />
</columns>
</TreeTableView>
<Button fx:id="btnReprintJob" layoutX="378.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnReprintJobAction" text="Ausgewählter Auftrag drucken">
@ -157,7 +157,7 @@
</AnchorPane>
</content>
</TitledPane>
<Button fx:id="bntCancelJob" layoutX="44.0" layoutY="603.0" mnemonicParsing="false" onAction="#bntCancelJobAction" text="Ausgewählter Auftrag stornieren">
<Button fx:id="btnCancelJob" layoutX="44.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnCancelJobAction" text="Ausgewählter Auftrag stornieren">
<font>
<Font name="Cantarell Regular" size="17.0" />
</font>
@ -197,127 +197,127 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<JFXButton fx:id="gridButton04" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton04Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1">
<JFXButton fx:id="gridButton04" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton04Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton05" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton05Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true">
<JFXButton fx:id="gridButton05" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton05Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton03" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton03Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2">
<JFXButton fx:id="gridButton03" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton03Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton02" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton02Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3">
<JFXButton fx:id="gridButton02" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton02Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton01" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton01Action" prefHeight="134.0" prefWidth="179.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4">
<JFXButton fx:id="gridButton01" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton01Action" prefHeight="134.0" prefWidth="179.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton10" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton10Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="1">
<JFXButton fx:id="gridButton10" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton10Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton09" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton09Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="1">
<JFXButton fx:id="gridButton09" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton09Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton08" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton08Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="1">
<JFXButton fx:id="gridButton08" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton08Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton07" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton07Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="1">
<JFXButton fx:id="gridButton07" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton07Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton06" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton06Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="1">
<JFXButton fx:id="gridButton06" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton06Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton15" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton15Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="2">
<JFXButton fx:id="gridButton15" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton15Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton14" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton14Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="2">
<JFXButton fx:id="gridButton14" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton14Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton13" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton13Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="2">
<JFXButton fx:id="gridButton13" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton13Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton12" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton12Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="2">
<JFXButton fx:id="gridButton12" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton12Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton11" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton11Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="2">
<JFXButton fx:id="gridButton11" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton11Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton20" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton20Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="3">
<JFXButton fx:id="gridButton20" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton20Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton19" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton19Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="3">
<JFXButton fx:id="gridButton19" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton19Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton18" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton18Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="3">
<JFXButton fx:id="gridButton18" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton18Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton17" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton17Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="3">
<JFXButton fx:id="gridButton17" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton17Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton16" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton16Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="3">
<JFXButton fx:id="gridButton16" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton16Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton25" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton25Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="4">
<JFXButton fx:id="gridButton25" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton25Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton23" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton23Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="4">
<JFXButton fx:id="gridButton23" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton23Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton22" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton22Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="4">
<JFXButton fx:id="gridButton22" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton22Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton21" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton21Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="4">
<JFXButton fx:id="gridButton21" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton21Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton24" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton24Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="4">
<JFXButton fx:id="gridButton24" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton24Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
@ -334,12 +334,12 @@
<Font name="Cantarell Regular" size="20.0" />
</font>
</Button>
<Label fx:id="labelAllPrize" alignment="CENTER" contentDisplay="CENTER" layoutX="10.0" layoutY="505.0" prefHeight="15.0" prefWidth="386.0" text="99,99 €" textAlignment="CENTER">
<Label fx:id="labelAllPrize" alignment="CENTER" contentDisplay="CENTER" layoutX="10.0" layoutY="505.0" prefHeight="15.0" prefWidth="386.0" text="0,00 €" textAlignment="CENTER">
<font>
<Font name="Open Sans" size="70.0" />
</font>
</Label>
<Label fx:id="labelJobCounter" alignment="TOP_RIGHT" contentDisplay="CENTER" layoutX="5.0" layoutY="45.0" prefHeight="34.0" prefWidth="392.0" text="Auftragsnummer: 128" textAlignment="CENTER">
<Label fx:id="labelJobCounter" alignment="TOP_RIGHT" contentDisplay="CENTER" layoutX="5.0" layoutY="45.0" prefHeight="34.0" prefWidth="392.0" text="Auftragsnummer: 0" textAlignment="CENTER">
<font>
<Font name="Cantarell Regular" size="26.0" />
</font>

View File

@ -75,18 +75,18 @@ class DBController
});
}
public void fuellenDatenbank(int pID, String pDatum, String pKonto,
String pNutzername, String pEmail, String pPasswort)
public void fuellenPositionen(int pID, String pName, float pValue,
String pColor)
{ // Neuen Eintrag erstellen
System.out.println("Erstelle neuen positionen eintrag");
try {
PreparedStatement ps = connection.prepareStatement(
"INSERT INTO konten VALUES (?, ?, ?, ?, ?, ?);");
"INSERT INTO positionen VALUES (?, ?, ?, ?);");
ps.setInt(1, pID); // Primärschlässel
ps.setString(2, pDatum);
ps.setString(3, pKonto);
ps.setString(4, pNutzername);
ps.setString(5, pEmail);
ps.setString(6, pPasswort);
ps.setString(2, pName);
ps.setFloat(3, pValue);
ps.setString(4, pColor);
ps.addBatch();
connection.setAutoCommit(false);
@ -111,9 +111,13 @@ class DBController
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
}
for(int i = 0; i < 25; i++) {
fuellenPositionen(i+1, "Noch frei", (float) 0.00, "#FAF0E6");
}
}
public void erstelleTabelleJobs()
{ // Erstelle Tabelle mit Reihen
System.out.println("Erstelle Tabelle Jobs");
@ -138,17 +142,17 @@ class DBController
}
}
private void ausgebenSyso()
{ // Debugging Ausgabe der kompletten Datenbank
public void ausgebenSysoPositionen()
{ // Debugging Ausgabe der kompletten Tabelle
System.out.println("Print positionen");
try {
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM konten;");
ResultSet rs = stmt.executeQuery("SELECT * FROM positionen;");
while (rs.next()) {
System.out.println("Datum = " + rs.getString("datum"));
System.out.println("Konto = " + rs.getString("konto"));
System.out.println("Nutzername = " + rs.getString("nutzername"));
System.out.println("E-Mail = " + rs.getString("email"));
System.out.println("Passwort = " + rs.getString("passwort"));
System.out.println("id = " + rs.getString("id"));
System.out.println("name = " + rs.getString("name"));
System.out.println("vale = " + rs.getString("value"));
System.out.println("color = " + rs.getString("color"));
System.out.println(" ");
}
@ -158,13 +162,13 @@ class DBController
}
}
public String getDatum(int pID)
public String getName(int pID)
{ // Gibt das Datum zurück
try {
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(
"SELECT id, datum FROM konten WHERE id = " + pID + ";");
return rs.getString("datum");
"SELECT id, name FROM positionen WHERE id = " + pID + ";");
return rs.getString("name");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
@ -172,13 +176,13 @@ class DBController
}
}
public String getKonto(int pID)
public String getValue(int pID)
{ // Gibt das Konto zurück
try {
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(
"SELECT id, konto FROM konten WHERE id = " + pID + ";");
return rs.getString("konto");
"SELECT id, value FROM positionen WHERE id = " + pID + ";");
return rs.getString("value");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
@ -186,13 +190,13 @@ class DBController
}
}
public String getNutzername(int pID)
public String getColor(int pID)
{ // Gibt den Nutzernamen zurück
try {
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(
"SELECT id, nutzername FROM konten WHERE id = " + pID + ";");
return rs.getString("nutzername");
"SELECT id, color FROM positionen WHERE id = " + pID + ";");
return rs.getString("color");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
@ -231,11 +235,11 @@ class DBController
}
public void setDatum(int pID, String pDatum)
public void setName(int pID, String pName)
{ // Setzt das Datum
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate("UPDATE konten SET datum = '" + pDatum
stmt.executeUpdate("UPDATE positionen SET name = '" + pName
+ "'WHERE id =" + pID + ";");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
@ -243,11 +247,11 @@ class DBController
}
}
public void setKonto(int pID, String pKonto)
public void setValue(int pID, String pValue)
{ // Setzt das Konto
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate("UPDATE konten SET konto = '" + pKonto
stmt.executeUpdate("UPDATE positionen SET value = '" + pValue
+ "'WHERE id =" + pID + ";");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
@ -255,11 +259,11 @@ class DBController
}
}
public void setNutername(int pID, String pNutername)
public void setColor(int pID, String pColor)
{ // Setzt den Nutzername
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate("UPDATE konten SET nutzername = '" + pNutername
stmt.executeUpdate("UPDATE positionen SET color = '" + pColor
+ "'WHERE id =" + pID + ";");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
@ -350,18 +354,16 @@ class DBController
return neueID;
}
public ArrayList<tableData> ladeTabelle()
public ArrayList<tableDataPositionen> ladeTabellePositionen()
{ // Gibt ein Objekt daten mit allen Einträgen der DB zurück
ArrayList<tableData> daten = new ArrayList<>();
ArrayList<tableDataPositionen> daten = new ArrayList<>();
try {
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM konten;");
ResultSet rs = stmt.executeQuery("SELECT * FROM positionen;");
while (rs.next()) {
try {
// Entschlüsselte Daten werden als Datenobjekt gespeichert
// daten.add(new tableData(rs.getInt("id"),
// crypo.entschluesseln(rs.getString("datum"), schluessel),
// crypo.entschluesseln(rs.getString("konto"),schluessel)));
daten.add(new tableDataPositionen(rs.getInt("id"), rs.getString("name"), rs.getString("value"), rs.getString("color")));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
@ -379,12 +381,5 @@ class DBController
schluessel = pSchluessel;
}
public boolean getDatabasePresent() {
return databasepresent;
}
public void setDatabasePresent(boolean status) {
databasepresent = status;
}
}

View File

@ -92,10 +92,12 @@ public class Main extends Application
mwc.setDBLabel();
dbc.dbname = mwc.getDatabaseName();
dbc.verbindeDatenbank(); // Verbindet mit der Datenbank-Datei
mwc.fuelleTabllePositionen();
} else { // Wenn keine XML gefunden --> erster Start
System.out.println("keine XML gefunden!");
mwc.blockUI(true);
if (System.getProperty("os.name").equals("Linux")) {
File dir = new File(

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXColorPicker?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
@ -70,8 +70,8 @@
<columns>
<TreeTableColumn fx:id="columnColor" editable="false" prefWidth="135.0" resizable="false" sortable="false" text="Farbe" />
<TreeTableColumn fx:id="columnPrize" editable="false" prefWidth="117.0" resizable="false" sortable="false" text="Preis" />
<TreeTableColumn fx:id="columnPositionsEdit" editable="false" prefWidth="1002.666748046875" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="3000.0" prefWidth="92.333251953125" resizable="false" sortable="false" text="Nummer" />
<TreeTableColumn fx:id="columnPositionsEdit" editable="false" prefWidth="982.0" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="3000.0" prefWidth="111.0" resizable="false" sortable="false" text="Nummer" />
</columns>
</TreeTableView>
<Button fx:id="btnSaveEntry" layoutX="66.0" layoutY="620.0" mnemonicParsing="false" onAction="#btnSaveEntryAction" text="Ausgewählten Eintrag speichern">
@ -100,12 +100,12 @@
</font>
</Label>
<JFXTextField fx:id="tftNewValue" layoutX="380.0" layoutY="50.0" prefHeight="25.0" prefWidth="58.0" />
<JFXColorPicker fx:id="colorChooser" layoutX="340.0" layoutY="90.0" />
<Label fx:id="lableNewColor" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="455.0" layoutY="90.0" prefHeight="34.0" prefWidth="105.0" text="Farbe:">
<font>
<Font name="Cantarell Regular" size="18.0" />
</font>
</Label>
<ChoiceBox fx:id="colorChoise" layoutX="292.0" layoutY="95.0" prefWidth="150.0" />
</children>
</AnchorPane>
</content>
@ -122,11 +122,11 @@
<children>
<TreeTableView fx:id="jobsTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="541.0" prefWidth="1346.0">
<columns>
<TreeTableColumn fx:id="columnValue" editable="false" prefWidth="90.6666259765625" resizable="false" text="Betrag" />
<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="90.6666259765625" resizable="false" text="Betrag" />
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="91.0" resizable="false" text="Zustand" />
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="981.333251953125" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="99.666748046875" resizable="false" text="Zeit" />
<TreeTableColumn fx:id="columnNumber" editable="false" maxWidth="3000.0" prefWidth="83.6666259765625" resizable="false" text="Nummer" />
<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="83.6666259765625" resizable="false" text="Nummer" />
</columns>
</TreeTableView>
<Button fx:id="btnReprintJob" layoutX="378.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnReprintJobAction" text="Ausgewählter Auftrag drucken">
@ -157,7 +157,7 @@
</AnchorPane>
</content>
</TitledPane>
<Button fx:id="bntCancelJob" layoutX="44.0" layoutY="603.0" mnemonicParsing="false" onAction="#bntCancelJobAction" text="Ausgewählter Auftrag stornieren">
<Button fx:id="btnCancelJob" layoutX="44.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnCancelJobAction" text="Ausgewählter Auftrag stornieren">
<font>
<Font name="Cantarell Regular" size="17.0" />
</font>
@ -197,127 +197,127 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<JFXButton fx:id="gridButton04" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton04Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1">
<JFXButton fx:id="gridButton04" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton04Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton05" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton05Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true">
<JFXButton fx:id="gridButton05" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton05Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton03" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton03Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2">
<JFXButton fx:id="gridButton03" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton03Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton02" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton02Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3">
<JFXButton fx:id="gridButton02" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton02Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton01" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton01Action" prefHeight="134.0" prefWidth="179.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4">
<JFXButton fx:id="gridButton01" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton01Action" prefHeight="134.0" prefWidth="179.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton10" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton10Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="1">
<JFXButton fx:id="gridButton10" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton10Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton09" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton09Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="1">
<JFXButton fx:id="gridButton09" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton09Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton08" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton08Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="1">
<JFXButton fx:id="gridButton08" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton08Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton07" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton07Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="1">
<JFXButton fx:id="gridButton07" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton07Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton06" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton06Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="1">
<JFXButton fx:id="gridButton06" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton06Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="1">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton15" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton15Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="2">
<JFXButton fx:id="gridButton15" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton15Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton14" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton14Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="2">
<JFXButton fx:id="gridButton14" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton14Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton13" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton13Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="2">
<JFXButton fx:id="gridButton13" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton13Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton12" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton12Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="2">
<JFXButton fx:id="gridButton12" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton12Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton11" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton11Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="2">
<JFXButton fx:id="gridButton11" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton11Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="2">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton20" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton20Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="3">
<JFXButton fx:id="gridButton20" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton20Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton19" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton19Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="3">
<JFXButton fx:id="gridButton19" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton19Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton18" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton18Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="3">
<JFXButton fx:id="gridButton18" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton18Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton17" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton17Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="3">
<JFXButton fx:id="gridButton17" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton17Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton16" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton16Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="3">
<JFXButton fx:id="gridButton16" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton16Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="3">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton25" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton25Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="4">
<JFXButton fx:id="gridButton25" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton25Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton23" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton23Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="4">
<JFXButton fx:id="gridButton23" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton23Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton22" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton22Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="4">
<JFXButton fx:id="gridButton22" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton22Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton21" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton21Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="4">
<JFXButton fx:id="gridButton21" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton21Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
</JFXButton>
<JFXButton fx:id="gridButton24" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton24Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="Rote Wurst 2,60€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="4">
<JFXButton fx:id="gridButton24" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton24Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="4">
<font>
<Font name="Cantarell Regular" size="24.0" />
</font>
@ -334,12 +334,12 @@
<Font name="Cantarell Regular" size="20.0" />
</font>
</Button>
<Label fx:id="labelAllPrize" alignment="CENTER" contentDisplay="CENTER" layoutX="10.0" layoutY="505.0" prefHeight="15.0" prefWidth="386.0" text="99,99 €" textAlignment="CENTER">
<Label fx:id="labelAllPrize" alignment="CENTER" contentDisplay="CENTER" layoutX="10.0" layoutY="505.0" prefHeight="15.0" prefWidth="386.0" text="0,00 €" textAlignment="CENTER">
<font>
<Font name="Open Sans" size="70.0" />
</font>
</Label>
<Label fx:id="labelJobCounter" alignment="TOP_RIGHT" contentDisplay="CENTER" layoutX="5.0" layoutY="45.0" prefHeight="34.0" prefWidth="392.0" text="Auftragsnummer: 128" textAlignment="CENTER">
<Label fx:id="labelJobCounter" alignment="TOP_RIGHT" contentDisplay="CENTER" layoutX="5.0" layoutY="45.0" prefHeight="34.0" prefWidth="392.0" text="Auftragsnummer: 0" textAlignment="CENTER">
<font>
<Font name="Cantarell Regular" size="26.0" />
</font>

View File

@ -16,7 +16,8 @@ import javafx.scene.control.TreeItem;
import javafx.scene.control.TitledPane;
import javafx.scene.control.Tooltip;
import com.jfoenix.controls.JFXColorPicker;
import javafx.scene.control.ChoiceBox;
//import com.sun.java.swing.action.NewAction;
import java.awt.Desktop;
@ -34,11 +35,19 @@ import java.net.URISyntaxException;
import java.sql.DriverManager;
import java.util.Optional;
import java.util.Properties;
import javax.security.auth.callback.Callback;
import javax.swing.plaf.basic.BasicInternalFrameTitlePane.TitlePaneLayout;
import javafx.application.Platform;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.scene.control.Label;
import javafx.scene.control.ListCell;
import javafx.scene.control.ListView;
import javafx.scene.control.PasswordField;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane;
@ -69,13 +78,13 @@ public class MainWindowController
@FXML
private TreeTableColumn<tableData, Integer> idSpalte01 = new TreeTableColumn<>(
"");
"tableCurrentOrder");
@FXML
private TreeTableView<tableData> jobsTreeTable;
@FXML
private TreeTableColumn<tableData, String> columnValue;
private TreeTableColumn<tableData, String> columnJobValue;
@FXML
private TreeTableColumn<tableData, String> columnState;
@ -87,30 +96,29 @@ public class MainWindowController
private TreeTableColumn<tableData, String> columnTime;
@FXML
private TreeTableColumn<tableData, String> columnNumber;
private TreeTableColumn<tableData, String> columnJobNumber;
@FXML
private TreeTableColumn<tableData, Integer> idSpalte02 = new TreeTableColumn<>(
"");
"jobsTreeTable");
@FXML
private TreeTableView<tableData> entryTreeTable;
private TreeTableView<tableDataPositionen> entryTreeTable;
@FXML
private TreeTableColumn<tableData, String> columnColor;
private TreeTableColumn<tableDataPositionen, String> columnColor;
@FXML
private TreeTableColumn<tableData, String> columnPrize;
private TreeTableColumn<tableDataPositionen, String> columnPrize;
@FXML
private TreeTableColumn<tableData, String> columnPositionsEdit;
private TreeTableColumn<tableDataPositionen, String> columnPositionsEdit;
@FXML
private TreeTableColumn<tableData, String> columnPosnumber;
private TreeTableColumn<tableDataPositionen, Integer> columnPosnumber;
@FXML
private TreeTableColumn<tableData, Integer> idSpalte03 = new TreeTableColumn<>(
"");
private ChoiceBox<String> colorChoise;
@FXML
private Button ueberbtn;
@ -203,7 +211,7 @@ public class MainWindowController
private Button btnReprintJob;
@FXML
private Button bntCancelJob;
private Button btnCancelJob;
@FXML
private Button btnCalcStats;
@ -265,9 +273,6 @@ public class MainWindowController
@FXML
private TextField tftNewDBName;
@FXML
private JFXColorPicker colorChooser;
private Main main;
private DBController dbc;
@ -275,12 +280,25 @@ public class MainWindowController
private String filepathXMLLinux = System.getProperty("user.home")
+ "/bin/jFxKasse/config.xml"; // Pfad wo die XML liegt
private int id;
private int idPositionen = 0;
private String selectedColorName;
private String databaseName;
// private ObservableList<String> color =
// FXCollections.observableArrayList("English", "Deutsch");
@FXML
TreeItem<tableData> root = new TreeItem<>(new tableData(0, "0", "0"));
TreeItem<tableData> rootCurrentJob = new TreeItem<>(
new tableData(0, "0", "0"));
@FXML
TreeItem<tableData> rootJobs = new TreeItem<>(new tableData(0, "0", "0"));
@FXML
TreeItem<tableDataPositionen> rootPositionen = new TreeItem<>(
new tableDataPositionen(0, "0", "0", "0"));
Properties props = new Properties();
@ -317,8 +335,9 @@ public class MainWindowController
@FXML
public void btnOpenFolderAction(ActionEvent event) throws IOException
{
Runtime.getRuntime().exec("xdg-open " + System.getProperty("user.home") + "/bin/jFxKasse" );
Runtime.getRuntime().exec(
"xdg-open " + System.getProperty("user.home") + "/bin/jFxKasse");
}
@FXML
@ -331,7 +350,7 @@ public class MainWindowController
setDatabaseName(tftNewDBName.getText());
dbc.dbname = getDatabaseName();
dbc.verbindeDatenbank(); // Verbindet mit der Datenbank-Datei
dbc.erstelleTabellePositionen();
dbc.erstelleTabellePositionen();
dbc.erstelleTabelleJobs();
try {
@ -342,6 +361,8 @@ public class MainWindowController
}
setDBLabel();
blockUI(false);
fuelleTabllePositionen();
initUI(); // Startet die UI
}
@ -349,7 +370,14 @@ public class MainWindowController
@FXML
public void btnSaveEntryAction(ActionEvent event)
{
System.out.println("Button!");
System.out.println("Speichere Eintrag!");
dbc.setName(idPositionen, tftNewPosition.getText());
dbc.setValue(idPositionen, tftNewValue.getText());
dbc.setColor(idPositionen, getColorCodes(selectedColorName));
fuelleTabllePositionen();
}
@FXML
@ -367,11 +395,12 @@ public class MainWindowController
@FXML
public void btnReprintJobAction(ActionEvent event)
{
System.out.println("Button!");
// System.out.println("fuelleTabellePositionen");
// fuelleTabllePositionen();
}
@FXML
public void bntCancelJobAction(ActionEvent event)
public void btnCancelJobAction(ActionEvent event)
{
System.out.println("Button!");
}
@ -380,6 +409,7 @@ public class MainWindowController
public void btnLockAction(ActionEvent event)
{
System.out.println("Button!");
dbc.ausgebenSysoPositionen();
}
@FXML
@ -546,16 +576,23 @@ public class MainWindowController
@FXML
public void fuelleTablle()
public void fuelleTabllePositionen()
{ // Lädt die Datenbank in die Tabelle
// dbc.setSchluessel(schluessel);
for (int i = 0; i < dbc.ladeTabelle().size(); i++) {
tableData helpTableData = new tableData(
dbc.ladeTabelle().get(i).getID(),
dbc.ladeTabelle().get(i).getDatum(),
dbc.ladeTabelle().get(i).getKonto());
root.getChildren().add(new TreeItem<tableData>(helpTableData));
rootPositionen.getChildren().remove(0,
rootPositionen.getChildren().size());
for (int i = 0; i < dbc.ladeTabellePositionen().size(); i++) {
tableDataPositionen helpTableData = new tableDataPositionen(
dbc.ladeTabellePositionen().get(i).getID(),
dbc.ladeTabellePositionen().get(i).getName(),
dbc.ladeTabellePositionen().get(i).getValue(),
getColorNames(dbc.ladeTabellePositionen().get(i).getColor()));
rootPositionen.getChildren()
.add(new TreeItem<tableDataPositionen>(helpTableData));
}
}
@ -565,49 +602,72 @@ public class MainWindowController
tftNewDBName.setText(getDatabaseName());
tableCurrentOrder.setRoot(root);
tableCurrentOrder.setShowRoot(false);
tableCurrentOrder.setEditable(false);
// Setzt die Textfelder
initPositionen();
/*
idSpalte01.setCellValueFactory(
}
private void initPositionen()
{
entryTreeTable.setRoot(rootPositionen);
entryTreeTable.setShowRoot(false);
entryTreeTable.setEditable(false);
ObservableList<String> color = FXCollections.observableArrayList("Rot",
"Orange", "Braun", "Weiß", "Gelb", "Gr\u00fcn", "Blau", "Indigo");
colorChoise.setItems(color);
colorChoise.getSelectionModel().selectedIndexProperty()
.addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> ov,
Number value, Number new_value)
{
selectedColorName = colorChoise.getItems()
.get((int) new_value).toString();
System.out.println("Ausgewählte Farbe: " + selectedColorName);
}
});
columnPosnumber.setCellValueFactory(
cellData -> cellData.getValue().getValue().idProperty().asObject());
columnQuantity.setCellValueFactory(
cellData -> cellData.getValue().getValue().datumProperty());
columnPosition.setCellValueFactory(
cellData -> cellData.getValue().getValue().kontoProperty());
tableCurrentOrder.getColumns().add(idSpalte01);
tableCurrentOrder.getColumns().get(2).setVisible(false);
tableCurrentOrder.getSelectionModel().selectedItemProperty()
columnPositionsEdit.setCellValueFactory(
cellData -> cellData.getValue().getValue().nameProperty());
columnPrize.setCellValueFactory(
cellData -> cellData.getValue().getValue().valueProperty());
columnColor.setCellValueFactory(
cellData -> cellData.getValue().getValue().colorProperty());
entryTreeTable.getSelectionModel().selectedItemProperty()
.addListener(new ChangeListener<Object>() {
@Override
public void changed(ObservableValue<?> observable, Object oldVal,
Object newVal)
{
// last = selected; //for auto-play
int selected = tableCurrentOrder.getSelectionModel()
int selected = entryTreeTable.getSelectionModel()
.getSelectedIndex(); // get selected item
id = idSpalte01.getCellData(selected); // Ausgewählte Spalte
idPositionen = columnPosnumber.getCellData(selected); // Ausgewählte
// Spalte
System.out.println(
"Positionen - Ausgewaehlte Spalte: " + idPositionen);
try { // Setzt den Inhalt in die Textfelder
tftNewPosition.setText(dbc.getName(idPositionen));
tftNewValue.setText(dbc.getValue(idPositionen));
colorChoise.getSelectionModel()
.select(getColorID(dbc.getColor(idPositionen)));
try { // Setzt den entschlüsselten Inhalt in die Textfelder
// tf01.setText("Verschlüsseltes Passwort von " +
// crypo.entschluesseln(dbc.getKonto(id), schluessel) + " :
// " + dbc.getPasswort(id));
// tfNutzername.setText(crypo.entschluesseln(dbc.getNutzername(id),
// schluessel));
// tfEmail.setText(crypo.entschluesseln(dbc.getEmail(id),
// schluessel));
// tfPasswort.setText(crypo.entschluesseln(dbc.getPasswort(id),
// schluessel));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
*/
}
public void setMain(Main main, DBController dbc)
@ -631,9 +691,9 @@ public class MainWindowController
try {
props.setProperty("databasename", databasename); // writes dbname into
// property
outputStream = new FileOutputStream(filepathXMLLinux);
outputStream = new FileOutputStream(filepathXMLLinux);
props.storeToXML(outputStream, "jFxKasse settings"); // writes new .xml
outputStream.close();
} catch (IOException e) {
@ -644,9 +704,9 @@ public class MainWindowController
{ // Ladt die Daten aus der XML
InputStream inputStream;
try {
inputStream = new FileInputStream(filepathXMLLinux);
inputStream = new FileInputStream(filepathXMLLinux);
props.loadFromXML(inputStream);
setDatabaseName(props.getProperty("databasename"));
// = crypo.entschluesseln(props.getProperty("key"),
@ -666,8 +726,6 @@ public class MainWindowController
dbc.verbindeDatenbank();
}
public String getDatabaseName()
{
return databaseName;
@ -687,14 +745,143 @@ public class MainWindowController
tftNewDBName.setDisable(true);
labelDBName.setTooltip(new Tooltip(
"Um eine neue Datenbank zu erzeugen muss die vorherige config.xml und "
+ getDatabaseName() + ".db gelöscht werden! Anwendung danach neustarten!"));
+ getDatabaseName()
+ ".db gelöscht werden! Anwendung danach neustarten!"));
labelDBStatus.setTooltip(new Tooltip(
"Um eine neue Datenbank zu erzeugen muss die vorherige config.xml und "
+ getDatabaseName() + ".db gelöscht werden! Anwendung danach neustarten!"));
+ getDatabaseName()
+ ".db gelöscht werden! Anwendung danach neustarten!"));
} else {
labelDBStatus.setText("Keine Datenbank gefunden!");
}
}
private String getColorCodes(String pColorName)
{
switch (pColorName) {
case "Rot":
return "#FF0000";
case "Orange":
return "#FF4500";
case "Braun":
return "#8B4513";
case "Weiß":
return "#FAF0E6";
case "Gelb":
return "#FFD700";
case "Gr\u00fcn":
return "#556B2F";
case "Blau":
return "#00BFFF";
case "Indigo":
return "#4B0082";
default:
return "#FFFFFF";
}
}
private String getColorNames(String pColorCode)
{
switch (pColorCode) {
case "#FF0000":
return "Rot";
case "#FF4500":
return "Orange";
case "#8B4513":
return "Braun";
case "#FAF0E6":
return "Weiß";
case "#FFD700b":
return "Gelb";
case "#556B2F":
return "Gr\u00fcn";
case "#00BFFF":
return "Blau";
case "#4B0082":
return "Indigo";
default:
return "Farbe";
}
}
private Integer getColorID(String pColorCode)
{
switch (pColorCode) {
case "#FF0000":
return 0;
case "#FF4500":
return 1;
case "#8B4513":
return 2;
case "#FAF0E6":
return 3;
case "#FFD700b":
return 4;
case "#556B2F":
return 5;
case "#00BFFF":
return 6;
case "#4B0082":
return 7;
default:
return 0;
}
}
public void blockUI(boolean pState)
{
btnCalcStats.setDisable(pState);
btnClearEntry.setDisable(pState);
btnDeleteSelectedPosition.setDisable(pState);
btnPrintBill.setDisable(pState);
btnReprintJob.setDisable(pState);
btnSaveEntry.setDisable(pState);
btnCancelJob.setDisable(pState);
gridButton01.setDisable(pState);
gridButton02.setDisable(pState);
gridButton03.setDisable(pState);
gridButton04.setDisable(pState);
gridButton05.setDisable(pState);
gridButton06.setDisable(pState);
gridButton07.setDisable(pState);
gridButton08.setDisable(pState);
gridButton09.setDisable(pState);
gridButton10.setDisable(pState);
gridButton11.setDisable(pState);
gridButton12.setDisable(pState);
gridButton13.setDisable(pState);
gridButton14.setDisable(pState);
gridButton15.setDisable(pState);
gridButton16.setDisable(pState);
gridButton17.setDisable(pState);
gridButton18.setDisable(pState);
gridButton19.setDisable(pState);
gridButton20.setDisable(pState);
gridButton21.setDisable(pState);
gridButton22.setDisable(pState);
gridButton23.setDisable(pState);
gridButton24.setDisable(pState);
gridButton25.setDisable(pState);
tftNewPosition.setDisable(pState);
tftNewValue.setDisable(pState);
colorChoise.setDisable(pState);
tableCurrentOrder.setDisable(pState);
jobsTreeTable.setDisable(pState);
entryTreeTable.setDisable(pState);
labelAllPrize.setVisible(!pState);
labelJobCounter.setVisible(!pState);
titlePaneStats.setVisible(!pState);
}
}