first steps for currentOrder Tree Table

This commit is contained in:
Hendrik Schutter 2018-10-04 23:46:42 +02:00
parent 105c168157
commit 5f1b0d9ae1
8 changed files with 514 additions and 594 deletions

View File

@ -75,51 +75,7 @@ class DBController
return true; return true;
} }
} }
// table Position section
public void createTablePositionen()
{ // create table position
System.out.println("Erstelle Tabelle Positionen");
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate("DROP TABLE IF EXISTS positionen;");
stmt.executeUpdate(
"CREATE TABLE positionen (posid, name, value, cat, color);");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
}
// create 25 demo/default data entries
for (int i = 0; i < 25; i++) {
fillPositionen_Positionen(i + 1, "Noch frei", (float) 0.00, 6,
"#ad0000");
}
}
public void createTableCategory()
{ // create table position
System.out.println("Erstelle Tabelle Kategorie");
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate("DROP TABLE IF EXISTS category;");
stmt.executeUpdate("CREATE TABLE category (catid, catname);");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
}
fillCategory_Category(1, "Essen");
fillCategory_Category(2, "alkoholische Getränke");
fillCategory_Category(3, "alkoholfreie Getränke");
fillCategory_Category(4, "Kuchen");
fillCategory_Category(5, "Standard");
}
public String getCategoryNameFromPositionen(int pID) public String getCategoryNameFromPositionen(int pID)
{ {
// System.out.println("getCategoryName: " + pID); // System.out.println("getCategoryName: " + pID);
@ -154,36 +110,25 @@ class DBController
} }
public void setName_Category(int pID, String pName) // table Position section //
{ // Setzte den Namen public void createTablePositionen()
{ // create table position
System.out.println("Erstelle Tabelle Positionen");
try { try {
Statement stmt = connection.createStatement(); Statement stmt = connection.createStatement();
stmt.executeUpdate("UPDATE category SET catname = '" + pName stmt.executeUpdate("DROP TABLE IF EXISTS positionen;");
+ "'WHERE catid =" + pID + ";"); stmt.executeUpdate(
} catch (SQLException e) { "CREATE TABLE positionen (posid, name, value, cat, color);");
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
}
}
public void fillCategory_Category(int pID, String pName)
{
System.out.println("Erstelle neuen Kategorie Eintrag");
try {
PreparedStatement ps = connection
.prepareStatement("INSERT INTO category VALUES (?, ?);");
ps.setInt(1, pID); // primary
ps.setString(2, pName);
ps.addBatch();
connection.setAutoCommit(false);
ps.executeBatch(); // SQL execution
connection.setAutoCommit(true);
} catch (SQLException e) { } catch (SQLException e) {
System.err.println("Couldn't handle DB-Query"); System.err.println("Couldn't handle DB-Query");
e.printStackTrace(); e.printStackTrace();
} }
// create 25 demo/default data entries
for (int i = 0; i < 25; i++) {
fillPositionen_Positionen(i + 1, "Noch frei", (float) 0.00, 6,
"#ad0000");
}
} }
public void fillPositionen_Positionen(int pID, String pName, float pValue, public void fillPositionen_Positionen(int pID, String pName, float pValue,
@ -223,21 +168,6 @@ class DBController
} }
} }
public String getName_Category(int pID)
{ // Gibt das Datum zurück
try {
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(
"SELECT catid, catname FROM category WHERE catid = " + pID
+ ";");
return rs.getString("catname");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
return "Error 404";
}
}
public String getValue_Positionen(int pID) public String getValue_Positionen(int pID)
{ // Gibt das Konto zurück { // Gibt das Konto zurück
try { try {
@ -375,7 +305,76 @@ class DBController
} }
} }
// table Jobs section // table Category section //
public void createTableCategory()
{ // create table position
System.out.println("Erstelle Tabelle Kategorie");
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate("DROP TABLE IF EXISTS category;");
stmt.executeUpdate("CREATE TABLE category (catid, catname);");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
}
fillCategory_Category(1, "Essen");
fillCategory_Category(2, "alkoholische Getränke");
fillCategory_Category(3, "alkoholfreie Getränke");
fillCategory_Category(4, "Kuchen");
fillCategory_Category(5, "Standard");
}
public void setName_Category(int pID, String pName)
{ // Setzte den Namen
try {
Statement stmt = connection.createStatement();
stmt.executeUpdate("UPDATE category SET catname = '" + pName
+ "'WHERE catid =" + pID + ";");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
}
}
public void fillCategory_Category(int pID, String pName)
{
System.out.println("Erstelle neuen Kategorie Eintrag");
try {
PreparedStatement ps = connection
.prepareStatement("INSERT INTO category VALUES (?, ?);");
ps.setInt(1, pID); // primary
ps.setString(2, pName);
ps.addBatch();
connection.setAutoCommit(false);
ps.executeBatch(); // SQL execution
connection.setAutoCommit(true);
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
}
}
public String getName_Category(int pID)
{ // Gibt das Datum zurück
try {
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(
"SELECT catid, catname FROM category WHERE catid = " + pID
+ ";");
return rs.getString("catname");
} catch (SQLException e) {
System.err.println("Couldn't handle DB-Query");
e.printStackTrace();
return "Error 404";
}
}
// table Jobs section //
public void erstelleTabelleJobs() public void erstelleTabelleJobs()
{ // Erstelle Tabelle mit Reihen { // Erstelle Tabelle mit Reihen
System.out.println("Erstelle Tabelle Jobs"); System.out.println("Erstelle Tabelle Jobs");
@ -383,11 +382,28 @@ class DBController
Statement stmt = connection.createStatement(); Statement stmt = connection.createStatement();
stmt.executeUpdate("DROP TABLE IF EXISTS jobs;"); stmt.executeUpdate("DROP TABLE IF EXISTS jobs;");
stmt.executeUpdate( stmt.executeUpdate(
"CREATE TABLE jobs (id, time, positionen, state, value);"); "CREATE TABLE jobs (jobid, time, positionen_name, positionen_value, positionen_cat, state, jobvalue);");
} catch (SQLException e) { } catch (SQLException e) {
System.err.println("Couldn't handle DB-Query"); System.err.println("Couldn't handle DB-Query");
e.printStackTrace(); e.printStackTrace();
} }
} }
public int getLatestJobNumber_Job() {
try {
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(
"SELECT jobid from jobs ORDER BY jobid DESC LIMIT 1;");
return rs.getInt("jobid");
} catch (SQLException e) {
//System.err.println("Couldn't handle DB-Query");
//e.printStackTrace();
}
System.out.println("XXXXXXXXXXX 1 XXXXXXXXXXX");
return 1;
}
} }

82
src/application/Job.java Normal file
View File

@ -0,0 +1,82 @@
package application;
import java.util.ArrayList;
public class Job
{
private int jobnumber;
private int jobvalue;
private String jobtime;
private ArrayList<Integer> positionenQuantity;
private ArrayList<String> positionenName;
private ArrayList<Float> positionenValue;
private ArrayList<String> positionenCat;
public Job(int pJobnumber)
{
this.jobnumber = pJobnumber;
System.out.println("Neuer Job: " + this.jobnumber);
positionenQuantity = new ArrayList<Integer>();
positionenName = new ArrayList<String>();
positionenValue = new ArrayList<Float>();
positionenCat = new ArrayList<String>();
//System.out.println("Größe: " + positionenName.size());
}
public void addPosition(String pPositionenName, float pPositionenValue,
String pPositionenCat)
{
//System.out.println("addName");
for (int i = 0; i < positionenName.size(); i++) {
if (positionenName.get(i).equals(pPositionenName)) {
// Item is already in list, increase quantity
positionenQuantity.set(i, positionenQuantity.get(i) + 1);
//System.out.println("Item exists, increasing quantity");
return;
}
}
positionenName.add(pPositionenName);
positionenValue.add(pPositionenValue);
positionenCat.add(pPositionenCat);
positionenQuantity.add(1);
}
public void printJobOnConsole()
{
System.out.println("---------------------------------------------");
System.out.println("JobNummer: " + jobnumber);
System.out.println("---------------------------------------------");
//System.out.println("Größe: " + positionenName.size());
for (int i = 0; i < positionenName.size(); i++) {
System.out.println(
positionenQuantity.get(i) + " " + positionenName.get(i) + " "
+ positionenValue.get(i) + " " + positionenCat.get(i));
/*
System.out.println("i is: " + i);
System.out.println(positionenName.get(i));
System.out.println(positionenQuantity.get(i));
*/
}
System.out.println("---------------------------------------------");
}
}

View File

@ -79,6 +79,7 @@ public class Main extends Application
mwc.fillCategory(); mwc.fillCategory();
mwc.loadGridButtons(); mwc.loadGridButtons();
mwc.getSelectedCat(); //Load DB entries in Chois Box mwc.getSelectedCat(); //Load DB entries in Chois Box
mwc.createFirstJob();
} else { } else {
// config.xml NOT found, first start of app // config.xml NOT found, first start of app
System.out.println("keine XML gefunden!"); System.out.println("keine XML gefunden!");

View File

@ -17,63 +17,36 @@
<?import javafx.scene.shape.Line?> <?import javafx.scene.shape.Line?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<AnchorPane fx:id="mainAnchorpane" maxHeight="732.0" <AnchorPane fx:id="mainAnchorpane" maxHeight="732.0" maxWidth="1366.0" minHeight="732.0" minWidth="1366.0" prefHeight="732.0" prefWidth="1366.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MainWindowController">
maxWidth="1366.0" minHeight="732.0" minWidth="1366.0"
prefHeight="732.0" prefWidth="1366.0"
xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="application.MainWindowController">
<children> <children>
<TabPane layoutX="4.0" layoutY="5.0" <TabPane layoutX="4.0" layoutY="5.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="924.0" prefWidth="1536.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
nodeOrientation="RIGHT_TO_LEFT" prefHeight="924.0" prefWidth="1536.0"
tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">
<tabs> <tabs>
<Tab text="Einstellungen"> <Tab text="Einstellungen">
<content> <content>
<AnchorPane minHeight="0.0" minWidth="0.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
prefHeight="180.0" prefWidth="200.0">
<children> <children>
<Button fx:id="ueberbtn" layoutX="84.0" layoutY="79.0" <Button fx:id="ueberbtn" layoutX="84.0" layoutY="79.0" mnemonicParsing="false" onAction="#ueberbtnAction" prefHeight="0.0" prefWidth="46.0" text="Über" />
mnemonicParsing="false" onAction="#ueberbtnAction" <TitledPane alignment="CENTER" animated="false" collapsible="false" contentDisplay="CENTER" layoutX="790.0" layoutY="10.0" prefHeight="270.0" prefWidth="566.0" text="Datenbank Einstellungen">
prefHeight="0.0" prefWidth="46.0" text="Über" />
<TitledPane alignment="CENTER" animated="false"
collapsible="false" contentDisplay="CENTER" layoutX="790.0"
layoutY="10.0" prefHeight="270.0" prefWidth="566.0"
text="Datenbank Einstellungen">
<content> <content>
<AnchorPane fx:id="paneDB" minHeight="0.0" <AnchorPane fx:id="paneDB" minHeight="0.0" minWidth="0.0" prefHeight="238.0" prefWidth="564.0">
minWidth="0.0" prefHeight="238.0" prefWidth="564.0">
<children> <children>
<Label fx:id="labelDBName" alignment="TOP_RIGHT" <Label fx:id="labelDBName" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="329.0" layoutY="10.0" prefHeight="34.0" prefWidth="229.0" text="Datenbankname:">
contentDisplay="RIGHT" layoutX="329.0" layoutY="10.0"
prefHeight="34.0" prefWidth="229.0" text="Datenbankname:">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<JFXTextField fx:id="tftNewDBName" <JFXTextField fx:id="tftNewDBName" alignment="CENTER" layoutX="25.0" layoutY="10.0" prefHeight="25.0" prefWidth="376.0" />
alignment="CENTER" layoutX="25.0" layoutY="10.0" <Label fx:id="labelDBStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="1.0" layoutY="75.0" prefHeight="34.0" prefWidth="551.0" text="Keine Datenbank gefunden!">
prefHeight="25.0" prefWidth="376.0" />
<Label fx:id="labelDBStatus" alignment="TOP_RIGHT"
contentDisplay="RIGHT" layoutX="1.0" layoutY="75.0"
prefHeight="34.0" prefWidth="551.0"
text="Keine Datenbank gefunden!">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<Button fx:id="btnCreateNewDatabase" layoutX="317.0" <Button fx:id="btnCreateNewDatabase" layoutX="317.0" layoutY="126.0" mnemonicParsing="false" onAction="#btnCreateNewDatabaseAction" text="Neue Datenbank anlegen">
layoutY="126.0" mnemonicParsing="false"
onAction="#btnCreateNewDatabaseAction"
text="Neue Datenbank anlegen">
<font> <font>
<Font name="Cantarell Regular" size="13.0" /> <Font name="Cantarell Regular" size="13.0" />
</font> </font>
</Button> </Button>
<Button fx:id="btnOpenFolder" layoutX="99.0" <Button fx:id="btnOpenFolder" layoutX="99.0" layoutY="126.0" mnemonicParsing="false" onAction="#btnOpenFolderAction" text="Speicherort öffnen">
layoutY="126.0" mnemonicParsing="false"
onAction="#btnOpenFolderAction" text="Speicherort öffnen">
<font> <font>
<Font name="Cantarell Regular" size="13.0" /> <Font name="Cantarell Regular" size="13.0" />
</font> </font>
@ -85,69 +58,41 @@
<Font name="Cantarell Regular" size="13.0" /> <Font name="Cantarell Regular" size="13.0" />
</font> </font>
</TitledPane> </TitledPane>
<TitledPane fx:id="titlePaneCat" alignment="CENTER" <TitledPane fx:id="titlePaneCat" alignment="CENTER" animated="false" collapsible="false" contentDisplay="CENTER" layoutX="170.0" layoutY="10.0" prefHeight="270.0" prefWidth="566.0" text="Kategorien (z.B. Getränke, Essen oder Kuchen)" textAlignment="CENTER">
animated="false" collapsible="false" contentDisplay="CENTER"
layoutX="170.0" layoutY="10.0" prefHeight="270.0"
prefWidth="566.0"
text="Kategorien (z.B. Getränke, Essen oder Kuchen)"
textAlignment="CENTER">
<content> <content>
<AnchorPane minHeight="0.0" minWidth="0.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="260.0" prefWidth="564.0">
prefHeight="260.0" prefWidth="564.0">
<children> <children>
<Label fx:id="labelCat01" alignment="TOP_RIGHT" <Label fx:id="labelCat01" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="434.0" layoutY="10.0" prefHeight="34.0" prefWidth="124.0" text="Kategorie 1:">
contentDisplay="RIGHT" layoutX="434.0" layoutY="10.0"
prefHeight="34.0" prefWidth="124.0" text="Kategorie 1:">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<Label fx:id="labelCat02" alignment="TOP_RIGHT" <Label fx:id="labelCat02" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="442.0" layoutY="50.0" prefHeight="34.0" prefWidth="116.0" text="Kategorie 2:">
contentDisplay="RIGHT" layoutX="442.0" layoutY="50.0"
prefHeight="34.0" prefWidth="116.0" text="Kategorie 2:">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<Label fx:id="labelCat05" alignment="TOP_RIGHT" <Label fx:id="labelCat05" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="448.0" layoutY="170.0" prefHeight="34.0" prefWidth="110.0" text="Kategorie 5:">
contentDisplay="RIGHT" layoutX="448.0" layoutY="170.0"
prefHeight="34.0" prefWidth="110.0" text="Kategorie 5:">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<Label fx:id="labelCat04" alignment="TOP_RIGHT" <Label fx:id="labelCat04" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="454.0" layoutY="130.0" prefHeight="34.0" prefWidth="104.0" text="Kategorie 4:">
contentDisplay="RIGHT" layoutX="454.0" layoutY="130.0"
prefHeight="34.0" prefWidth="104.0" text="Kategorie 4:">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<Label fx:id="labelCat03" alignment="TOP_RIGHT" <Label fx:id="labelCat03" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="451.0" layoutY="90.0" prefHeight="34.0" prefWidth="107.0" text="Kategorie 3:">
contentDisplay="RIGHT" layoutX="451.0" layoutY="90.0"
prefHeight="34.0" prefWidth="107.0" text="Kategorie 3:">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<JFXTextField fx:id="tftKat01" <JFXTextField fx:id="tftKat01" alignment="CENTER" layoutX="50.0" layoutY="5.0" prefHeight="25.0" prefWidth="376.0" />
alignment="CENTER" layoutX="50.0" layoutY="5.0" <JFXTextField fx:id="tftKat02" alignment="CENTER" layoutX="50.0" layoutY="45.0" prefHeight="25.0" prefWidth="376.0" />
prefHeight="25.0" prefWidth="376.0" /> <JFXTextField fx:id="tftKat03" alignment="CENTER" layoutX="50.0" layoutY="85.0" prefHeight="25.0" prefWidth="376.0" />
<JFXTextField fx:id="tftKat02" <JFXTextField fx:id="tftKat04" alignment="CENTER" layoutX="50.0" layoutY="125.0" prefHeight="25.0" prefWidth="376.0" />
alignment="CENTER" layoutX="50.0" layoutY="45.0" <JFXTextField fx:id="tftKat05" alignment="CENTER" layoutX="50.0" layoutY="165.0" prefHeight="25.0" prefWidth="376.0" />
prefHeight="25.0" prefWidth="376.0" /> <Button fx:id="btnSaveCat" layoutX="200.0" layoutY="204.0" mnemonicParsing="false" onAction="#btnSaveCatAction" text="Kategorien speichern">
<JFXTextField fx:id="tftKat03"
alignment="CENTER" layoutX="50.0" layoutY="85.0"
prefHeight="25.0" prefWidth="376.0" />
<JFXTextField fx:id="tftKat04"
alignment="CENTER" layoutX="50.0" layoutY="125.0"
prefHeight="25.0" prefWidth="376.0" />
<JFXTextField fx:id="tftKat05"
alignment="CENTER" layoutX="50.0" layoutY="165.0"
prefHeight="25.0" prefWidth="376.0" />
<Button fx:id="btnSaveCat" layoutX="200.0"
layoutY="204.0" mnemonicParsing="false"
onAction="#btnSaveCatAction" text="Kategorien speichern">
<font> <font>
<Font name="Cantarell Regular" size="13.0" /> <Font name="Cantarell Regular" size="13.0" />
</font> </font>
@ -165,109 +110,66 @@
</Tab> </Tab>
<Tab text="Positionen bearbeiten"> <Tab text="Positionen bearbeiten">
<content> <content>
<AnchorPane minHeight="0.0" minWidth="0.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
prefHeight="180.0" prefWidth="200.0">
<children> <children>
<TreeTableView fx:id="entryTreeTable" <TreeTableView fx:id="entryTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="502.0" prefWidth="1346.0">
layoutX="11.0" layoutY="10.0" prefHeight="502.0"
prefWidth="1346.0">
<columns> <columns>
<TreeTableColumn fx:id="columnColor" <TreeTableColumn fx:id="columnColor" editable="false" maxWidth="428.0" minWidth="119.333251953125" prefWidth="119.333251953125" resizable="false" sortable="false" text="Farbe" />
editable="false" maxWidth="237.3333740234375" <TreeTableColumn fx:id="columnCat" editable="false" maxWidth="800.0" minWidth="94.0" prefWidth="300.0" resizable="false" sortable="false" text="Kategorie" />
minWidth="164.0" prefWidth="164.0" resizable="false" <TreeTableColumn fx:id="columnPrize" editable="false" maxWidth="693.3333129882812" minWidth="44.33331298828125" prefWidth="140.33331298828125" resizable="false" sortable="false" text="Preis" />
sortable="false" text="Farbe" /> <TreeTableColumn fx:id="columnPositionsEdit" editable="false" maxWidth="1581.6666870117188" minWidth="38.0" prefWidth="596.333251953125" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnCat" <TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="1218.0" minWidth="59.0" prefWidth="144.666748046875" resizable="false" sortable="false" text="Nummer" />
editable="false" maxWidth="800.0"
minWidth="176.33331298828125" prefWidth="370.0"
resizable="false" sortable="false" text="Kategorie" />
<TreeTableColumn fx:id="columnPrize"
editable="false" maxWidth="693.3333129882812"
minWidth="44.33331298828125" prefWidth="126.66668701171875"
resizable="false" sortable="false" text="Preis" />
<TreeTableColumn fx:id="columnPositionsEdit"
editable="false" maxWidth="1581.6666870117188"
minWidth="38.0" prefWidth="543.3333129882812"
resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnPosnumber"
editable="false" maxWidth="1218.0" minWidth="60.666748046875"
prefWidth="148.6666259765625" resizable="false"
sortable="false" text="Nummer" />
</columns> </columns>
<columnResizePolicy> <columnResizePolicy>
<TreeTableView <TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy> </columnResizePolicy>
</TreeTableView> </TreeTableView>
<Button fx:id="btnSaveEntry" layoutX="494.0" <Button fx:id="btnSaveEntry" layoutX="494.0" layoutY="631.0" mnemonicParsing="false" onAction="#btnSaveEntryAction" text="Ausgewählten Eintrag speichern">
layoutY="631.0" mnemonicParsing="false"
onAction="#btnSaveEntryAction"
text="Ausgewählten Eintrag speichern">
<font> <font>
<Font name="Cantarell Regular" size="17.0" /> <Font name="Cantarell Regular" size="17.0" />
</font> </font>
</Button> </Button>
<Button fx:id="btnClearEntry" layoutX="462.0" <Button fx:id="btnClearEntry" layoutX="462.0" layoutY="525.0" mnemonicParsing="false" onAction="#btnClearEntryAction" text="Ausgewählten Eintrag zurücksetzten">
layoutY="525.0" mnemonicParsing="false"
onAction="#btnClearEntryAction"
text="Ausgewählten Eintrag zurücksetzten">
<font> <font>
<Font name="Cantarell Regular" size="17.0" /> <Font name="Cantarell Regular" size="17.0" />
</font> </font>
</Button> </Button>
<TitledPane fx:id="titledPaneEntry" <TitledPane fx:id="titledPaneEntry" alignment="CENTER" animated="false" collapsible="false" contentDisplay="CENTER" layoutX="792.0" layoutY="525.0" prefHeight="163.0" prefWidth="565.0" text="Eintrag editieren">
alignment="CENTER" animated="false" collapsible="false"
contentDisplay="CENTER" layoutX="792.0" layoutY="525.0"
prefHeight="163.0" prefWidth="565.0" text="Eintrag editieren">
<content> <content>
<AnchorPane minHeight="0.0" minWidth="0.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
prefHeight="180.0" prefWidth="200.0">
<children> <children>
<Label fx:id="lableNewPosition" alignment="TOP_RIGHT" <Label fx:id="lableNewPosition" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="455.0" layoutY="10.0" prefHeight="34.0" prefWidth="105.0" text="Position:">
contentDisplay="RIGHT" layoutX="455.0" layoutY="10.0"
prefHeight="34.0" prefWidth="105.0" text="Position:">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<JFXTextField fx:id="tftNewPosition" <JFXTextField fx:id="tftNewPosition" alignment="CENTER" layoutX="160.0" layoutY="10.0" prefHeight="25.0" prefWidth="279.0">
alignment="CENTER" layoutX="160.0" layoutY="10.0"
prefHeight="25.0" prefWidth="279.0">
<font> <font>
<Font name="Cantarell Regular" size="13.0" /> <Font name="Cantarell Regular" size="13.0" />
</font> </font>
</JFXTextField> </JFXTextField>
<Label fx:id="labelNewValue" alignment="TOP_RIGHT" <Label fx:id="labelNewValue" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="442.0" layoutY="50.0" prefHeight="34.0" prefWidth="118.0" text="Preis in Euro:">
contentDisplay="RIGHT" layoutX="442.0" layoutY="50.0"
prefHeight="34.0" prefWidth="118.0" text="Preis in Euro:">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<JFXTextField fx:id="tftNewValue" <JFXTextField fx:id="tftNewValue" alignment="CENTER" layoutX="380.0" layoutY="50.0" prefHeight="25.0" prefWidth="58.0">
alignment="CENTER" layoutX="380.0" layoutY="50.0"
prefHeight="25.0" prefWidth="58.0">
<font> <font>
<Font name="Cantarell Regular" size="13.0" /> <Font name="Cantarell Regular" size="13.0" />
</font> </font>
</JFXTextField> </JFXTextField>
<Label fx:id="lableNewColor" alignment="TOP_RIGHT" <Label fx:id="lableNewColor" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="455.0" layoutY="90.0" prefHeight="34.0" prefWidth="105.0" text="Farbe:">
contentDisplay="RIGHT" layoutX="455.0" layoutY="90.0"
prefHeight="34.0" prefWidth="105.0" text="Farbe:">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<ChoiceBox fx:id="colorChoise" layoutX="346.0" <ChoiceBox fx:id="colorChoise" layoutX="346.0" layoutY="90.0" prefHeight="25.0" prefWidth="96.0" />
layoutY="90.0" prefHeight="25.0" prefWidth="96.0" /> <Label fx:id="lableSelectCat" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="204.0" layoutY="90.0" prefHeight="34.0" prefWidth="105.0" text="Kategorie:">
<Label fx:id="lableSelectCat" alignment="TOP_RIGHT"
contentDisplay="RIGHT" layoutX="204.0" layoutY="90.0"
prefHeight="34.0" prefWidth="105.0" text="Kategorie:">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<ChoiceBox fx:id="catChoise" layoutX="25.0" <ChoiceBox fx:id="catChoise" layoutX="25.0" layoutY="90.0" prefHeight="25.0" prefWidth="180.0" />
layoutY="90.0" prefHeight="25.0" prefWidth="180.0" />
</children> </children>
</AnchorPane> </AnchorPane>
</content> </content>
@ -281,65 +183,37 @@
</Tab> </Tab>
<Tab text="Aufträge"> <Tab text="Aufträge">
<content> <content>
<AnchorPane minHeight="0.0" minWidth="0.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="850.0" prefWidth="1536.0">
prefHeight="850.0" prefWidth="1536.0">
<children> <children>
<TreeTableView fx:id="jobsTreeTable" <TreeTableView fx:id="jobsTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="541.0" prefWidth="1346.0">
layoutX="11.0" layoutY="10.0" prefHeight="541.0"
prefWidth="1346.0">
<columns> <columns>
<TreeTableColumn fx:id="columnJobValue" <TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="90.6666259765625" resizable="false" text="Betrag" />
editable="false" prefWidth="90.6666259765625" <TreeTableColumn fx:id="columnState" editable="false" prefWidth="91.0" resizable="false" text="Zustand" />
resizable="false" text="Betrag" /> <TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="981.333251953125" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnState" <TreeTableColumn fx:id="columnTime" editable="false" prefWidth="99.666748046875" resizable="false" text="Zeit" />
editable="false" prefWidth="91.0" resizable="false" <TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="83.6666259765625" resizable="false" text="Nummer" />
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="columnJobNumber"
editable="false" maxWidth="3000.0"
prefWidth="83.6666259765625" resizable="false" text="Nummer" />
</columns> </columns>
</TreeTableView> </TreeTableView>
<Button fx:id="btnReprintJob" layoutX="378.0" <Button fx:id="btnReprintJob" layoutX="378.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnReprintJobAction" text="Ausgewählter Auftrag drucken">
layoutY="603.0" mnemonicParsing="false"
onAction="#btnReprintJobAction"
text="Ausgewählter Auftrag drucken">
<font> <font>
<Font name="Cantarell Regular" size="17.0" /> <Font name="Cantarell Regular" size="17.0" />
</font> </font>
</Button> </Button>
<TitledPane fx:id="titlePaneStats" alignment="CENTER" <TitledPane fx:id="titlePaneStats" alignment="CENTER" collapsible="false" contentDisplay="CENTER" layoutX="992.0" layoutY="561.0" prefHeight="118.0" prefWidth="365.0" text="Statistik - 30.03.2018 15:15 Uhr">
collapsible="false" contentDisplay="CENTER" layoutX="992.0"
layoutY="561.0" prefHeight="118.0" prefWidth="365.0"
text="Statistik - 30.03.2018 15:15 Uhr">
<content> <content>
<AnchorPane minHeight="0.0" minWidth="0.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="59.0" prefWidth="483.0">
prefHeight="59.0" prefWidth="483.0">
<children> <children>
<Label fx:id="lableJobCount" alignment="TOP_RIGHT" <Label fx:id="lableJobCount" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="17.0" layoutY="2.0" prefHeight="34.0" prefWidth="340.0" text="Anzahl Aufträge: 2781">
contentDisplay="RIGHT" layoutX="17.0" layoutY="2.0"
prefHeight="34.0" prefWidth="340.0"
text="Anzahl Aufträge: 2781">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<Label fx:id="labelAvgJob" alignment="TOP_RIGHT" <Label fx:id="labelAvgJob" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="17.0" layoutY="30.0" prefHeight="34.0" prefWidth="340.0" text="Durchschnittlicher Auftragswert: 12,90€">
contentDisplay="RIGHT" layoutX="17.0" layoutY="30.0"
prefHeight="34.0" prefWidth="340.0"
text="Durchschnittlicher Auftragswert: 12,90€">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
</Label> </Label>
<Label fx:id="lableAllValue" alignment="TOP_RIGHT" <Label fx:id="lableAllValue" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="17.0" layoutY="60.0" prefHeight="34.0" prefWidth="340.0" text="Gesamt: 1088,48€">
contentDisplay="RIGHT" layoutX="17.0" layoutY="60.0"
prefHeight="34.0" prefWidth="340.0" text="Gesamt: 1088,48€">
<font> <font>
<Font name="Cantarell Regular" size="18.0" /> <Font name="Cantarell Regular" size="18.0" />
</font> </font>
@ -348,17 +222,12 @@
</AnchorPane> </AnchorPane>
</content> </content>
</TitledPane> </TitledPane>
<Button fx:id="btnCancelJob" layoutX="44.0" <Button fx:id="btnCancelJob" layoutX="44.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnCancelJobAction" text="Ausgewählter Auftrag stornieren">
layoutY="603.0" mnemonicParsing="false"
onAction="#btnCancelJobAction"
text="Ausgewählter Auftrag stornieren">
<font> <font>
<Font name="Cantarell Regular" size="17.0" /> <Font name="Cantarell Regular" size="17.0" />
</font> </font>
</Button> </Button>
<Button fx:id="btnCalcStats" layoutX="712.0" <Button fx:id="btnCalcStats" layoutX="712.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnCalcStatsAction" text="Statistiken berrechnen">
layoutY="603.0" mnemonicParsing="false"
onAction="#btnCalcStatsAction" text="Statistiken berrechnen">
<font> <font>
<Font name="Cantarell Regular" size="17.0" /> <Font name="Cantarell Regular" size="17.0" />
</font> </font>
@ -369,350 +238,188 @@
</Tab> </Tab>
<Tab text="Neuer Auftrag"> <Tab text="Neuer Auftrag">
<content> <content>
<AnchorPane minHeight="0.0" minWidth="0.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="850.0" prefWidth="1536.0">
prefHeight="850.0" prefWidth="1536.0">
<children> <children>
<TreeTableView fx:id="tableCurrentOrder" <TreeTableView fx:id="tableCurrentOrder" layoutX="15.0" layoutY="85.0" prefHeight="379.0" prefWidth="382.0">
layoutX="15.0" layoutY="85.0" prefHeight="379.0"
prefWidth="382.0">
<columns> <columns>
<TreeTableColumn fx:id="columnPosition" <TreeTableColumn fx:id="columnPosition" editable="false" prefWidth="282.3333740234375" resizable="false" sortable="false" text="Position" />
editable="false" prefWidth="304.3333740234375" <TreeTableColumn fx:id="columnQuantity" editable="false" prefWidth="81.66668701171875" resizable="false" sortable="false" text="Anzahl" />
resizable="false" sortable="false" text="Position" />
<TreeTableColumn fx:id="columnQuantity"
editable="false" prefWidth="80.6666259765625"
resizable="false" sortable="false" text="Anzahl" />
</columns> </columns>
</TreeTableView> </TreeTableView>
<GridPane gridLinesVisible="true" layoutX="430.0" <GridPane gridLinesVisible="true" layoutX="430.0" layoutY="15.0" prefHeight="670.0" prefWidth="920.0">
layoutY="15.0" prefHeight="670.0" prefWidth="920.0">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
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> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints minHeight="10.0" <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0"
prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0"
prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<JFXButton fx:id="gridButton04" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton05" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton03" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton02" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton01" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton10" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton09" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton08" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton07" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton06" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton15" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton14" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton13" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton12" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton11" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton20" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton19" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton18" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton17" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton16" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton25" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton23" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton22" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton21" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
<JFXButton fx:id="gridButton24" buttonType="RAISED" <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">
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>
<Font name="Cantarell Regular" size="24.0" /> <Font name="Cantarell Regular" size="24.0" />
</font> </font>
</JFXButton> </JFXButton>
</children> </children>
</GridPane> </GridPane>
<Button fx:id="btnPrintBill" contentDisplay="CENTER" <Button fx:id="btnPrintBill" contentDisplay="CENTER" defaultButton="true" graphicTextGap="1.0" layoutX="75.0" layoutY="599.0" maxHeight="88.0" minHeight="75.0" mnemonicParsing="false" onAction="#btnPrintBillAction" prefHeight="88.0" prefWidth="258.0" text="Drucken" wrapText="true">
defaultButton="true" graphicTextGap="1.0" layoutX="75.0"
layoutY="599.0" maxHeight="88.0" minHeight="75.0"
mnemonicParsing="false" onAction="#btnPrintBillAction"
prefHeight="88.0" prefWidth="258.0" text="Drucken"
wrapText="true">
<font> <font>
<Font name="Cantarell Bold" size="48.0" /> <Font name="Cantarell Bold" size="48.0" />
</font> </font>
</Button> </Button>
<Button fx:id="btnDeleteSelectedPosition" layoutX="43.0" <Button fx:id="btnDeleteSelectedPosition" layoutX="43.0" layoutY="475.0" mnemonicParsing="false" onAction="#btnDeleteSelectedPositionAction" prefHeight="17.0" prefWidth="332.0" text="Ausgewählte Position löschen" textAlignment="CENTER">
layoutY="475.0" mnemonicParsing="false"
onAction="#btnDeleteSelectedPositionAction" prefHeight="17.0"
prefWidth="332.0" text="Ausgewählte Position löschen"
textAlignment="CENTER">
<font> <font>
<Font name="Cantarell Regular" size="20.0" /> <Font name="Cantarell Regular" size="20.0" />
</font> </font>
</Button> </Button>
<Label fx:id="labelAllPrize" alignment="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">
contentDisplay="CENTER" layoutX="10.0" layoutY="505.0"
prefHeight="15.0" prefWidth="386.0" text="0,00 €"
textAlignment="CENTER">
<font> <font>
<Font name="Open Sans" size="70.0" /> <Font name="Open Sans" size="70.0" />
</font> </font>
</Label> </Label>
<Label fx:id="labelJobCounter" alignment="TOP_RIGHT" <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">
contentDisplay="CENTER" layoutX="5.0" layoutY="45.0"
prefHeight="34.0" prefWidth="392.0" text="Auftragsnummer: 0"
textAlignment="CENTER">
<font> <font>
<Font name="Cantarell Regular" size="26.0" /> <Font name="Cantarell Regular" size="26.0" />
</font> </font>
</Label> </Label>
<Label fx:id="labelTime" alignment="TOP_RIGHT" <Label fx:id="labelTime" alignment="TOP_RIGHT" layoutX="7.0" layoutY="11.0" maxHeight="33.0" maxWidth="392.0" minHeight="33.0" minWidth="392.0" prefHeight="33.0" prefWidth="392.0" text="Uhrzeit: 12:15">
layoutX="7.0" layoutY="11.0" maxHeight="33.0" maxWidth="392.0"
minHeight="33.0" minWidth="392.0" prefHeight="33.0"
prefWidth="392.0" text="Uhrzeit: 12:15">
<font> <font>
<Font name="Cantarell Regular" size="26.0" /> <Font name="Cantarell Regular" size="26.0" />
</font> </font>
</Label> </Label>
<JFXButton fx:id="btnLock" buttonType="RAISED" <JFXButton fx:id="btnLock" buttonType="RAISED" cancelButton="true" layoutX="1.0" layoutY="6.0" lineSpacing="2.0" onAction="#btnLockAction" prefHeight="42.0" prefWidth="180.0" ripplerFill="BLACK" text="Kasse sperren" textAlignment="CENTER" textFill="#c91c1c" textOverrun="LEADING_WORD_ELLIPSIS">
cancelButton="true" layoutX="1.0" layoutY="6.0"
lineSpacing="2.0" onAction="#btnLockAction" prefHeight="42.0"
prefWidth="180.0" ripplerFill="BLACK" text="Kasse sperren"
textAlignment="CENTER" textFill="#c91c1c"
textOverrun="LEADING_WORD_ELLIPSIS">
<font> <font>
<Font name="Cantarell Regular" size="19.0" /> <Font name="Cantarell Regular" size="19.0" />
</font> </font>
</JFXButton> </JFXButton>
<Line endX="800.0" layoutX="62.0" layoutY="465.0" <Line endX="800.0" layoutX="62.0" layoutY="465.0" rotate="90.0" startX="-100.0" strokeWidth="4.0" />
rotate="90.0" startX="-100.0" strokeWidth="4.0" />
</children> </children>
</AnchorPane> </AnchorPane>
</content> </content>

View File

@ -35,7 +35,6 @@ import javafx.scene.control.Label;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane; import javafx.scene.layout.GridPane;
import javafx.util.Pair; import javafx.util.Pair;
import sun.jvm.hotspot.tools.SysPropsDumper;
public class MainWindowController public class MainWindowController
{ {
@ -51,38 +50,38 @@ public class MainWindowController
private AnchorPane paneDB; private AnchorPane paneDB;
@FXML @FXML
private TreeTableView<tableData> tableCurrentOrder; private TreeTableView<tableDataCurrentOrder> tableCurrentOrder;
@FXML @FXML
private TreeTableColumn<tableData, String> columnQuantity; private TreeTableColumn<tableDataCurrentOrder, Integer> columnQuantity;
@FXML @FXML
private TreeTableColumn<tableData, String> columnPosition; private TreeTableColumn<tableDataCurrentOrder, String> columnPosition;
@FXML @FXML
private TreeTableColumn<tableData, Integer> idSpalte01 = new TreeTableColumn<>( private TreeTableColumn<tableDataCurrentOrder, Integer> idSpalte01 = new TreeTableColumn<>(
"tableCurrentOrder"); "tableCurrentOrder");
@FXML @FXML
private TreeTableView<tableData> jobsTreeTable; private TreeTableView<tableDataJob> jobsTreeTable;
@FXML @FXML
private TreeTableColumn<tableData, String> columnJobValue; private TreeTableColumn<tableDataJob, String> columnJobValue;
@FXML @FXML
private TreeTableColumn<tableData, String> columnState; private TreeTableColumn<tableDataJob, String> columnState;
@FXML @FXML
private TreeTableColumn<tableData, String> columnPositions; private TreeTableColumn<tableDataJob, String> columnPositions;
@FXML @FXML
private TreeTableColumn<tableData, String> columnTime; private TreeTableColumn<tableDataJob, String> columnTime;
@FXML @FXML
private TreeTableColumn<tableData, String> columnJobNumber; private TreeTableColumn<tableDataJob, String> columnJobNumber;
@FXML @FXML
private TreeTableColumn<tableData, Integer> idSpalte02 = new TreeTableColumn<>( private TreeTableColumn<tableDataJob, Integer> idSpalte02 = new TreeTableColumn<>(
"jobsTreeTable"); "jobsTreeTable");
@FXML @FXML
@ -321,13 +320,17 @@ public class MainWindowController
private String databaseName; private String databaseName;
private boolean lockState = false; private boolean lockState = false;
private boolean isPrintBtnDisabled = true;
private Job currentJob = null;
@FXML @FXML
TreeItem<tableData> rootCurrentJob = new TreeItem<>( TreeItem<tableDataCurrentOrder> rootCurrentJob = new TreeItem<>(
new tableData(0, "0", "0")); new tableDataCurrentOrder("0", 0));
@FXML @FXML
TreeItem<tableData> rootJobs = new TreeItem<>(new tableData(0, "0", "0")); TreeItem<tableDataCurrentOrder> rootJobs = new TreeItem<>(new tableDataCurrentOrder("0", 0));
@FXML @FXML
TreeItem<tableDataPositionen> rootPositionen = new TreeItem<>( TreeItem<tableDataPositionen> rootPositionen = new TreeItem<>(
@ -487,158 +490,167 @@ public class MainWindowController
@FXML @FXML
public void btnPrintBillAction(ActionEvent event) public void btnPrintBillAction(ActionEvent event)
{ {
System.out.println("Button!"); //System.out.println("Button!");
currentJob.printJobOnConsole();
currentJob = null;
currentJob = new Job(dbc.getLatestJobNumber_Job());
btnPrintBill.setDisable(true);
isPrintBtnDisabled = true;
} }
@FXML @FXML
public void gridButton01Action(ActionEvent event) public void gridButton01Action(ActionEvent event)
{ {
System.out.println("Test Button!"); handelGridButtons(1);
} }
@FXML @FXML
public void gridButton02Action(ActionEvent event) public void gridButton02Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(2);
} }
@FXML @FXML
public void gridButton03Action(ActionEvent event) public void gridButton03Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(3);
} }
@FXML @FXML
public void gridButton04Action(ActionEvent event) public void gridButton04Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(4);
} }
@FXML @FXML
public void gridButton05Action(ActionEvent event) public void gridButton05Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(5);
} }
@FXML @FXML
public void gridButton06Action(ActionEvent event) public void gridButton06Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(6);
} }
@FXML @FXML
public void gridButton07Action(ActionEvent event) public void gridButton07Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(7);
} }
@FXML @FXML
public void gridButton08Action(ActionEvent event) public void gridButton08Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(8);
} }
@FXML @FXML
public void gridButton09Action(ActionEvent event) public void gridButton09Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(9);
} }
@FXML @FXML
public void gridButton10Action(ActionEvent event) public void gridButton10Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(10);
} }
@FXML @FXML
public void gridButton11Action(ActionEvent event) public void gridButton11Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(11);
} }
@FXML @FXML
public void gridButton12Action(ActionEvent event) public void gridButton12Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(12);
} }
@FXML @FXML
public void gridButton13Action(ActionEvent event) public void gridButton13Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(13);
} }
@FXML @FXML
public void gridButton14Action(ActionEvent event) public void gridButton14Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(14);
} }
@FXML @FXML
public void gridButton15Action(ActionEvent event) public void gridButton15Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(15);
} }
@FXML @FXML
public void gridButton16Action(ActionEvent event) public void gridButton16Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(16);
} }
@FXML @FXML
public void gridButton17Action(ActionEvent event) public void gridButton17Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(17);
} }
@FXML @FXML
public void gridButton18Action(ActionEvent event) public void gridButton18Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(18);
} }
@FXML @FXML
public void gridButton19Action(ActionEvent event) public void gridButton19Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(19);
} }
@FXML @FXML
public void gridButton20Action(ActionEvent event) public void gridButton20Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(20);
} }
@FXML @FXML
public void gridButton21Action(ActionEvent event) public void gridButton21Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(21);
} }
@FXML @FXML
public void gridButton22Action(ActionEvent event) public void gridButton22Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(22);
} }
@FXML @FXML
public void gridButton23Action(ActionEvent event) public void gridButton23Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(23);
} }
@FXML @FXML
public void gridButton24Action(ActionEvent event) public void gridButton24Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(24);
} }
@FXML @FXML
public void gridButton25Action(ActionEvent event) public void gridButton25Action(ActionEvent event)
{ {
System.out.println("Button!"); handelGridButtons(25);
} }
@FXML @FXML
@ -665,7 +677,10 @@ public class MainWindowController
System.out.println("initUI"); System.out.println("initUI");
tftNewDBName.setText(getDatabaseName()); tftNewDBName.setText(getDatabaseName());
tftKat05.setDisable(true); tftKat05.setDisable(true);
btnPrintBill.setDisable(true);
isPrintBtnDisabled = true;
initPositionen(); initPositionen();
initCurrentOrderTreeTableView();
} }
@ -980,7 +995,17 @@ public class MainWindowController
btnCalcStats.setDisable(pState); btnCalcStats.setDisable(pState);
btnClearEntry.setDisable(pState); btnClearEntry.setDisable(pState);
btnDeleteSelectedPosition.setDisable(pState); btnDeleteSelectedPosition.setDisable(pState);
btnPrintBill.setDisable(pState);
if((!isPrintBtnDisabled) && (!pState)) {
// print was not disabled and will be enabled again
btnPrintBill.setDisable(pState);
}
if(pState) {
// disable allways
btnPrintBill.setDisable(pState);
}
btnReprintJob.setDisable(pState); btnReprintJob.setDisable(pState);
btnSaveEntry.setDisable(pState); btnSaveEntry.setDisable(pState);
btnCancelJob.setDisable(pState); btnCancelJob.setDisable(pState);
@ -995,7 +1020,7 @@ public class MainWindowController
catChoise.setDisable(pState); catChoise.setDisable(pState);
tableCurrentOrder.setDisable(pState); tableCurrentOrder.setDisable(pState);
jobsTreeTable.setDisable(pState); //jobsTreeTable.setDisable(pState);
entryTreeTable.setDisable(pState); entryTreeTable.setDisable(pState);
labelAllPrize.setVisible(!pState); labelAllPrize.setVisible(!pState);
@ -1095,6 +1120,61 @@ public class MainWindowController
} }
} }
private void handelGridButtons(int pID)
{
System.out.println("Button: " + pID);
currentJob.addPosition(dbc.getName_Positionen(pID),
Float.parseFloat(dbc.getValue_Positionen(pID)),
dbc.getCategoryNameFromPositionen(pID));
btnPrintBill.setDisable(false);
isPrintBtnDisabled = false;
tableDataCurrentOrder test01 = new tableDataCurrentOrder("Test", 42);
rootCurrentJob.getChildren().remove(0,
rootCurrentJob.getChildren().size());
rootCurrentJob.getChildren().add(new TreeItem<tableDataCurrentOrder>(test01));
}
private void initCurrentOrderTreeTableView() {
columnQuantity.setStyle("-fx-alignment: CENTER;");
columnPosition.setStyle("-fx-alignment: CENTER;");
tableCurrentOrder.setRoot(rootCurrentJob);
tableCurrentOrder.setShowRoot(false);
tableCurrentOrder.setEditable(false);
columnQuantity.setCellValueFactory(
cellData -> cellData.getValue().getValue().quantityProperty().asObject());
columnPosition.setCellValueFactory(
cellData -> cellData.getValue().getValue().positionProperty());
}
public void createFirstJob()
{
currentJob = new Job(dbc.getLatestJobNumber_Job());
}
public void updateTimeLabel() public void updateTimeLabel()
{ {
// System.out.println(getSystemTime()); // System.out.println(getSystemTime());

View File

@ -1,68 +0,0 @@
package application;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
public class tableData
{ // Datenobjekt mit der ID, Datum und Konto
private final IntegerProperty id = new SimpleIntegerProperty();
private final StringProperty datum = new SimpleStringProperty();
private final StringProperty konto = new SimpleStringProperty();
public tableData(final int id, final String datum, final String konto)
{
this.id.set(id);
this.datum.set(datum);
this.konto.set(konto);
}
public IntegerProperty idProperty()
{
return id;
}
public StringProperty datumProperty()
{
return datum;
}
public StringProperty kontoProperty()
{
return konto;
}
public int getID()
{
return idProperty().get();
}
public String getDatum()
{
return datumProperty().get();
}
public String getKonto()
{
return kontoProperty().get();
}
public final void setID(int id)
{
idProperty().set(id);
}
public final void setdatum(String datum)
{
datumProperty().set(datum);
}
public final void setkonto(String konto)
{
kontoProperty().set(konto);
}
}

View File

@ -0,0 +1,51 @@
package application;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
public class tableDataCurrentOrder
{
private final StringProperty position = new SimpleStringProperty();
private final IntegerProperty quantity = new SimpleIntegerProperty();
public tableDataCurrentOrder(final String pPosition, final Integer pQuantity)
{
this.position.set(pPosition);
this.quantity.set(pQuantity);
}
public StringProperty positionProperty()
{
return position;
}
public IntegerProperty quantityProperty()
{
return quantity;
}
public String getPosition()
{
return positionProperty().get();
}
public Integer getQuantity()
{
return quantityProperty().get();
}
public final void setPosition(String pPosition)
{
positionProperty().set(pPosition);
}
public final void setQuantity(int pQuantity)
{
quantityProperty().set(pQuantity);
}
}

View File

@ -0,0 +1,51 @@
package application;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
public class tableDataJob
{
private final StringProperty position = new SimpleStringProperty();
private final IntegerProperty quantity = new SimpleIntegerProperty();
public tableDataJob(final String pPosition, final Integer pQuantity)
{
this.position.set(pPosition);
this.quantity.set(pQuantity);
}
public StringProperty positionProperty()
{
return position;
}
public IntegerProperty quantityProperty()
{
return quantity;
}
public String getPosition()
{
return positionProperty().get();
}
public Integer getQuantity()
{
return quantityProperty().get();
}
public final void setPosition(String pPosition)
{
positionProperty().set(pPosition);
}
public final void setQuantity(int pQuantity)
{
quantityProperty().set(pQuantity);
}
}