code formatter
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
target/
|
||||
dependency-reduced-pom.xml
|
||||
|
||||
26
.vscode/eclipse-formatter.xml
vendored
Normal file
26
.vscode/eclipse-formatter.xml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<profiles version="21">
|
||||
<profile kind="CodeFormatterProfile" name="jFxKasse" version="21">
|
||||
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
9
.vscode/settings.json
vendored
9
.vscode/settings.json
vendored
@ -7,5 +7,12 @@
|
||||
"java.configuration.updateBuildConfiguration": "automatic",
|
||||
"java.compile.nullAnalysis.mode": "automatic",
|
||||
"editor.formatOnSave": true,
|
||||
"files.encoding": "utf8"
|
||||
"files.encoding": "utf8",
|
||||
|
||||
// Java formatter: point to workspace-local Eclipse formatter profile
|
||||
"java.format.settings.url": ".vscode/eclipse-formatter.xml",
|
||||
"java.format.settings.profile": "jFxKasse",
|
||||
"[java]": {
|
||||
"editor.defaultFormatter": "redhat.java"
|
||||
}
|
||||
}
|
||||
@ -2,11 +2,9 @@ package com.jFxKasse.application;
|
||||
|
||||
import com.jFxKasse.application.Main;
|
||||
|
||||
public class JavaFX11Main
|
||||
{
|
||||
public class JavaFX11Main {
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
public static void main(String[] args) {
|
||||
Main.main(args);
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,8 +53,7 @@ public class Main extends Application {
|
||||
|
||||
private void mainWindow() {
|
||||
try {
|
||||
FXMLLoader loader = new FXMLLoader(
|
||||
getClass().getResource("/fxml/MainWindow.fxml"));
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/MainWindow.fxml"));
|
||||
|
||||
AnchorPane pane = loader.load();
|
||||
primaryStage.setTitle("jFxKasse"); // Window title
|
||||
@ -66,21 +65,20 @@ public class Main extends Application {
|
||||
firstStart(); // Check if this is the first run
|
||||
|
||||
Scene scene = new Scene(pane);
|
||||
scene.getStylesheets().add(
|
||||
Main.class.getResource("/css/application.css").toExternalForm());
|
||||
scene.getStylesheets().add(Main.class.getResource("/css/application.css").toExternalForm());
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.show(); // Show the stage
|
||||
|
||||
// Attach the KeyController
|
||||
kc = new KeyController(scene, mwc);
|
||||
|
||||
Timeline timeline = new Timeline(
|
||||
new KeyFrame(Duration.seconds(1), ev -> {
|
||||
Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(1), ev -> {
|
||||
mwc.updateTimeLabel(); // Update time label on UI
|
||||
}));
|
||||
timeline.setCycleCount(Animation.INDEFINITE);
|
||||
timeline.play();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -89,7 +87,8 @@ public class Main extends Application {
|
||||
if (osName.contains("Windows")) {
|
||||
System.out.println("FCK Windows");
|
||||
filepath = userHome + "/Documents/jFxKasse/";
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
filepath = userHome + "/jFxKasse/";
|
||||
}
|
||||
launch(args);
|
||||
@ -107,10 +106,10 @@ public class Main extends Application {
|
||||
dbc.setDbname(xmlc.getDatabaseName()); // Pass database name
|
||||
try {
|
||||
dbc.connectDatabase(); // Establish DB connection
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
showErrorDialog("Datenbankfehler",
|
||||
"Die Datenbank konnte nicht geöffnet werden.",
|
||||
showErrorDialog("Datenbankfehler", "Die Datenbank konnte nicht geöffnet werden.",
|
||||
"Datei: " + xmlc.getDatabaseName() + ".db\n\n"
|
||||
+ "Bitte prüfen Sie, ob die Datei vorhanden und nicht beschädigt ist.\n"
|
||||
+ "Fehlermeldung: " + e.getMessage());
|
||||
@ -123,7 +122,8 @@ public class Main extends Application {
|
||||
mwc.loadGridButtons();
|
||||
mwc.getSelectedCat(); // Load DB entries in ChoiceBox
|
||||
mwc.createNewJob();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// config.xml NOT found — first start of app
|
||||
System.out.println("no XML found!");
|
||||
xmlc.initXML(); // Set default values in memory
|
||||
@ -132,12 +132,11 @@ public class Main extends Application {
|
||||
try {
|
||||
xmlc.saveSettings(); // Persist defaults immediately so next start is normal
|
||||
System.out.println("Default config.xml written.");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
showErrorDialog("Konfigurationsfehler",
|
||||
"Die Konfigurationsdatei konnte nicht geschrieben werden.",
|
||||
"Pfad: " + filepath + "config.xml\n\n"
|
||||
+ "Bitte prüfen Sie die Schreibrechte.\n"
|
||||
showErrorDialog("Konfigurationsfehler", "Die Konfigurationsdatei konnte nicht geschrieben werden.",
|
||||
"Pfad: " + filepath + "config.xml\n\n" + "Bitte prüfen Sie die Schreibrechte.\n"
|
||||
+ "Fehlermeldung: " + e.getMessage());
|
||||
}
|
||||
mwc.blockUI(true); // Disable UI elements that need a DB
|
||||
@ -147,8 +146,7 @@ public class Main extends Application {
|
||||
|
||||
/** Shows a modal error alert dialog on the JavaFX thread. */
|
||||
private void showErrorDialog(String title, String header, String content) {
|
||||
javafx.scene.control.Alert alert = new javafx.scene.control.Alert(
|
||||
javafx.scene.control.Alert.AlertType.ERROR);
|
||||
javafx.scene.control.Alert alert = new javafx.scene.control.Alert(javafx.scene.control.Alert.AlertType.ERROR);
|
||||
alert.setTitle(title);
|
||||
alert.setHeaderText(header);
|
||||
alert.setContentText(content);
|
||||
|
||||
@ -20,19 +20,16 @@ public class PrintJob {
|
||||
|
||||
private TimeDate timedate = new TimeDate();
|
||||
|
||||
public void printJob(int jobID, XMLController xmlc, DBController dbc,
|
||||
PrinterController pc) {
|
||||
public void printJob(int jobID, XMLController xmlc, DBController dbc, PrinterController pc) {
|
||||
|
||||
if ((xmlc.getPrintername().equals("Drucker auswählen")
|
||||
|| xmlc.getPrintername() == null)) {
|
||||
if ((xmlc.getPrintername().equals("Drucker auswählen") || xmlc.getPrintername() == null)) {
|
||||
// No printer selected
|
||||
System.out.println("No printer configured!");
|
||||
|
||||
// creates a dialog
|
||||
Dialog<Pair<String, String>> dialog = new Dialog<>();
|
||||
dialog.setTitle("Kein Drucker");
|
||||
dialog.setHeaderText("Es ist kein Drucker einestellt.\n"
|
||||
+ "In den Einstellungen einen Drucker auswählen.");
|
||||
dialog.setHeaderText("Es ist kein Drucker einestellt.\n" + "In den Einstellungen einen Drucker auswählen.");
|
||||
|
||||
dialog.getDialogPane().getButtonTypes().addAll(ButtonType.OK);
|
||||
|
||||
@ -41,30 +38,29 @@ public class PrintJob {
|
||||
grid.setVgap(10);
|
||||
grid.setPadding(new Insets(20, 150, 10, 10));
|
||||
|
||||
grid.add(new Label("Tipp:\n"
|
||||
+ "Es kann ein virtueller Drucker installiert werden: \n\n"
|
||||
+ "www.cups-pdf.de"), 0, 0);
|
||||
grid.add(
|
||||
new Label(
|
||||
"Tipp:\n" + "Es kann ein virtueller Drucker installiert werden: \n\n" + "www.cups-pdf.de"),
|
||||
0, 0);
|
||||
|
||||
dialog.getDialogPane().setContent(grid);
|
||||
dialog.setResizable(true);
|
||||
dialog.showAndWait();
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// Printer selected
|
||||
pc.selectPrinter(xmlc.getPrintername());
|
||||
/* Single bill or split by category */
|
||||
if (xmlc.getCategorySplitted()) {
|
||||
// Split the bills
|
||||
|
||||
PrintDataSplitted pdsplitted = new PrintDataSplitted(
|
||||
xmlc.getLinebreak(), xmlc.getOffsetHeader(),
|
||||
xmlc.getOffsetFooter(),
|
||||
timedate.getSystemTime() + " " + timedate.getSystemDate(),
|
||||
PrintDataSplitted pdsplitted = new PrintDataSplitted(xmlc.getLinebreak(), xmlc.getOffsetHeader(),
|
||||
xmlc.getOffsetFooter(), timedate.getSystemTime() + " " + timedate.getSystemDate(),
|
||||
xmlc.getHeader(), xmlc.getFooter());
|
||||
|
||||
pdsplitted.setData(Integer.toString(jobID), dbc.getTime_Job(jobID),
|
||||
dbc.getQuantity_Job(jobID), dbc.getName_Job(jobID),
|
||||
dbc.getValue_Job(jobID), dbc.getCategory_Job(jobID),
|
||||
pdsplitted.setData(Integer.toString(jobID), dbc.getTime_Job(jobID), dbc.getQuantity_Job(jobID),
|
||||
dbc.getName_Job(jobID), dbc.getValue_Job(jobID), dbc.getCategory_Job(jobID),
|
||||
dbc.getJobValue_Job(jobID));
|
||||
|
||||
System.out.println("Printing job ...");
|
||||
@ -75,16 +71,15 @@ public class PrintJob {
|
||||
pc.printString(printString.get(i));
|
||||
}
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// Single bill
|
||||
PrintDataSimple pds = new PrintDataSimple(xmlc.getLinebreak(),
|
||||
xmlc.getOffsetHeader(), xmlc.getOffsetFooter(),
|
||||
timedate.getSystemTime() + " " + timedate.getSystemDate(),
|
||||
PrintDataSimple pds = new PrintDataSimple(xmlc.getLinebreak(), xmlc.getOffsetHeader(),
|
||||
xmlc.getOffsetFooter(), timedate.getSystemTime() + " " + timedate.getSystemDate(),
|
||||
xmlc.getHeader(), xmlc.getFooter());
|
||||
|
||||
pds.setData(Integer.toString(jobID), dbc.getTime_Job(jobID),
|
||||
dbc.getQuantity_Job(jobID), dbc.getName_Job(jobID),
|
||||
dbc.getValue_Job(jobID), dbc.getCategory_Job(jobID),
|
||||
pds.setData(Integer.toString(jobID), dbc.getTime_Job(jobID), dbc.getQuantity_Job(jobID),
|
||||
dbc.getName_Job(jobID), dbc.getValue_Job(jobID), dbc.getCategory_Job(jobID),
|
||||
dbc.getJobValue_Job(jobID));
|
||||
System.out.println("Printing job ...");
|
||||
pc.printString(pds.getPrintString());
|
||||
|
||||
@ -4,18 +4,15 @@ import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class TimeDate
|
||||
{
|
||||
public String getSystemTime()
|
||||
{
|
||||
public class TimeDate {
|
||||
public String getSystemTime() {
|
||||
DateFormat dateFormat = new SimpleDateFormat("HH:mm");
|
||||
Date date = new Date();
|
||||
String time = dateFormat.format(date);
|
||||
return time;
|
||||
}
|
||||
|
||||
public String getSystemDate()
|
||||
{
|
||||
public String getSystemDate() {
|
||||
DateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy");
|
||||
Date date = new Date();
|
||||
String dateStr = dateFormat.format(date);
|
||||
|
||||
@ -20,9 +20,9 @@ public class DBController {
|
||||
|
||||
public void main() {
|
||||
try {
|
||||
connection = DriverManager
|
||||
.getConnection("jdbc:sqlite:" + DB_PATH + dbname + ".db");
|
||||
} catch (SQLException e) {
|
||||
connection = DriverManager.getConnection("jdbc:sqlite:" + DB_PATH + dbname + ".db");
|
||||
}
|
||||
catch (SQLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -41,11 +41,11 @@ public class DBController {
|
||||
try {
|
||||
if (connection != null)
|
||||
return;
|
||||
connection = DriverManager
|
||||
.getConnection("jdbc:sqlite:" + DB_PATH + dbname + ".db");
|
||||
connection = DriverManager.getConnection("jdbc:sqlite:" + DB_PATH + dbname + ".db");
|
||||
if (!connection.isClosed())
|
||||
System.out.println("DB connection established");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
@ -56,7 +56,8 @@ public class DBController {
|
||||
if (connection.isClosed())
|
||||
System.out.println();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -67,7 +68,8 @@ public class DBController {
|
||||
File varTmpDir = new File(pPfad);
|
||||
if (!varTmpDir.exists()) {
|
||||
return false;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -76,10 +78,10 @@ public class DBController {
|
||||
int catInPos = 0;
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery("SELECT posid, cat FROM positionen "
|
||||
+ "WHERE posid = " + pID + ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT posid, cat FROM positionen " + "WHERE posid = " + pID + ";");
|
||||
catInPos = rs.getInt("cat");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
|
||||
@ -89,10 +91,11 @@ public class DBController {
|
||||
}
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery("SELECT catid, catname FROM category "
|
||||
+ "WHERE catid = " + catInPos + ";");
|
||||
ResultSet rs = stmt
|
||||
.executeQuery("SELECT catid, catname FROM category " + "WHERE catid = " + catInPos + ";");
|
||||
return rs.getString("catname");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "keine Kategorie";
|
||||
@ -106,26 +109,25 @@ public class DBController {
|
||||
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) {
|
||||
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");
|
||||
fillPositionen_Positionen(i + 1, "Noch frei", (float) 0.00, 6, "#ad0000");
|
||||
}
|
||||
}
|
||||
|
||||
public void fillPositionen_Positionen(int pID, String pName, float pValue,
|
||||
int pCat, String pColor) { // Create new entry in table
|
||||
public void fillPositionen_Positionen(int pID, String pName, float pValue, int pCat, String pColor) { // Create new
|
||||
// entry in
|
||||
// table
|
||||
System.out.println("Creating new positionen entry");
|
||||
try {
|
||||
PreparedStatement ps = connection.prepareStatement(
|
||||
"INSERT INTO positionen VALUES (?, ?, ?, ?, ?);");
|
||||
PreparedStatement ps = connection.prepareStatement("INSERT INTO positionen VALUES (?, ?, ?, ?, ?);");
|
||||
ps.setInt(1, pID); // primary
|
||||
ps.setString(2, pName);
|
||||
ps.setFloat(3, pValue);
|
||||
@ -136,7 +138,8 @@ public class DBController {
|
||||
connection.setAutoCommit(false);
|
||||
ps.executeBatch(); // SQL execution
|
||||
connection.setAutoCommit(true);
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -145,10 +148,10 @@ public class DBController {
|
||||
public String getName_Positionen(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT posid, name FROM positionen WHERE posid = " + pID + ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT posid, name FROM positionen WHERE posid = " + pID + ";");
|
||||
return rs.getString("name");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "Error 404";
|
||||
@ -158,11 +161,10 @@ public class DBController {
|
||||
public String getValue_Positionen(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT posid, value FROM positionen WHERE posid = " + pID
|
||||
+ ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT posid, value FROM positionen WHERE posid = " + pID + ";");
|
||||
return rs.getString("value");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "Error 404";
|
||||
@ -172,11 +174,11 @@ public class DBController {
|
||||
public int getCat_Positionen(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT catid, cat FROM positionen WHERE catid = " + pID + ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT catid, cat FROM positionen WHERE catid = " + pID + ";");
|
||||
System.out.println("getCarTet: " + rs.getInt("cat"));
|
||||
return rs.getInt("cat");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return 0;
|
||||
@ -186,11 +188,10 @@ public class DBController {
|
||||
public String getColor_Positionen(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT posid, color FROM positionen WHERE posid = " + pID
|
||||
+ ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT posid, color FROM positionen WHERE posid = " + pID + ";");
|
||||
return rs.getString("color");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "Error 404";
|
||||
@ -200,9 +201,9 @@ public class DBController {
|
||||
public void setName_Positionen(int pID, String pName) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.executeUpdate("UPDATE positionen SET name = '" + pName
|
||||
+ "'WHERE posid =" + pID + ";");
|
||||
} catch (SQLException e) {
|
||||
stmt.executeUpdate("UPDATE positionen SET name = '" + pName + "'WHERE posid =" + pID + ";");
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -211,9 +212,9 @@ public class DBController {
|
||||
public void setValue_Positionen(int pID, String pValue) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.executeUpdate("UPDATE positionen SET value = '" + pValue
|
||||
+ "'WHERE posid =" + pID + ";");
|
||||
} catch (SQLException e) {
|
||||
stmt.executeUpdate("UPDATE positionen SET value = '" + pValue + "'WHERE posid =" + pID + ";");
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -222,9 +223,9 @@ public class DBController {
|
||||
public void setCat_Positionen(int pID, int pCat) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.executeUpdate("UPDATE positionen SET cat = '" + pCat
|
||||
+ "'WHERE posid =" + pID + ";");
|
||||
} catch (SQLException e) {
|
||||
stmt.executeUpdate("UPDATE positionen SET cat = '" + pCat + "'WHERE posid =" + pID + ";");
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -233,9 +234,9 @@ public class DBController {
|
||||
public void setColor_Positionen(int pID, String pColor) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.executeUpdate("UPDATE positionen SET color = '" + pColor
|
||||
+ "'WHERE posid =" + pID + ";");
|
||||
} catch (SQLException e) {
|
||||
stmt.executeUpdate("UPDATE positionen SET color = '" + pColor + "'WHERE posid =" + pID + ";");
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -248,15 +249,16 @@ public class DBController {
|
||||
ResultSet rs = stmt.executeQuery("SELECT * FROM positionen;");
|
||||
while (rs.next()) {
|
||||
try {
|
||||
daten.add(new tableDataPositionen(rs.getInt("posid"),
|
||||
rs.getString("name"), rs.getString("value"),
|
||||
daten.add(new tableDataPositionen(rs.getInt("posid"), rs.getString("name"), rs.getString("value"),
|
||||
rs.getString("cat"), rs.getString("color")));
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -276,7 +278,8 @@ public class DBController {
|
||||
System.out.println(" ");
|
||||
}
|
||||
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -289,7 +292,8 @@ public class DBController {
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.executeUpdate("DROP TABLE IF EXISTS category;");
|
||||
stmt.executeUpdate("CREATE TABLE category (catid, catname);");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -305,9 +309,9 @@ public class DBController {
|
||||
public void setName_Category(int pID, String pName) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.executeUpdate("UPDATE category SET catname = '" + pName
|
||||
+ "'WHERE catid =" + pID + ";");
|
||||
} catch (SQLException e) {
|
||||
stmt.executeUpdate("UPDATE category SET catname = '" + pName + "'WHERE catid =" + pID + ";");
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -317,15 +321,15 @@ public class DBController {
|
||||
|
||||
System.out.println("Creating new category entry");
|
||||
try {
|
||||
PreparedStatement ps = connection
|
||||
.prepareStatement("INSERT INTO category VALUES (?, ?);");
|
||||
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");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -335,11 +339,10 @@ public class DBController {
|
||||
public String getName_Category(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT catid, catname FROM category WHERE catid = " + pID
|
||||
+ ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT catid, catname FROM category WHERE catid = " + pID + ";");
|
||||
return rs.getString("catname");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "Error 404";
|
||||
@ -354,7 +357,8 @@ public class DBController {
|
||||
stmt.executeUpdate("DROP TABLE IF EXISTS jobs;");
|
||||
stmt.executeUpdate(
|
||||
"CREATE TABLE jobs (jobid, time, positionen_quantity, positionen_name, positionen_value, positionen_cat, state, jobvalue);");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -363,10 +367,10 @@ public class DBController {
|
||||
public int getLatestJobNumber_Job() {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT jobid from jobs ORDER BY jobid DESC LIMIT 1;");
|
||||
ResultSet rs = stmt.executeQuery("SELECT jobid from jobs ORDER BY jobid DESC LIMIT 1;");
|
||||
return rs.getInt("jobid");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
// System.err.println("Couldn't handle DB-Query");
|
||||
// e.printStackTrace();
|
||||
|
||||
@ -377,10 +381,10 @@ public class DBController {
|
||||
public String getTime_Job(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT jobid, time FROM jobs WHERE jobid = " + pID + ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT jobid, time FROM jobs WHERE jobid = " + pID + ";");
|
||||
return rs.getString("time");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "404";
|
||||
@ -390,11 +394,10 @@ public class DBController {
|
||||
public String getQuantity_Job(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT jobid, positionen_quantity FROM jobs WHERE jobid = "
|
||||
+ pID + ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT jobid, positionen_quantity FROM jobs WHERE jobid = " + pID + ";");
|
||||
return rs.getString("positionen_quantity");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "404";
|
||||
@ -404,11 +407,10 @@ public class DBController {
|
||||
public String getName_Job(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT jobid, positionen_name FROM jobs WHERE jobid = " + pID
|
||||
+ ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT jobid, positionen_name FROM jobs WHERE jobid = " + pID + ";");
|
||||
return rs.getString("positionen_name");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "404";
|
||||
@ -418,11 +420,10 @@ public class DBController {
|
||||
public String getValue_Job(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT jobid, positionen_value FROM jobs WHERE jobid = " + pID
|
||||
+ ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT jobid, positionen_value FROM jobs WHERE jobid = " + pID + ";");
|
||||
return rs.getString("positionen_value");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "404";
|
||||
@ -432,11 +433,10 @@ public class DBController {
|
||||
public String getCategory_Job(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT jobid, positionen_cat FROM jobs WHERE jobid = " + pID
|
||||
+ ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT jobid, positionen_cat FROM jobs WHERE jobid = " + pID + ";");
|
||||
return rs.getString("positionen_cat");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "404";
|
||||
@ -446,10 +446,10 @@ public class DBController {
|
||||
public String getState_Job(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT jobid, state FROM jobs WHERE jobid = " + pID + ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT jobid, state FROM jobs WHERE jobid = " + pID + ";");
|
||||
return rs.getString("state");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "404";
|
||||
@ -459,10 +459,10 @@ public class DBController {
|
||||
public String getJobValue_Job(int pID) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT jobid, jobvalue FROM jobs WHERE jobid = " + pID + ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT jobid, jobvalue FROM jobs WHERE jobid = " + pID + ";");
|
||||
return rs.getString("jobvalue");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "404";
|
||||
@ -472,11 +472,12 @@ public class DBController {
|
||||
public String getAllJobValue_Job() {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT state, jobvalue, SUM(jobvalue) AS ALLVALUE FROM jobs WHERE state = "
|
||||
+ '"' + "verbucht" + '"' + ";");
|
||||
ResultSet rs = stmt
|
||||
.executeQuery("SELECT state, jobvalue, SUM(jobvalue) AS ALLVALUE FROM jobs WHERE state = " + '"'
|
||||
+ "verbucht" + '"' + ";");
|
||||
return rs.getString("ALLVALUE");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "0";
|
||||
@ -487,10 +488,10 @@ public class DBController {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(
|
||||
"SELECT count(*) AS JOBCOUNT FROM jobs WHERE state = " + '"'
|
||||
+ "verbucht" + '"' + ";");
|
||||
"SELECT count(*) AS JOBCOUNT FROM jobs WHERE state = " + '"' + "verbucht" + '"' + ";");
|
||||
return rs.getString("JOBCOUNT");
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
return "0";
|
||||
@ -500,9 +501,9 @@ public class DBController {
|
||||
public void setStatus_Jobs(int pID, String pStatus) {
|
||||
try {
|
||||
Statement stmt = connection.createStatement();
|
||||
stmt.executeUpdate("UPDATE jobs SET state = '" + pStatus
|
||||
+ "'WHERE jobid =" + pID + ";");
|
||||
} catch (SQLException e) {
|
||||
stmt.executeUpdate("UPDATE jobs SET state = '" + pStatus + "'WHERE jobid =" + pID + ";");
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -520,30 +521,29 @@ public class DBController {
|
||||
|
||||
String tablePosition = rs.getString("positionen_name");
|
||||
|
||||
tableDataJob data = new tableDataJob(rs.getInt("jobid"),
|
||||
rs.getString("time"), tablePosition, rs.getString("state"),
|
||||
rs.getString("jobvalue"));
|
||||
tableDataJob data = new tableDataJob(rs.getInt("jobid"), rs.getString("time"), tablePosition,
|
||||
rs.getString("state"), rs.getString("jobvalue"));
|
||||
|
||||
tmp.add(data);
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
public void fillJobs_Jobs(int pID, String pTime, String pPositionen_quantity,
|
||||
String pPositionen_name, String pPositionen_value,
|
||||
String pPositionen_cat, String pState, String pJobvalue) {
|
||||
public void fillJobs_Jobs(int pID, String pTime, String pPositionen_quantity, String pPositionen_name,
|
||||
String pPositionen_value, String pPositionen_cat, String pState, String pJobvalue) {
|
||||
System.out.println("Creating new job entry");
|
||||
try {
|
||||
PreparedStatement ps = connection.prepareStatement(
|
||||
"INSERT INTO jobs VALUES (?, ?, ?, ?, ?, ?, ?, ?);");
|
||||
PreparedStatement ps = connection.prepareStatement("INSERT INTO jobs VALUES (?, ?, ?, ?, ?, ?, ?, ?);");
|
||||
ps.setInt(1, pID); // primary
|
||||
ps.setString(2, pTime);
|
||||
ps.setString(3, pPositionen_quantity);
|
||||
@ -556,7 +556,8 @@ public class DBController {
|
||||
connection.setAutoCommit(false);
|
||||
ps.executeBatch(); // SQL execution
|
||||
connection.setAutoCommit(true);
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
System.err.println("Couldn't handle DB-Query");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@ -5,18 +5,15 @@ import javafx.scene.Scene;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
|
||||
public class KeyController
|
||||
{
|
||||
public class KeyController {
|
||||
private MainWindowController mwc;
|
||||
|
||||
public KeyController(Scene scene, MainWindowController mwc)
|
||||
{
|
||||
public KeyController(Scene scene, MainWindowController mwc) {
|
||||
this.mwc = mwc;
|
||||
|
||||
scene.setOnKeyPressed(new EventHandler<KeyEvent>() {
|
||||
@Override
|
||||
public void handle(KeyEvent keyEvent)
|
||||
{
|
||||
public void handle(KeyEvent keyEvent) {
|
||||
switch (mwc.getActiveTab()) {
|
||||
case 0:
|
||||
handleTabNewJob(keyEvent);
|
||||
@ -42,10 +39,8 @@ public class KeyController
|
||||
|
||||
}
|
||||
|
||||
private void handleTabNewJob(KeyEvent key)
|
||||
{
|
||||
if ((key.getCode() == KeyCode.ENTER)
|
||||
&& (!mwc.btnPrintBill.isDisabled())) {
|
||||
private void handleTabNewJob(KeyEvent key) {
|
||||
if ((key.getCode() == KeyCode.ENTER) && (!mwc.btnPrintBill.isDisabled())) {
|
||||
mwc.btnPrintBillAction(null);
|
||||
}
|
||||
|
||||
@ -53,8 +48,7 @@ public class KeyController
|
||||
mwc.btnLockAction(null);
|
||||
}
|
||||
|
||||
if ((key.getCode() == KeyCode.DELETE)
|
||||
&& (!mwc.btnDeleteSelectedPosition.isDisabled())) {
|
||||
if ((key.getCode() == KeyCode.DELETE) && (!mwc.btnDeleteSelectedPosition.isDisabled())) {
|
||||
mwc.btnDeleteSelectedPositionAction(null);
|
||||
}
|
||||
|
||||
@ -62,15 +56,12 @@ public class KeyController
|
||||
|
||||
}
|
||||
|
||||
private void handleTabJobs(KeyEvent key)
|
||||
{
|
||||
if ((key.getCode() == KeyCode.ENTER)
|
||||
&& (!mwc.btnReprintJob.isDisabled())) {
|
||||
private void handleTabJobs(KeyEvent key) {
|
||||
if ((key.getCode() == KeyCode.ENTER) && (!mwc.btnReprintJob.isDisabled())) {
|
||||
mwc.btnReprintJobAction(null);
|
||||
}
|
||||
|
||||
if ((key.getCode() == KeyCode.DELETE)
|
||||
&& (!mwc.btnCancelJob.isDisabled())) {
|
||||
if ((key.getCode() == KeyCode.DELETE) && (!mwc.btnCancelJob.isDisabled())) {
|
||||
mwc.btnCancelJobAction(null);
|
||||
}
|
||||
|
||||
@ -79,23 +70,18 @@ public class KeyController
|
||||
}
|
||||
}
|
||||
|
||||
private void handleTabPosEdit(KeyEvent key)
|
||||
{
|
||||
if ((key.getCode() == KeyCode.ENTER)
|
||||
&& (!mwc.btnSaveEntry.isDisabled())) {
|
||||
private void handleTabPosEdit(KeyEvent key) {
|
||||
if ((key.getCode() == KeyCode.ENTER) && (!mwc.btnSaveEntry.isDisabled())) {
|
||||
mwc.btnSaveEntryAction(null);
|
||||
}
|
||||
|
||||
if ((key.getCode() == KeyCode.DELETE)
|
||||
&& (!mwc.btnClearEntry.isDisabled())) {
|
||||
if ((key.getCode() == KeyCode.DELETE) && (!mwc.btnClearEntry.isDisabled())) {
|
||||
mwc.btnClearEntryAction(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleTabSettings(KeyEvent key)
|
||||
{
|
||||
if ((key.getCode() == KeyCode.ENTER)
|
||||
&& (!mwc.btnSavePrinter.isDisabled())) {
|
||||
private void handleTabSettings(KeyEvent key) {
|
||||
if ((key.getCode() == KeyCode.ENTER) && (!mwc.btnSavePrinter.isDisabled())) {
|
||||
mwc.btnSavePrinterAction(null);
|
||||
}
|
||||
|
||||
@ -103,18 +89,17 @@ public class KeyController
|
||||
mwc.btnSaveCatAction(null);
|
||||
}
|
||||
|
||||
if ((key.getCode() == KeyCode.ENTER)
|
||||
&& (!mwc.btnCreateNewDatabase.isDisabled())) {
|
||||
if ((key.getCode() == KeyCode.ENTER) && (!mwc.btnCreateNewDatabase.isDisabled())) {
|
||||
try {
|
||||
mwc.btnCreateNewDatabaseAction(null);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void handelGridButtons(KeyEvent key)
|
||||
{
|
||||
void handelGridButtons(KeyEvent key) {
|
||||
|
||||
switch (key.getCode()) {
|
||||
case Q:
|
||||
|
||||
@ -68,8 +68,7 @@ public class MainWindowController {
|
||||
private TreeTableColumn<tableDataCurrentOrder, String> columnPosition;
|
||||
|
||||
@FXML
|
||||
private TreeTableColumn<tableDataCurrentOrder, Integer> idSpalte01 = new TreeTableColumn<>(
|
||||
"tableCurrentOrder");
|
||||
private TreeTableColumn<tableDataCurrentOrder, Integer> idSpalte01 = new TreeTableColumn<>("tableCurrentOrder");
|
||||
|
||||
@FXML
|
||||
private TreeTableView<tableDataJob> jobsTreeTable;
|
||||
@ -90,8 +89,7 @@ public class MainWindowController {
|
||||
private TreeTableColumn<tableDataJob, Integer> columnJobNumber;
|
||||
|
||||
@FXML
|
||||
private TreeTableColumn<tableDataJob, Integer> idSpalte02 = new TreeTableColumn<>(
|
||||
"jobsTreeTable");
|
||||
private TreeTableColumn<tableDataJob, Integer> idSpalte02 = new TreeTableColumn<>("jobsTreeTable");
|
||||
|
||||
@FXML
|
||||
private TreeTableView<tableDataPositionen> entryTreeTable;
|
||||
@ -372,16 +370,13 @@ public class MainWindowController {
|
||||
private int selectedJobId;
|
||||
|
||||
@FXML
|
||||
TreeItem<tableDataCurrentOrder> rootCurrentJob = new TreeItem<>(
|
||||
new tableDataCurrentOrder("0", 0));
|
||||
TreeItem<tableDataCurrentOrder> rootCurrentJob = new TreeItem<>(new tableDataCurrentOrder("0", 0));
|
||||
|
||||
@FXML
|
||||
TreeItem<tableDataJob> rootJobs = new TreeItem<>(
|
||||
new tableDataJob(0, "0", "0", "0", "0"));
|
||||
TreeItem<tableDataJob> rootJobs = new TreeItem<>(new tableDataJob(0, "0", "0", "0", "0"));
|
||||
|
||||
@FXML
|
||||
TreeItem<tableDataPositionen> rootPositionen = new TreeItem<>(
|
||||
new tableDataPositionen(0, "0", "0", "0", "0"));
|
||||
TreeItem<tableDataPositionen> rootPositionen = new TreeItem<>(new tableDataPositionen(0, "0", "0", "0", "0"));
|
||||
|
||||
@FXML
|
||||
public void ueberbtnAction(ActionEvent event) { // Opens the 'About' dialog
|
||||
@ -398,16 +393,13 @@ public class MainWindowController {
|
||||
grid.setVgap(10);
|
||||
grid.setPadding(new Insets(20, 150, 10, 10));
|
||||
|
||||
grid.add(new Label(
|
||||
"Einfaches Kassensystem für kleine bis mittel große Veranstaltungen mit Bon-Drucker\n"
|
||||
grid.add(new Label("Einfaches Kassensystem für kleine bis mittel große Veranstaltungen mit Bon-Drucker\n"
|
||||
+ "\nUnter Lizenz GPL-3.0 abrufbar auf https://git.mosad.xyz/localhorst/jFxKasse\n"
|
||||
+ "\nDatenbank: sqlite.org - Public Domain"
|
||||
+ " \nUI Design01: eclipse.org/efxclipse/install.html - Eclipse Public License 1.0"
|
||||
+ " \nUI Design02: http://www.jfoenix.com/ - Apache License 2.0"
|
||||
+ " \nUI - Datenbank Integration: basierend auf Project-HomeFlix - github.com/Seil0/Project-HomeFlix - GPLv3 \n"
|
||||
+ " \nMaintainer: mail@hendrikschutter.com"
|
||||
+ " \n(c) 2026 Hendrik Schutter"),
|
||||
0, 0);
|
||||
+ " \nMaintainer: mail@hendrikschutter.com" + " \n(c) 2026 Hendrik Schutter"), 0, 0);
|
||||
|
||||
dialog.getDialogPane().setContent(grid);
|
||||
dialog.setResizable(true);
|
||||
@ -422,7 +414,8 @@ public class MainWindowController {
|
||||
File file = new File(Main.filepath);
|
||||
Desktop desktop = Desktop.getDesktop();
|
||||
desktop.open(file);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Runtime.getRuntime().exec("xdg-open " + Main.filepath);
|
||||
}
|
||||
}
|
||||
@ -442,7 +435,8 @@ public class MainWindowController {
|
||||
try {
|
||||
// saveSettings(getDatabaseName());
|
||||
xmlc.saveSettings();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -500,7 +494,8 @@ public class MainWindowController {
|
||||
float avgJobValue = ((float) allValue / allActiveJobs);
|
||||
|
||||
setJobStatLabel(allActiveJobs, avgJobValue, allValue);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
setJobStatLabel(allActiveJobs, 0, 0);
|
||||
}
|
||||
titlePaneStats.setVisible(true);
|
||||
@ -510,8 +505,7 @@ public class MainWindowController {
|
||||
public void btnSavePrinterAction(ActionEvent event) {
|
||||
System.out.println("btnSavePrinterAction");
|
||||
|
||||
xmlc.setPrintername(
|
||||
printerChoise.getSelectionModel().getSelectedItem().toString());
|
||||
xmlc.setPrintername(printerChoise.getSelectionModel().getSelectedItem().toString());
|
||||
xmlc.setLinebreak(linesSpinner.getValue());
|
||||
xmlc.setOffsetHeader(offsetHeaderSpinner.getValue());
|
||||
xmlc.setOffsetFooter(offsetFooterSpinner.getValue());
|
||||
@ -521,7 +515,8 @@ public class MainWindowController {
|
||||
|
||||
try {
|
||||
xmlc.saveSettings();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
// e.printStackTrace();
|
||||
}
|
||||
@ -543,7 +538,8 @@ public class MainWindowController {
|
||||
|
||||
if (lockState) {
|
||||
btnLock.setText("Kasse entsperren");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
btnLock.setText("Kasse sperren");
|
||||
}
|
||||
}
|
||||
@ -564,12 +560,11 @@ public class MainWindowController {
|
||||
@FXML
|
||||
public void btnDeleteSelectedPositionAction(ActionEvent event) {
|
||||
currentJob.deletePosName(currentOrderPosName);
|
||||
rootCurrentJob.getChildren().remove(0,
|
||||
rootCurrentJob.getChildren().size());
|
||||
rootCurrentJob.getChildren().remove(0, rootCurrentJob.getChildren().size());
|
||||
|
||||
for (int i = 0; i < currentJob.getCurrentJobPositionen().size(); i++) {
|
||||
rootCurrentJob.getChildren().add(new TreeItem<tableDataCurrentOrder>(
|
||||
currentJob.getCurrentJobPositionen().get(i)));
|
||||
rootCurrentJob.getChildren()
|
||||
.add(new TreeItem<tableDataCurrentOrder>(currentJob.getCurrentJobPositionen().get(i)));
|
||||
|
||||
}
|
||||
setJobPrizeLabel(currentJob.getJobValue());
|
||||
@ -596,18 +591,13 @@ public class MainWindowController {
|
||||
|
||||
setJobPrizeLabel(0);
|
||||
|
||||
currentJob.setJobtime(
|
||||
timedate.getSystemTime() + " " + timedate.getSystemDate());
|
||||
currentJob.setJobtime(timedate.getSystemTime() + " " + timedate.getSystemDate());
|
||||
|
||||
rootCurrentJob.getChildren().remove(0,
|
||||
rootCurrentJob.getChildren().size());
|
||||
rootCurrentJob.getChildren().remove(0, rootCurrentJob.getChildren().size());
|
||||
|
||||
dbc.fillJobs_Jobs(currentJob.getJobnumber(), currentJob.getJobtime(),
|
||||
currentJob.createPosQuantityDBString(),
|
||||
currentJob.createPosNameDBString(),
|
||||
currentJob.createPosValueDBString(),
|
||||
currentJob.createPosCatDBString(), "verbucht",
|
||||
String.valueOf(currentJob.getJobValue()));
|
||||
dbc.fillJobs_Jobs(currentJob.getJobnumber(), currentJob.getJobtime(), currentJob.createPosQuantityDBString(),
|
||||
currentJob.createPosNameDBString(), currentJob.createPosValueDBString(),
|
||||
currentJob.createPosCatDBString(), "verbucht", String.valueOf(currentJob.getJobValue()));
|
||||
|
||||
pj.printJob(currentJob.getJobnumber(), xmlc, dbc, pc);
|
||||
|
||||
@ -753,25 +743,21 @@ public class MainWindowController {
|
||||
@FXML
|
||||
public void fillTablePositionen() { // Load positions into the TreeTableView
|
||||
|
||||
rootPositionen.getChildren().remove(0,
|
||||
rootPositionen.getChildren().size());
|
||||
rootPositionen.getChildren().remove(0, rootPositionen.getChildren().size());
|
||||
|
||||
for (int i = 0; i < dbc.ladeTabellePositionen().size(); i++) {
|
||||
|
||||
float fValue = Float
|
||||
.valueOf(dbc.ladeTabellePositionen().get(i).getValue());
|
||||
float fValue = Float.valueOf(dbc.ladeTabellePositionen().get(i).getValue());
|
||||
|
||||
String strValue = String.format("%.02f", fValue);
|
||||
|
||||
strValue.replace('.', ',');
|
||||
|
||||
tableDataPositionen helpTableData = new tableDataPositionen(
|
||||
dbc.ladeTabellePositionen().get(i).getID(),
|
||||
tableDataPositionen helpTableData = new tableDataPositionen(dbc.ladeTabellePositionen().get(i).getID(),
|
||||
dbc.ladeTabellePositionen().get(i).getName(), (strValue + "€"),
|
||||
dbc.getCategoryNameFromPositionen(i + 1),
|
||||
getColorNames(dbc.ladeTabellePositionen().get(i).getColor()));
|
||||
rootPositionen.getChildren()
|
||||
.add(new TreeItem<tableDataPositionen>(helpTableData));
|
||||
rootPositionen.getChildren().add(new TreeItem<tableDataPositionen>(helpTableData));
|
||||
}
|
||||
}
|
||||
|
||||
@ -791,8 +777,7 @@ public class MainWindowController {
|
||||
btnOpenFolder.setFocusTraversable(false);
|
||||
ueberbtn.setFocusTraversable(false);
|
||||
isPrintBtnDisabled = true;
|
||||
btnPrintBill
|
||||
.setStyle("-fx-background-color: #2ac8fc; -fx-text-fill: black;");
|
||||
btnPrintBill.setStyle("-fx-background-color: #2ac8fc; -fx-text-fill: black;");
|
||||
btnLock.setFocusTraversable(false);
|
||||
initPositionen();
|
||||
initCurrentOrderTreeTableView();
|
||||
@ -805,7 +790,8 @@ public class MainWindowController {
|
||||
|
||||
for (int i = 1; i < 5; i++) {
|
||||
if (dbc.getName_Category(i).equals("Standard")) {
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
cats.add(dbc.getName_Category(i));
|
||||
}
|
||||
}
|
||||
@ -813,15 +799,13 @@ public class MainWindowController {
|
||||
cats.add(dbc.getName_Category(5));
|
||||
|
||||
catChoise.setItems(cats);
|
||||
catChoise.getSelectionModel().selectedIndexProperty()
|
||||
.addListener(new ChangeListener<Number>() {
|
||||
catChoise.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
|
||||
@Override
|
||||
public void changed(ObservableValue<? extends Number> ov,
|
||||
Number value, Number new_value) {
|
||||
public void changed(ObservableValue<? extends Number> ov, Number value, Number new_value) {
|
||||
try {
|
||||
selectedCatName = catChoise.getItems().get((int) new_value)
|
||||
.toString();
|
||||
} catch (Exception e) {
|
||||
selectedCatName = catChoise.getItems().get((int) new_value).toString();
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -837,8 +821,7 @@ public class MainWindowController {
|
||||
public void fillPrinterSettings() {
|
||||
System.out.println("Fill printer Settings");
|
||||
|
||||
ObservableList<String> printers = FXCollections
|
||||
.observableArrayList(pc.getAvailablePrinters());
|
||||
ObservableList<String> printers = FXCollections.observableArrayList(pc.getAvailablePrinters());
|
||||
printers.add("Drucker auswählen");
|
||||
printerChoise.setItems(printers);
|
||||
|
||||
@ -861,20 +844,17 @@ public class MainWindowController {
|
||||
}
|
||||
|
||||
SpinnerValueFactory<Integer> valueFactoryLines = //
|
||||
new SpinnerValueFactory.IntegerSpinnerValueFactory(1, 99,
|
||||
xmlc.getLinebreak());
|
||||
new SpinnerValueFactory.IntegerSpinnerValueFactory(1, 99, xmlc.getLinebreak());
|
||||
|
||||
linesSpinner.setValueFactory(valueFactoryLines);
|
||||
|
||||
SpinnerValueFactory<Integer> valueFactoryHeader = //
|
||||
new SpinnerValueFactory.IntegerSpinnerValueFactory(0, 99,
|
||||
xmlc.getOffsetHeader());
|
||||
new SpinnerValueFactory.IntegerSpinnerValueFactory(0, 99, xmlc.getOffsetHeader());
|
||||
|
||||
offsetHeaderSpinner.setValueFactory(valueFactoryHeader);
|
||||
|
||||
SpinnerValueFactory<Integer> valueFactoryFooter = //
|
||||
new SpinnerValueFactory.IntegerSpinnerValueFactory(0, 99,
|
||||
xmlc.getOffsetFooter());
|
||||
new SpinnerValueFactory.IntegerSpinnerValueFactory(0, 99, xmlc.getOffsetFooter());
|
||||
|
||||
offsetFooterSpinner.setValueFactory(valueFactoryFooter);
|
||||
|
||||
@ -899,62 +879,47 @@ public class MainWindowController {
|
||||
entryTreeTable.setShowRoot(false);
|
||||
entryTreeTable.setEditable(false);
|
||||
|
||||
columnPosnumber
|
||||
.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnPositionsEdit
|
||||
.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnPosnumber.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnPositionsEdit.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnPrize.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnCat.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnColor.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
|
||||
ObservableList<String> color = FXCollections.observableArrayList("Rot",
|
||||
"Orange", "Braun", "Weiß", "Gelb", "Gr\u00fcn", "Blau", "Indigo");
|
||||
ObservableList<String> color = FXCollections.observableArrayList("Rot", "Orange", "Braun", "Weiß", "Gelb",
|
||||
"Gr\u00fcn", "Blau", "Indigo");
|
||||
colorChoise.setItems(color);
|
||||
colorChoise.getSelectionModel().selectedIndexProperty()
|
||||
.addListener(new ChangeListener<Number>() {
|
||||
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();
|
||||
public void changed(ObservableValue<? extends Number> ov, Number value, Number new_value) {
|
||||
selectedColorName = colorChoise.getItems().get((int) new_value).toString();
|
||||
}
|
||||
});
|
||||
|
||||
columnPosnumber.setCellValueFactory(
|
||||
cellData -> cellData.getValue().getValue().idProperty().asObject());
|
||||
columnPosnumber.setCellValueFactory(cellData -> cellData.getValue().getValue().idProperty().asObject());
|
||||
|
||||
columnPositionsEdit.setCellValueFactory(
|
||||
cellData -> cellData.getValue().getValue().nameProperty());
|
||||
columnPositionsEdit.setCellValueFactory(cellData -> cellData.getValue().getValue().nameProperty());
|
||||
|
||||
columnPrize.setCellValueFactory(
|
||||
cellData -> cellData.getValue().getValue().valueProperty());
|
||||
columnPrize.setCellValueFactory(cellData -> cellData.getValue().getValue().valueProperty());
|
||||
|
||||
columnCat.setCellValueFactory(
|
||||
cellData -> cellData.getValue().getValue().catProperty());
|
||||
columnCat.setCellValueFactory(cellData -> cellData.getValue().getValue().catProperty());
|
||||
|
||||
columnColor.setCellValueFactory(
|
||||
cellData -> cellData.getValue().getValue().colorProperty());
|
||||
columnColor.setCellValueFactory(cellData -> cellData.getValue().getValue().colorProperty());
|
||||
|
||||
entryTreeTable.getSelectionModel().selectedItemProperty()
|
||||
.addListener(new ChangeListener<Object>() {
|
||||
entryTreeTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {
|
||||
@Override
|
||||
public void changed(ObservableValue<?> observable, Object oldVal,
|
||||
Object newVal) {
|
||||
int selected = entryTreeTable.getSelectionModel()
|
||||
.getSelectedIndex(); // Get selected item
|
||||
public void changed(ObservableValue<?> observable, Object oldVal, Object newVal) {
|
||||
int selected = entryTreeTable.getSelectionModel().getSelectedIndex(); // Get selected item
|
||||
|
||||
try {
|
||||
idPositionen = columnPosnumber.getCellData(selected);
|
||||
tftNewPosition
|
||||
.setText(dbc.getName_Positionen(idPositionen));
|
||||
tftNewPosition.setText(dbc.getName_Positionen(idPositionen));
|
||||
tftNewValue.setText(dbc.getValue_Positionen(idPositionen));
|
||||
colorChoise.getSelectionModel().select(
|
||||
getColorID(dbc.getColor_Positionen(idPositionen)));
|
||||
colorChoise.getSelectionModel().select(getColorID(dbc.getColor_Positionen(idPositionen)));
|
||||
|
||||
catChoise.getSelectionModel().select(
|
||||
dbc.getCategoryNameFromPositionen(idPositionen));
|
||||
catChoise.getSelectionModel().select(dbc.getCategoryNameFromPositionen(idPositionen));
|
||||
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
// e.printStackTrace();
|
||||
}
|
||||
@ -963,8 +928,7 @@ public class MainWindowController {
|
||||
|
||||
tftNewValue.textProperty().addListener(new ChangeListener<String>() {
|
||||
@Override
|
||||
public void changed(ObservableValue<? extends String> observable,
|
||||
String oldValue, String newValue) {
|
||||
public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
|
||||
if (!newValue.matches("\\d{0,4}([\\.]\\d{0,2})?")) {
|
||||
tftNewValue.setText(oldValue);
|
||||
}
|
||||
@ -973,22 +937,19 @@ public class MainWindowController {
|
||||
|
||||
final Tooltip tooltipName = new Tooltip();
|
||||
tooltipName.setText("Name der neuen Position");
|
||||
tooltipName.setStyle("-fx-font: normal bold 20 Cantarell; "
|
||||
+ "-fx-base: #AE3522; " + "-fx-text-fill: orange;");
|
||||
tooltipName.setStyle("-fx-font: normal bold 20 Cantarell; " + "-fx-base: #AE3522; " + "-fx-text-fill: orange;");
|
||||
tftNewPosition.setTooltip(tooltipName);
|
||||
|
||||
final Tooltip tooltipValue = new Tooltip();
|
||||
tooltipValue.setText("Preis der neuen Position.\nPunkt als Trennzeichen!");
|
||||
tooltipValue
|
||||
.setText("Preis der neuen Position.\nPunkt als Trennzeichen!");
|
||||
tooltipValue.setStyle("-fx-font: normal bold 20 Cantarell; "
|
||||
+ "-fx-base: #AE3522; " + "-fx-text-fill: orange;");
|
||||
.setStyle("-fx-font: normal bold 20 Cantarell; " + "-fx-base: #AE3522; " + "-fx-text-fill: orange;");
|
||||
tftNewValue.setTooltip(tooltipValue);
|
||||
labelNewValue.setTooltip(tooltipValue);
|
||||
|
||||
}
|
||||
|
||||
public void setMain(Main main, DBController dbc, XMLController xmlc,
|
||||
PrinterController pc) {
|
||||
public void setMain(Main main, DBController dbc, XMLController xmlc, PrinterController pc) {
|
||||
this.main = main;
|
||||
this.dbc = dbc;
|
||||
this.xmlc = xmlc;
|
||||
@ -997,19 +958,15 @@ public class MainWindowController {
|
||||
|
||||
public void setDBLabel() throws Exception {
|
||||
if (xmlc.loadSettings() == true) {
|
||||
labelDBStatus.setText(
|
||||
"Geladene Datenbank: " + xmlc.getDatabaseName() + ".db");
|
||||
labelDBStatus.setText("Geladene Datenbank: " + xmlc.getDatabaseName() + ".db");
|
||||
btnCreateNewDatabase.setDisable(true);
|
||||
tftNewDBName.setDisable(true);
|
||||
labelDBName.setTooltip(new Tooltip(
|
||||
"Um eine neue Datenbank zu erzeugen muss die vorherige config.xml und "
|
||||
+ xmlc.getDatabaseName()
|
||||
+ ".db gelöscht werden! Anwendung danach neustarten!"));
|
||||
labelDBStatus.setTooltip(new Tooltip(
|
||||
"Um eine neue Datenbank zu erzeugen muss die vorherige config.xml und "
|
||||
+ xmlc.getDatabaseName()
|
||||
+ ".db gelöscht werden! Anwendung danach neustarten!"));
|
||||
} else {
|
||||
labelDBName.setTooltip(new Tooltip("Um eine neue Datenbank zu erzeugen muss die vorherige config.xml und "
|
||||
+ xmlc.getDatabaseName() + ".db gelöscht werden! Anwendung danach neustarten!"));
|
||||
labelDBStatus.setTooltip(new Tooltip("Um eine neue Datenbank zu erzeugen muss die vorherige config.xml und "
|
||||
+ xmlc.getDatabaseName() + ".db gelöscht werden! Anwendung danach neustarten!"));
|
||||
}
|
||||
else {
|
||||
labelDBStatus.setText("Keine Datenbank gefunden!");
|
||||
}
|
||||
}
|
||||
@ -1138,17 +1095,19 @@ public class MainWindowController {
|
||||
getButtonByID(i).setFocusTraversable(false);
|
||||
if ((getColorID(dbc.getColor_Positionen(i + 1)) == 0)
|
||||
|| (getColorID(dbc.getColor_Positionen(i + 1)) == 7)) {
|
||||
getButtonByID(i).setStyle("-fx-background-color: "
|
||||
+ dbc.getColor_Positionen(i + 1) + "; -fx-text-fill: white;");
|
||||
} else {
|
||||
getButtonByID(i).setStyle("-fx-background-color: "
|
||||
+ dbc.getColor_Positionen(i + 1) + "; -fx-text-fill: black;");
|
||||
getButtonByID(i).setStyle(
|
||||
"-fx-background-color: " + dbc.getColor_Positionen(i + 1) + "; -fx-text-fill: white;");
|
||||
}
|
||||
else {
|
||||
getButtonByID(i).setStyle(
|
||||
"-fx-background-color: " + dbc.getColor_Positionen(i + 1) + "; -fx-text-fill: black;");
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 25; i++) {
|
||||
if (dbc.getName_Positionen(i + 1).equals("Noch frei")) {
|
||||
getButtonByID(i).setVisible(false);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
getButtonByID(i).setVisible(true);
|
||||
}
|
||||
}
|
||||
@ -1218,20 +1177,18 @@ public class MainWindowController {
|
||||
return;
|
||||
}
|
||||
|
||||
currentJob.addPosition(dbc.getName_Positionen(pID),
|
||||
Float.parseFloat(dbc.getValue_Positionen(pID)),
|
||||
currentJob.addPosition(dbc.getName_Positionen(pID), Float.parseFloat(dbc.getValue_Positionen(pID)),
|
||||
dbc.getCategoryNameFromPositionen(pID));
|
||||
|
||||
btnPrintBill.setDisable(false);
|
||||
isPrintBtnDisabled = false;
|
||||
tapPosEdit.setDisable(true);
|
||||
|
||||
rootCurrentJob.getChildren().remove(0,
|
||||
rootCurrentJob.getChildren().size());
|
||||
rootCurrentJob.getChildren().remove(0, rootCurrentJob.getChildren().size());
|
||||
|
||||
for (int i = 0; i < currentJob.getCurrentJobPositionen().size(); i++) {
|
||||
rootCurrentJob.getChildren().add(new TreeItem<tableDataCurrentOrder>(
|
||||
currentJob.getCurrentJobPositionen().get(i)));
|
||||
rootCurrentJob.getChildren()
|
||||
.add(new TreeItem<tableDataCurrentOrder>(currentJob.getCurrentJobPositionen().get(i)));
|
||||
}
|
||||
|
||||
setJobPrizeLabel(currentJob.getJobValue());
|
||||
@ -1241,28 +1198,21 @@ public class MainWindowController {
|
||||
}
|
||||
|
||||
private void initCurrentOrderTreeTableView() {
|
||||
columnQuantity
|
||||
.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnPosition
|
||||
.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnQuantity.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnPosition.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
|
||||
tableCurrentOrder.setRoot(rootCurrentJob);
|
||||
tableCurrentOrder.setShowRoot(false);
|
||||
tableCurrentOrder.setEditable(false);
|
||||
|
||||
columnQuantity.setCellValueFactory(cellData -> cellData.getValue()
|
||||
.getValue().quantityProperty().asObject());
|
||||
columnQuantity.setCellValueFactory(cellData -> cellData.getValue().getValue().quantityProperty().asObject());
|
||||
|
||||
columnPosition.setCellValueFactory(
|
||||
cellData -> cellData.getValue().getValue().positionProperty());
|
||||
columnPosition.setCellValueFactory(cellData -> cellData.getValue().getValue().positionProperty());
|
||||
|
||||
tableCurrentOrder.getSelectionModel().selectedItemProperty()
|
||||
.addListener(new ChangeListener<Object>() {
|
||||
tableCurrentOrder.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {
|
||||
@Override
|
||||
public void changed(ObservableValue<?> observable, Object oldVal,
|
||||
Object newVal) {
|
||||
int selected = tableCurrentOrder.getSelectionModel()
|
||||
.getSelectedIndex(); // Get selected item
|
||||
public void changed(ObservableValue<?> observable, Object oldVal, Object newVal) {
|
||||
int selected = tableCurrentOrder.getSelectionModel().getSelectedIndex(); // Get selected item
|
||||
|
||||
if (columnPosition.getCellData(selected) != null) {
|
||||
currentOrderPosName = columnPosition.getCellData(selected); // Selected position
|
||||
@ -1274,50 +1224,40 @@ public class MainWindowController {
|
||||
}
|
||||
|
||||
private void initJobTreeTableView() {
|
||||
columnJobNumber
|
||||
.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnJobNumber.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
|
||||
columnTime.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
|
||||
columnPositions
|
||||
.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnPositions.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
|
||||
columnState.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
|
||||
columnJobValue
|
||||
.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
columnJobValue.setStyle("-fx-alignment: CENTER; -fx-font: 17px Cantarell;");
|
||||
|
||||
jobsTreeTable.setRoot(rootJobs);
|
||||
jobsTreeTable.setShowRoot(false);
|
||||
jobsTreeTable.setEditable(false);
|
||||
|
||||
columnJobNumber.setCellValueFactory(cellData -> cellData.getValue()
|
||||
.getValue().numberProperty().asObject());
|
||||
columnJobNumber.setCellValueFactory(cellData -> cellData.getValue().getValue().numberProperty().asObject());
|
||||
|
||||
columnTime.setCellValueFactory(
|
||||
cellData -> cellData.getValue().getValue().timeProperty());
|
||||
columnTime.setCellValueFactory(cellData -> cellData.getValue().getValue().timeProperty());
|
||||
|
||||
columnPositions.setCellValueFactory(
|
||||
cellData -> cellData.getValue().getValue().positionProperty());
|
||||
columnPositions.setCellValueFactory(cellData -> cellData.getValue().getValue().positionProperty());
|
||||
|
||||
columnState.setCellValueFactory(
|
||||
cellData -> cellData.getValue().getValue().statusProperty());
|
||||
columnState.setCellValueFactory(cellData -> cellData.getValue().getValue().statusProperty());
|
||||
|
||||
columnJobValue.setCellValueFactory(
|
||||
cellData -> cellData.getValue().getValue().valueProperty());
|
||||
columnJobValue.setCellValueFactory(cellData -> cellData.getValue().getValue().valueProperty());
|
||||
|
||||
jobsTreeTable.getSelectionModel().selectedItemProperty()
|
||||
.addListener(new ChangeListener<Object>() {
|
||||
jobsTreeTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {
|
||||
@Override
|
||||
public void changed(ObservableValue<?> observable, Object oldVal,
|
||||
Object newVal) {
|
||||
selectedJobId = jobsTreeTable.getSelectionModel()
|
||||
.getSelectedIndex(); // Get selected item
|
||||
public void changed(ObservableValue<?> observable, Object oldVal, Object newVal) {
|
||||
selectedJobId = jobsTreeTable.getSelectionModel().getSelectedIndex(); // Get selected item
|
||||
|
||||
if (dbc.getState_Job(selectedJobId + 1).equals("storniert")) {
|
||||
btnCancelJob.setDisable(true);
|
||||
btnReprintJob.setDisable(true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
btnCancelJob.setDisable(false);
|
||||
btnReprintJob.setDisable(false);
|
||||
}
|
||||
@ -1331,8 +1271,7 @@ public class MainWindowController {
|
||||
|
||||
for (int i = 0; i < dbc.loadTableJobs_Job().size(); i++) {
|
||||
|
||||
float fValue = Float
|
||||
.valueOf(dbc.loadTableJobs_Job().get(i).getValue());
|
||||
float fValue = Float.valueOf(dbc.loadTableJobs_Job().get(i).getValue());
|
||||
|
||||
String strValue = String.format("%.02f", fValue);
|
||||
|
||||
@ -1340,12 +1279,10 @@ public class MainWindowController {
|
||||
|
||||
strValue = (strValue + "€");
|
||||
|
||||
String strJobDescription = createJobDescription(
|
||||
dbc.loadTableJobs_Job().get(i).getPosition(),
|
||||
String strJobDescription = createJobDescription(dbc.loadTableJobs_Job().get(i).getPosition(),
|
||||
dbc.getQuantity_Job(dbc.loadTableJobs_Job().get(i).getNumber()));
|
||||
|
||||
tableDataJob tmp = new tableDataJob(
|
||||
dbc.loadTableJobs_Job().get(i).getNumber(),
|
||||
tableDataJob tmp = new tableDataJob(dbc.loadTableJobs_Job().get(i).getNumber(),
|
||||
dbc.loadTableJobs_Job().get(i).getTime(), strJobDescription,
|
||||
dbc.loadTableJobs_Job().get(i).getStatus(), strValue);
|
||||
|
||||
@ -1360,8 +1297,7 @@ public class MainWindowController {
|
||||
|
||||
public void createNewJob() {
|
||||
currentJob = new Job(dbc.getLatestJobNumber_Job() + 1);
|
||||
labelJobCounter.setText("Auftragsnummer: "
|
||||
+ String.valueOf(dbc.getLatestJobNumber_Job() + 1));
|
||||
labelJobCounter.setText("Auftragsnummer: " + String.valueOf(dbc.getLatestJobNumber_Job() + 1));
|
||||
}
|
||||
|
||||
private static String createJobDescription(String pNames, String pQuantities) {
|
||||
@ -1403,8 +1339,7 @@ public class MainWindowController {
|
||||
|
||||
labelAllValue.setText("Gesamt: " + str + "€");
|
||||
|
||||
titlePaneStats.setText("Statistik - " + timedate.getSystemTime() + " "
|
||||
+ timedate.getSystemDate());
|
||||
titlePaneStats.setText("Statistik - " + timedate.getSystemTime() + " " + timedate.getSystemDate());
|
||||
}
|
||||
|
||||
public void updateTimeLabel() {
|
||||
|
||||
@ -93,7 +93,8 @@ public class PrinterController implements Printable {
|
||||
bytes = text.getBytes(StandardCharsets.UTF_8);
|
||||
Doc doc = new SimpleDoc(bytes, flavor, null);
|
||||
job.print(doc, null);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -105,8 +106,8 @@ public class PrinterController implements Printable {
|
||||
}
|
||||
|
||||
/*
|
||||
* User (0,0) is typically outside the imageable area, so we must
|
||||
* translate by the X and Y values in the PageFormat to avoid clipping
|
||||
* User (0,0) is typically outside the imageable area, so we must translate by
|
||||
* the X and Y values in the PageFormat to avoid clipping
|
||||
*/
|
||||
Graphics2D g2d = (Graphics2D) g;
|
||||
g2d.translate(pf.getImageableX(), pf.getImageableY());
|
||||
@ -121,7 +122,8 @@ public class PrinterController implements Printable {
|
||||
try {
|
||||
Doc doc = new SimpleDoc(bytes, flavor, null);
|
||||
job.print(doc, null);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,8 @@ public class XMLController {
|
||||
|
||||
if (this.categorySplitted) {
|
||||
categorySplitted = "true";
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
categorySplitted = "false";
|
||||
}
|
||||
|
||||
@ -64,7 +65,8 @@ public class XMLController {
|
||||
outputStream = new FileOutputStream(filePath);
|
||||
props.storeToXML(outputStream, "jFxKasse settings");
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
catch (IOException e) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,21 +80,22 @@ public class XMLController {
|
||||
|
||||
try {
|
||||
this.linebreak = Integer.valueOf(props.getProperty("linebreak"));
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.linebreak = 28;
|
||||
}
|
||||
|
||||
try {
|
||||
this.offsetHeader = Integer
|
||||
.valueOf(props.getProperty("offsetHeader"));
|
||||
} catch (Exception e) {
|
||||
this.offsetHeader = Integer.valueOf(props.getProperty("offsetHeader"));
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.offsetHeader = 1;
|
||||
}
|
||||
|
||||
try {
|
||||
this.offsetFooter = Integer
|
||||
.valueOf(props.getProperty("offsetFooter"));
|
||||
} catch (Exception e) {
|
||||
this.offsetFooter = Integer.valueOf(props.getProperty("offsetFooter"));
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.offsetFooter = 2;
|
||||
}
|
||||
|
||||
@ -102,16 +105,19 @@ public class XMLController {
|
||||
try {
|
||||
if (props.getProperty("categorySplitted").equals("true")) {
|
||||
this.categorySplitted = true;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
this.categorySplitted = false;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.categorySplitted = false;
|
||||
}
|
||||
|
||||
inputStream.close();
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
}
|
||||
catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1,32 +1,25 @@
|
||||
package com.jFxKasse.datatypes;
|
||||
|
||||
public class Category
|
||||
{
|
||||
public class Category {
|
||||
private String categoryName;
|
||||
|
||||
private String positionsString = "\n";
|
||||
|
||||
public Category(String categoryName)
|
||||
{
|
||||
public Category(String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getCategoryName()
|
||||
{
|
||||
public String getCategoryName() {
|
||||
return categoryName;
|
||||
}
|
||||
|
||||
public void addPosition(int quantity, String name, String value,
|
||||
PrintData pd)
|
||||
{
|
||||
public void addPosition(int quantity, String name, String value, PrintData pd) {
|
||||
for (int i = 0; i < quantity; i++) {
|
||||
positionsString = positionsString
|
||||
+ pd.setRight(pd.breakLines(name), value + " €") + "\n";
|
||||
positionsString = positionsString + pd.setRight(pd.breakLines(name), value + " €") + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
public String getPositionsString()
|
||||
{
|
||||
public String getPositionsString() {
|
||||
return positionsString;
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,8 +46,7 @@ public class Job {
|
||||
return this.jobvalue;
|
||||
}
|
||||
|
||||
public void addPosition(String pPositionenName, float pPositionenValue,
|
||||
String pPositionenCat) {
|
||||
public void addPosition(String pPositionenName, float pPositionenValue, String pPositionenCat) {
|
||||
for (int i = 0; i < positionenName.size(); i++) {
|
||||
if (positionenName.get(i).equals(pPositionenName)) {
|
||||
// Item is already in list, increase quantity
|
||||
@ -71,9 +70,8 @@ public class Job {
|
||||
|
||||
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(positionenQuantity.get(i) + " " + positionenName.get(i) + " " + positionenValue.get(i)
|
||||
+ " " + positionenCat.get(i));
|
||||
}
|
||||
|
||||
System.out.println("---------------------------------------------");
|
||||
@ -85,8 +83,7 @@ public class Job {
|
||||
|
||||
for (int i = 0; i < positionenName.size(); i++) {
|
||||
|
||||
tableDataCurrentOrder tmp = new tableDataCurrentOrder(
|
||||
positionenName.get(i), positionenQuantity.get(i));
|
||||
tableDataCurrentOrder tmp = new tableDataCurrentOrder(positionenName.get(i), positionenQuantity.get(i));
|
||||
|
||||
jobitems.add(tmp);
|
||||
}
|
||||
@ -97,8 +94,7 @@ public class Job {
|
||||
jobvalue = 0;
|
||||
|
||||
for (int i = 0; i < positionenValue.size(); i++) {
|
||||
jobvalue = jobvalue
|
||||
+ (positionenQuantity.get(i) * positionenValue.get(i));
|
||||
jobvalue = jobvalue + (positionenQuantity.get(i) * positionenValue.get(i));
|
||||
}
|
||||
// Round to two decimal places
|
||||
jobvalue = BigDecimal.valueOf(jobvalue).setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();
|
||||
@ -148,7 +144,8 @@ public class Job {
|
||||
|
||||
if (positionenQuantity.get(i) > 1) {
|
||||
positionenQuantity.set(i, positionenQuantity.get(i) - 1);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
|
||||
positionenQuantity.remove(i);
|
||||
positionenName.remove(i);
|
||||
|
||||
@ -38,8 +38,8 @@ public abstract class PrintData {
|
||||
* @param header
|
||||
* @param footer
|
||||
*/
|
||||
public PrintData(int lineBreak, int headerSpace, int footerSpace,
|
||||
String timeAndDatePrint, String header, String footer) {
|
||||
public PrintData(int lineBreak, int headerSpace, int footerSpace, String timeAndDatePrint, String header,
|
||||
String footer) {
|
||||
this.lineBreak = lineBreak;
|
||||
this.headerSpace = headerSpace;
|
||||
this.footerSpace = footerSpace;
|
||||
@ -59,8 +59,7 @@ public abstract class PrintData {
|
||||
* @param positionenCategory
|
||||
* @param jobValue
|
||||
*/
|
||||
public void setData(String jobID, String timeAndDateOrder,
|
||||
String positionsQuantity, String positionsName,
|
||||
public void setData(String jobID, String timeAndDateOrder, String positionsQuantity, String positionsName,
|
||||
String positionsValue, String positionsCategory, String jobValue) {
|
||||
this.jobID = jobID;
|
||||
this.timeAndDateOrder = timeAndDateOrder;
|
||||
@ -85,7 +84,8 @@ public abstract class PrintData {
|
||||
if (data.length() > lineBreak) {
|
||||
// Needs to be split
|
||||
next = true;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// No need to split
|
||||
return data;
|
||||
}
|
||||
@ -98,7 +98,8 @@ public abstract class PrintData {
|
||||
try {
|
||||
tmp = tmp + "\n" + data.substring(count, lineBreak + count);
|
||||
count = count + lineBreak;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e) {
|
||||
// Data string not long enough
|
||||
next = false;
|
||||
}
|
||||
|
||||
@ -14,10 +14,9 @@ public class PrintDataSimple extends PrintData {
|
||||
* @param header
|
||||
* @param footer
|
||||
*/
|
||||
public PrintDataSimple(int lineBreak, int headerSpace, int footerSpace,
|
||||
String timeAndDatePrint, String header, String footer) {
|
||||
super(lineBreak, headerSpace, footerSpace, timeAndDatePrint, header,
|
||||
footer);
|
||||
public PrintDataSimple(int lineBreak, int headerSpace, int footerSpace, String timeAndDatePrint, String header,
|
||||
String footer) {
|
||||
super(lineBreak, headerSpace, footerSpace, timeAndDatePrint, header, footer);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -43,16 +42,14 @@ public class PrintDataSimple extends PrintData {
|
||||
|
||||
/* Info */
|
||||
|
||||
String info = setRight("Bestellung: ", timeAndDateOrder) + "\n"
|
||||
+ setRight("Druck: ", timeAndDatePrint) + "\n"
|
||||
String info = setRight("Bestellung: ", timeAndDateOrder) + "\n" + setRight("Druck: ", timeAndDatePrint) + "\n"
|
||||
+ setRight("Bestellnummer: ", jobID);
|
||||
|
||||
/* Positionen */
|
||||
|
||||
String positionen = "\n";
|
||||
|
||||
int posCount = positionsQuantity.length()
|
||||
- positionsQuantity.replace(";", "").length() + 1;
|
||||
int posCount = positionsQuantity.length() - positionsQuantity.replace(";", "").length() + 1;
|
||||
|
||||
String[] positionQuantity = positionsQuantity.split(";");
|
||||
|
||||
@ -63,8 +60,7 @@ public class PrintDataSimple extends PrintData {
|
||||
for (int i = 0; i < posCount; i++) { // All different posNames
|
||||
int quantity = Integer.parseInt(positionQuantity[i]);
|
||||
for (int j = 0; j < quantity; j++) { // quantities
|
||||
positionen = positionen + setRight(breakLines(positionName[i]),
|
||||
positionValue[i] + " €") + "\n";
|
||||
positionen = positionen + setRight(breakLines(positionName[i]), positionValue[i] + " €") + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,9 +79,8 @@ public class PrintDataSimple extends PrintData {
|
||||
|
||||
/* Build final Print String */
|
||||
|
||||
printString = header + "\n" + getSeparator() + "\n" + info + "\n"
|
||||
+ getSeparator() + "\n" + positionen + "\n" + getSeparator() + "\n"
|
||||
+ price + "\n" + getSeparator() + "\n" + footer;
|
||||
printString = header + "\n" + getSeparator() + "\n" + info + "\n" + getSeparator() + "\n" + positionen + "\n"
|
||||
+ getSeparator() + "\n" + price + "\n" + getSeparator() + "\n" + footer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -19,10 +19,9 @@ public class PrintDataSplitted extends PrintData {
|
||||
* @param header
|
||||
* @param footer
|
||||
*/
|
||||
public PrintDataSplitted(int lineBreak, int headerSpace, int footerSpace,
|
||||
String timeAndDatePrint, String header, String footer) {
|
||||
super(lineBreak, headerSpace, footerSpace, timeAndDatePrint, header,
|
||||
footer);
|
||||
public PrintDataSplitted(int lineBreak, int headerSpace, int footerSpace, String timeAndDatePrint, String header,
|
||||
String footer) {
|
||||
super(lineBreak, headerSpace, footerSpace, timeAndDatePrint, header, footer);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -51,8 +50,7 @@ public class PrintDataSplitted extends PrintData {
|
||||
|
||||
/* Info */
|
||||
|
||||
String info = setRight("Bestellung: ", timeAndDateOrder) + "\n"
|
||||
+ setRight("Druck: ", timeAndDatePrint) + "\n"
|
||||
String info = setRight("Bestellung: ", timeAndDateOrder) + "\n" + setRight("Druck: ", timeAndDatePrint) + "\n"
|
||||
+ setRight("Bestellnummer: ", jobID);
|
||||
|
||||
/* Splitted Bills by Category */
|
||||
@ -72,10 +70,9 @@ public class PrintDataSplitted extends PrintData {
|
||||
|
||||
/* Build first Print String */
|
||||
|
||||
firstBill = header + "\n" + getSeparator() + "\n" + info + "\n"
|
||||
+ getSeparator() + "\n" + setCenter("Bon wurde aufgeteilt") + "\n"
|
||||
+ getSeparator() + "\n" + price + "\n" + getSeparator() + "\n"
|
||||
+ footer;
|
||||
firstBill = header + "\n" + getSeparator() + "\n" + info + "\n" + getSeparator() + "\n"
|
||||
+ setCenter("Bon wurde aufgeteilt") + "\n" + getSeparator() + "\n" + price + "\n" + getSeparator()
|
||||
+ "\n" + footer;
|
||||
|
||||
printString.add(firstBill);
|
||||
|
||||
@ -85,8 +82,7 @@ public class PrintDataSplitted extends PrintData {
|
||||
|
||||
String positions = null;
|
||||
|
||||
int posCount = positionsQuantity.length()
|
||||
- positionsQuantity.replace(";", "").length() + 1;
|
||||
int posCount = positionsQuantity.length() - positionsQuantity.replace(";", "").length() + 1;
|
||||
|
||||
String[] positionQuantity = positionsQuantity.split(";");
|
||||
String[] positionName = positionsName.split(";");
|
||||
@ -95,8 +91,7 @@ public class PrintDataSplitted extends PrintData {
|
||||
|
||||
for (int i = 0; i < posCount; i++) { // All different posNames
|
||||
int quantity = Integer.parseInt(positionQuantity[i]);
|
||||
insertToCategory(quantity, positionName[i], positionValue[i],
|
||||
positionCategory[i]);
|
||||
insertToCategory(quantity, positionName[i], positionValue[i], positionCategory[i]);
|
||||
}
|
||||
|
||||
// Loops through all categories
|
||||
@ -115,8 +110,7 @@ public class PrintDataSplitted extends PrintData {
|
||||
|
||||
/* Info */
|
||||
|
||||
info = setRight("Bestellung: ", timeAndDateOrder) + "\n"
|
||||
+ setRight("Druck: ", timeAndDatePrint) + "\n"
|
||||
info = setRight("Bestellung: ", timeAndDateOrder) + "\n" + setRight("Druck: ", timeAndDatePrint) + "\n"
|
||||
+ setRight("Bestellnummer: ", jobID);
|
||||
|
||||
/* Positions */
|
||||
@ -132,11 +126,9 @@ public class PrintDataSplitted extends PrintData {
|
||||
}
|
||||
footer = footer + "_";
|
||||
|
||||
thisBill = header + "\n" + getSeparator() + "\n" + info + "\n"
|
||||
+ getSeparator() + "\n"
|
||||
+ setCenter(categories.get(i).getCategoryName()) + "\n"
|
||||
+ getSeparator() + positions + "\n" + getSeparator() + "\n"
|
||||
+ footer;
|
||||
thisBill = header + "\n" + getSeparator() + "\n" + info + "\n" + getSeparator() + "\n"
|
||||
+ setCenter(categories.get(i).getCategoryName()) + "\n" + getSeparator() + positions + "\n"
|
||||
+ getSeparator() + "\n" + footer;
|
||||
|
||||
printString.add(thisBill);
|
||||
|
||||
@ -144,8 +136,7 @@ public class PrintDataSplitted extends PrintData {
|
||||
|
||||
}
|
||||
|
||||
private void insertToCategory(int quantity, String name, String value,
|
||||
String category) {
|
||||
private void insertToCategory(int quantity, String name, String value, String category) {
|
||||
boolean createNewCategorie = true;
|
||||
for (int i = 0; i < categoryCount; i++) {
|
||||
if (category.equals(categories.get(i).getCategoryName())) {
|
||||
|
||||
@ -5,46 +5,38 @@ import javafx.beans.property.SimpleIntegerProperty;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.beans.property.StringProperty;
|
||||
|
||||
public class tableDataCurrentOrder
|
||||
{
|
||||
public class tableDataCurrentOrder {
|
||||
|
||||
private final StringProperty position = new SimpleStringProperty();
|
||||
|
||||
private final IntegerProperty quantity = new SimpleIntegerProperty();
|
||||
|
||||
public tableDataCurrentOrder(final String pPosition, final Integer pQuantity)
|
||||
{
|
||||
public tableDataCurrentOrder(final String pPosition, final Integer pQuantity) {
|
||||
this.position.set(pPosition);
|
||||
this.quantity.set(pQuantity);
|
||||
}
|
||||
|
||||
public StringProperty positionProperty()
|
||||
{
|
||||
public StringProperty positionProperty() {
|
||||
return position;
|
||||
}
|
||||
|
||||
public IntegerProperty quantityProperty()
|
||||
{
|
||||
public IntegerProperty quantityProperty() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public String getPosition()
|
||||
{
|
||||
public String getPosition() {
|
||||
return positionProperty().get();
|
||||
}
|
||||
|
||||
public Integer getQuantity()
|
||||
{
|
||||
public Integer getQuantity() {
|
||||
return quantityProperty().get();
|
||||
}
|
||||
|
||||
public final void setPosition(String pPosition)
|
||||
{
|
||||
public final void setPosition(String pPosition) {
|
||||
positionProperty().set(pPosition);
|
||||
}
|
||||
|
||||
public final void setQuantity(int pQuantity)
|
||||
{
|
||||
public final void setQuantity(int pQuantity) {
|
||||
quantityProperty().set(pQuantity);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,8 +5,7 @@ import javafx.beans.property.SimpleIntegerProperty;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.beans.property.StringProperty;
|
||||
|
||||
public class tableDataJob
|
||||
{
|
||||
public class tableDataJob {
|
||||
|
||||
private final IntegerProperty number = new SimpleIntegerProperty();
|
||||
|
||||
@ -18,9 +17,8 @@ public class tableDataJob
|
||||
|
||||
private final StringProperty value = new SimpleStringProperty();
|
||||
|
||||
public tableDataJob(final Integer pNumber, final String pTime,
|
||||
final String pPositionen, final String pStatus, final String pValue)
|
||||
{
|
||||
public tableDataJob(final Integer pNumber, final String pTime, final String pPositionen, final String pStatus,
|
||||
final String pValue) {
|
||||
this.number.set(pNumber);
|
||||
this.time.set(pTime);
|
||||
this.positionen.set(pPositionen);
|
||||
@ -29,78 +27,63 @@ public class tableDataJob
|
||||
|
||||
}
|
||||
|
||||
public IntegerProperty numberProperty()
|
||||
{
|
||||
public IntegerProperty numberProperty() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public StringProperty timeProperty()
|
||||
{
|
||||
public StringProperty timeProperty() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public StringProperty positionProperty()
|
||||
{
|
||||
public StringProperty positionProperty() {
|
||||
return positionen;
|
||||
}
|
||||
|
||||
public StringProperty statusProperty()
|
||||
{
|
||||
public StringProperty statusProperty() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public StringProperty valueProperty()
|
||||
{
|
||||
public StringProperty valueProperty() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Integer getNumber()
|
||||
{
|
||||
public Integer getNumber() {
|
||||
return numberProperty().get();
|
||||
}
|
||||
|
||||
public String getTime()
|
||||
{
|
||||
public String getTime() {
|
||||
return timeProperty().get();
|
||||
}
|
||||
|
||||
public String getPosition()
|
||||
{
|
||||
public String getPosition() {
|
||||
return positionProperty().get();
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
public String getStatus() {
|
||||
return statusProperty().get();
|
||||
}
|
||||
|
||||
public String getValue()
|
||||
{
|
||||
public String getValue() {
|
||||
return valueProperty().get();
|
||||
}
|
||||
|
||||
public final void setNumber(int pNumber)
|
||||
{
|
||||
public final void setNumber(int pNumber) {
|
||||
numberProperty().set(pNumber);
|
||||
}
|
||||
|
||||
public final void setTime(String pTime)
|
||||
{
|
||||
public final void setTime(String pTime) {
|
||||
timeProperty().set(pTime);
|
||||
}
|
||||
|
||||
public final void setPosition(String pPosition)
|
||||
{
|
||||
public final void setPosition(String pPosition) {
|
||||
positionProperty().set(pPosition);
|
||||
}
|
||||
|
||||
public final void setStatus(String pStatus)
|
||||
{
|
||||
public final void setStatus(String pStatus) {
|
||||
statusProperty().set(pStatus);
|
||||
}
|
||||
|
||||
public final void setValue(String pValue)
|
||||
{
|
||||
public final void setValue(String pValue) {
|
||||
valueProperty().set(pValue);
|
||||
}
|
||||
|
||||
|
||||
@ -29,46 +29,48 @@
|
||||
<children>
|
||||
<Button fx:id="ueberbtn" layoutX="273.0" layoutY="448.0" mnemonicParsing="false" onAction="#ueberbtnAction" prefHeight="35.0" prefWidth="324.0" text="Informationen über jFxKasse">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
</font></Button>
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<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>
|
||||
<AnchorPane fx:id="paneDB" minHeight="0.0" minWidth="0.0" prefHeight="238.0" prefWidth="564.0">
|
||||
<children>
|
||||
<Label fx:id="labelDBName" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="329.0" layoutY="10.0" prefHeight="34.0" prefWidth="229.0" text="Datenbankname:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="tftNewDBName" alignment="CENTER" layoutX="25.0" layoutY="10.0" prefHeight="25.0" prefWidth="376.0">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
</font></TextField>
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</TextField>
|
||||
<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 name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Button fx:id="btnCreateNewDatabase" layoutX="317.0" layoutY="126.0" mnemonicParsing="false" onAction="#btnCreateNewDatabaseAction" text="Neue Datenbank anlegen">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="13.0" />
|
||||
<Font name="Cantarell Regular" size="13.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="btnOpenFolder" layoutX="99.0" layoutY="126.0" mnemonicParsing="false" onAction="#btnOpenFolderAction" text="Speicherort öffnen">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="13.0" />
|
||||
<Font name="Cantarell Regular" size="13.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Label fx:id="labelFirstStart" alignment="CENTER" layoutX="1.0" layoutY="170.0" prefHeight="50.0" prefWidth="551.0" text="⚠ Erststart: Bitte geben Sie einen Datenbanknamen ein und klicken Sie auf 'Neue Datenbank anlegen'." textFill="#cc0000" visible="false" wrapText="true">
|
||||
<font>
|
||||
<Font name="Cantarell Bold" size="14.0" />
|
||||
<Font name="Cantarell Bold" size="14.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="13.0" />
|
||||
<Font name="Cantarell Regular" size="13.0"/>
|
||||
</font>
|
||||
</TitledPane>
|
||||
<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">
|
||||
@ -77,122 +79,129 @@
|
||||
<children>
|
||||
<Label fx:id="labelCat01" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="434.0" layoutY="10.0" prefHeight="34.0" prefWidth="124.0" text="Kategorie 1:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Label fx:id="labelCat02" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="442.0" layoutY="50.0" prefHeight="34.0" prefWidth="116.0" text="Kategorie 2:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Label fx:id="labelCat05" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="448.0" layoutY="170.0" prefHeight="34.0" prefWidth="110.0" text="Kategorie 5:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Label fx:id="labelCat04" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="454.0" layoutY="130.0" prefHeight="34.0" prefWidth="104.0" text="Kategorie 4:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Label fx:id="labelCat03" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="451.0" layoutY="90.0" prefHeight="34.0" prefWidth="107.0" text="Kategorie 3:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="tftKat01" alignment="CENTER" layoutX="50.0" layoutY="5.0" prefHeight="25.0" prefWidth="376.0">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
</font></TextField>
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="tftKat02" alignment="CENTER" layoutX="50.0" layoutY="45.0" prefHeight="25.0" prefWidth="376.0">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
</font></TextField>
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="tftKat03" alignment="CENTER" layoutX="50.0" layoutY="85.0" prefHeight="25.0" prefWidth="376.0">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
</font></TextField>
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="tftKat04" alignment="CENTER" layoutX="50.0" layoutY="125.0" prefHeight="25.0" prefWidth="376.0">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
</font></TextField>
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</TextField>
|
||||
<TextField fx:id="tftKat05" alignment="CENTER" layoutX="50.0" layoutY="165.0" prefHeight="25.0" prefWidth="376.0">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
</font></TextField>
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</TextField>
|
||||
<Button fx:id="btnSaveCat" layoutX="200.0" layoutY="204.0" mnemonicParsing="false" onAction="#btnSaveCatAction" text="Kategorien speichern">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="13.0" />
|
||||
<Font name="Cantarell Regular" size="13.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="13.0" />
|
||||
<Font name="Cantarell Regular" size="13.0"/>
|
||||
</font>
|
||||
</TitledPane>
|
||||
<TitledPane fx:id="titlePanePrint" alignment="CENTER" animated="false" collapsible="false" contentDisplay="CENTER" layoutX="790.0" layoutY="330.0" prefHeight="270.0" prefWidth="566.0" text="Drucker Einstellungen">
|
||||
<content>
|
||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="327.0" prefWidth="564.0">
|
||||
<children>
|
||||
<ChoiceBox fx:id="printerChoise" layoutX="270.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="178.0" />
|
||||
<Spinner fx:id="linesSpinner" layoutX="35.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="92.0" />
|
||||
<ChoiceBox fx:id="printerChoise" layoutX="270.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="178.0"/>
|
||||
<Spinner fx:id="linesSpinner" layoutX="35.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="92.0"/>
|
||||
<TextField fx:id="tftheader" alignment="CENTER" layoutX="65.0" layoutY="90.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="377.0">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
</font></TextField>
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</TextField>
|
||||
<CheckBox fx:id="switchSeparate" layoutX="270.0" layoutY="170.0" text="Kategorien separat drucken">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</CheckBox>
|
||||
<Label alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="450.0" layoutY="10.0" prefHeight="34.0" prefWidth="107.0" text="Drucker:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Label alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="140.0" layoutY="10.0" prefHeight="34.0" prefWidth="107.0" text="Zeilenlänge:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Label alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="365.0" layoutY="50.0" prefHeight="34.0" prefWidth="193.0" text="Versatz oben:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Label alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="70.0" layoutY="50.0" prefHeight="34.0" prefWidth="193.0" text="Versatz unten:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Label alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="365.0" layoutY="90.0" prefHeight="34.0" prefWidth="193.0" text="Kopfzeile:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Label alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="365.0" layoutY="130.0" prefHeight="34.0" prefWidth="193.0" text="Fußzeile:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Button fx:id="btnSavePrinter" layoutX="27.0" layoutY="198.0" mnemonicParsing="false" onAction="#btnSavePrinterAction" text="Einstellungen speichern">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="13.0" />
|
||||
<Font name="Cantarell Regular" size="13.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Spinner fx:id="offsetHeaderSpinner" layoutX="324.0" layoutY="48.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="92.0" />
|
||||
<Spinner fx:id="offsetFooterSpinner" layoutX="35.0" layoutY="48.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="92.0" />
|
||||
<Spinner fx:id="offsetHeaderSpinner" layoutX="324.0" layoutY="48.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="92.0"/>
|
||||
<Spinner fx:id="offsetFooterSpinner" layoutX="35.0" layoutY="48.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="92.0"/>
|
||||
<TextField fx:id="tftfooter" alignment="CENTER" layoutX="65.0" layoutY="130.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="377.0">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
</font></TextField>
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</TextField>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="13.0" />
|
||||
<Font name="Cantarell Regular" size="13.0"/>
|
||||
</font>
|
||||
</TitledPane>
|
||||
</children>
|
||||
@ -205,22 +214,22 @@
|
||||
<children>
|
||||
<TreeTableView fx:id="entryTreeTable" layoutX="11.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="502.0" prefWidth="1346.0">
|
||||
<placeholder>
|
||||
<Label text="" />
|
||||
<Label text=""/>
|
||||
</placeholder>
|
||||
<columns>
|
||||
<TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="1218.0" minWidth="59.0" prefWidth="165.0" resizable="false" sortable="false" text="Nummer" />
|
||||
<TreeTableColumn fx:id="columnPositionsEdit" editable="false" maxWidth="1581.6666870117188" minWidth="38.0" prefWidth="596.333251953125" resizable="false" sortable="false" text="Positionen" />
|
||||
<TreeTableColumn fx:id="columnPrize" editable="false" maxWidth="693.3333129882812" minWidth="44.33331298828125" prefWidth="140.33331298828125" resizable="false" sortable="false" text="Preis" />
|
||||
<TreeTableColumn fx:id="columnCat" editable="false" maxWidth="800.0" minWidth="94.0" prefWidth="300.0" resizable="false" sortable="false" text="Kategorie" />
|
||||
<TreeTableColumn fx:id="columnColor" editable="false" maxWidth="428.0" minWidth="119.333251953125" prefWidth="119.333251953125" resizable="false" sortable="false" text="Farbe" />
|
||||
<TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="1218.0" minWidth="59.0" prefWidth="165.0" resizable="false" sortable="false" text="Nummer"/>
|
||||
<TreeTableColumn fx:id="columnPositionsEdit" editable="false" maxWidth="1581.6666870117188" minWidth="38.0" prefWidth="596.333251953125" resizable="false" sortable="false" text="Positionen"/>
|
||||
<TreeTableColumn fx:id="columnPrize" editable="false" maxWidth="693.3333129882812" minWidth="44.33331298828125" prefWidth="140.33331298828125" resizable="false" sortable="false" text="Preis"/>
|
||||
<TreeTableColumn fx:id="columnCat" editable="false" maxWidth="800.0" minWidth="94.0" prefWidth="300.0" resizable="false" sortable="false" text="Kategorie"/>
|
||||
<TreeTableColumn fx:id="columnColor" editable="false" maxWidth="428.0" minWidth="119.333251953125" prefWidth="119.333251953125" resizable="false" sortable="false" text="Farbe"/>
|
||||
</columns>
|
||||
<columnResizePolicy>
|
||||
<TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
|
||||
<TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY"/>
|
||||
</columnResizePolicy>
|
||||
</TreeTableView>
|
||||
<Button fx:id="btnClearEntry" layoutX="232.0" layoutY="590.0" mnemonicParsing="false" onAction="#btnClearEntryAction" text="Ausgewählten Eintrag zurücksetzten">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="17.0" />
|
||||
<Font name="Cantarell Regular" size="17.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<TitledPane fx:id="titledPaneEntry" alignment="CENTER" animated="false" collapsible="false" contentDisplay="CENTER" layoutX="724.0" layoutY="525.0" prefHeight="163.0" prefWidth="633.0" text="Eintrag editieren">
|
||||
@ -229,46 +238,46 @@
|
||||
<children>
|
||||
<Label fx:id="labelNewPosition" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="516.0" layoutY="10.0" prefHeight="34.0" prefWidth="105.0" text="Position:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="tftNewPosition" alignment="CENTER" layoutX="307.0" layoutY="8.0" prefHeight="27.0" prefWidth="203.0">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="13.0" />
|
||||
<Font name="Cantarell Regular" size="13.0"/>
|
||||
</font>
|
||||
</TextField>
|
||||
<Label fx:id="labelNewValue" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="504.0" layoutY="50.0" prefHeight="34.0" prefWidth="118.0" text="Preis in Euro:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<TextField fx:id="tftNewValue" alignment="CENTER" layoutX="442.0" layoutY="42.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="27.0" prefWidth="66.0">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</TextField>
|
||||
<Label fx:id="labelNewColor" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="517.0" layoutY="90.0" prefHeight="34.0" prefWidth="105.0" text="Farbe:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<ChoiceBox fx:id="colorChoise" layoutX="340.0" layoutY="90.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="169.0" />
|
||||
<ChoiceBox fx:id="colorChoise" layoutX="340.0" layoutY="90.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="169.0"/>
|
||||
<Label fx:id="labelSelectCat" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="185.0" layoutY="10.0" prefHeight="34.0" prefWidth="105.0" text="Kategorie:">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<ChoiceBox fx:id="catChoise" layoutX="16.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="180.0" />
|
||||
<ChoiceBox fx:id="catChoise" layoutX="16.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="180.0"/>
|
||||
<Button fx:id="btnSaveEntry" layoutX="23.0" layoutY="86.0" mnemonicParsing="false" onAction="#btnSaveEntryAction" text="Ausgewählten Eintrag speichern">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="17.0" />
|
||||
<Font name="Cantarell Regular" size="17.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="13.0" />
|
||||
<Font name="Cantarell Regular" size="13.0"/>
|
||||
</font>
|
||||
</TitledPane>
|
||||
</children>
|
||||
@ -281,19 +290,19 @@
|
||||
<children>
|
||||
<TreeTableView fx:id="jobsTreeTable" layoutX="11.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="541.0" prefWidth="1346.0">
|
||||
<placeholder>
|
||||
<Label text="" />
|
||||
<Label text=""/>
|
||||
</placeholder>
|
||||
<columns>
|
||||
<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="85.0" resizable="false" sortable="false" text="Nummer" />
|
||||
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="160.0" resizable="false" sortable="false" text="Zeit" />
|
||||
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="856.0" resizable="false" sortable="false" text="Positionen" />
|
||||
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="116.0" resizable="false" sortable="false" text="Zustand" />
|
||||
<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="103.0" resizable="false" sortable="false" text="Betrag" />
|
||||
<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="85.0" resizable="false" sortable="false" text="Nummer"/>
|
||||
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="160.0" resizable="false" sortable="false" text="Zeit"/>
|
||||
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="856.0" resizable="false" sortable="false" text="Positionen"/>
|
||||
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="116.0" resizable="false" sortable="false" text="Zustand"/>
|
||||
<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="103.0" resizable="false" sortable="false" text="Betrag"/>
|
||||
</columns>
|
||||
</TreeTableView>
|
||||
<Button fx:id="btnReprintJob" layoutX="378.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnReprintJobAction" text="Ausgewählter Auftrag drucken">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="17.0" />
|
||||
<Font name="Cantarell Regular" size="17.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<TitledPane fx:id="titlePaneStats" alignment="CENTER" collapsible="false" contentDisplay="CENTER" layoutX="957.0" layoutY="561.0" prefHeight="118.0" prefWidth="400.0" text="Statistik - 30.03.2018 15:15 Uhr">
|
||||
@ -302,17 +311,17 @@
|
||||
<children>
|
||||
<Label fx:id="labelJobCount" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="41.0" layoutY="2.0" prefHeight="34.0" prefWidth="340.0" text="Anzahl Aufträge: 2781">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Label fx:id="labelAvgJob" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="41.0" layoutY="30.0" prefHeight="34.0" prefWidth="340.0" text="Durchschnittlicher Auftragswert: 12,90€">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Label fx:id="labelAllValue" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="41.0" layoutY="60.0" prefHeight="34.0" prefWidth="340.0" text="Gesamt: 1088,48€">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="18.0" />
|
||||
<Font name="Cantarell Regular" size="18.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
</children>
|
||||
@ -321,12 +330,12 @@
|
||||
</TitledPane>
|
||||
<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 name="Cantarell Regular" size="17.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="btnCalcStats" layoutX="712.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnCalcStatsAction" text="Statistiken berrechnen">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="17.0" />
|
||||
<Font name="Cantarell Regular" size="17.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
</children>
|
||||
@ -339,190 +348,190 @@
|
||||
<children>
|
||||
<TreeTableView fx:id="tableCurrentOrder" layoutX="15.0" layoutY="85.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="358.0" prefWidth="382.0">
|
||||
<placeholder>
|
||||
<Label text="" />
|
||||
<Label text=""/>
|
||||
</placeholder>
|
||||
<columns>
|
||||
<TreeTableColumn fx:id="columnQuantity" editable="false" prefWidth="60.0" resizable="false" sortable="false" text="Anzahl" />
|
||||
<TreeTableColumn fx:id="columnPosition" editable="false" prefWidth="320.0" resizable="false" sortable="false" text="Position" />
|
||||
<TreeTableColumn fx:id="columnQuantity" editable="false" prefWidth="60.0" resizable="false" sortable="false" text="Anzahl"/>
|
||||
<TreeTableColumn fx:id="columnPosition" editable="false" prefWidth="320.0" resizable="false" sortable="false" text="Position"/>
|
||||
</columns>
|
||||
<columnResizePolicy>
|
||||
<TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
|
||||
<TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY"/>
|
||||
</columnResizePolicy>
|
||||
</TreeTableView>
|
||||
<GridPane gridLinesVisible="true" layoutX="430.0" layoutY="15.0" prefHeight="670.0" prefWidth="920.0">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Button fx:id="gridButton04" maxWidth="235.0" minWidth="179.0" onAction="#gridButton04Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton05" maxWidth="235.0" minWidth="179.0" onAction="#gridButton05Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton03" maxWidth="235.0" minWidth="179.0" onAction="#gridButton03Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton02" maxWidth="235.0" minWidth="179.0" onAction="#gridButton02Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton01" maxWidth="235.0" minWidth="179.0" onAction="#gridButton01Action" prefHeight="134.0" prefWidth="179.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton10" maxWidth="235.0" minWidth="179.0" onAction="#gridButton10Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="1">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton09" maxWidth="235.0" minWidth="179.0" onAction="#gridButton09Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton08" maxWidth="235.0" minWidth="179.0" onAction="#gridButton08Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton07" maxWidth="235.0" minWidth="179.0" onAction="#gridButton07Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="1">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton06" maxWidth="235.0" minWidth="179.0" onAction="#gridButton06Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="1">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton15" maxWidth="235.0" minWidth="179.0" onAction="#gridButton15Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="2">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton14" maxWidth="235.0" minWidth="179.0" onAction="#gridButton14Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton13" maxWidth="235.0" minWidth="179.0" onAction="#gridButton13Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="2">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton12" maxWidth="235.0" minWidth="179.0" onAction="#gridButton12Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="2">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton11" maxWidth="235.0" minWidth="179.0" onAction="#gridButton11Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="2">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton20" maxWidth="235.0" minWidth="179.0" onAction="#gridButton20Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="3">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton19" maxWidth="235.0" minWidth="179.0" onAction="#gridButton19Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="3">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton18" maxWidth="235.0" minWidth="179.0" onAction="#gridButton18Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="3">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton17" maxWidth="235.0" minWidth="179.0" onAction="#gridButton17Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="3">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton16" maxWidth="235.0" minWidth="179.0" onAction="#gridButton16Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="3">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton25" maxWidth="235.0" minWidth="179.0" onAction="#gridButton25Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="4">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton23" maxWidth="235.0" minWidth="179.0" onAction="#gridButton23Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="4">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton22" maxWidth="235.0" minWidth="179.0" onAction="#gridButton22Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="4">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton21" maxWidth="235.0" minWidth="179.0" onAction="#gridButton21Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="4">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="gridButton24" maxWidth="235.0" minWidth="179.0" onAction="#gridButton24Action" prefHeight="169.0" prefWidth="235.0" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="4">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="24.0" />
|
||||
<Font name="Cantarell Regular" size="24.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
</children>
|
||||
</GridPane>
|
||||
<Button fx:id="btnPrintBill" contentDisplay="CENTER" focusTraversable="false" graphicTextGap="1.0" layoutX="75.0" layoutY="588.0" maxHeight="88.0" minHeight="75.0" mnemonicParsing="false" onAction="#btnPrintBillAction" prefHeight="88.0" prefWidth="258.0" text="Drucken" textAlignment="CENTER" wrapText="true">
|
||||
<font>
|
||||
<Font name="Cantarell Bold" size="48.0" />
|
||||
<Font name="Cantarell Bold" size="48.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Button fx:id="btnDeleteSelectedPosition" layoutX="43.0" layoutY="458.0" mnemonicParsing="false" onAction="#btnDeleteSelectedPositionAction" prefHeight="17.0" prefWidth="332.0" text="Ausgewählte Position löschen" textAlignment="CENTER">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="20.0" />
|
||||
<Font name="Cantarell Regular" size="20.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Label fx:id="labelAllPrize" alignment="CENTER" contentDisplay="CENTER" layoutX="10.0" layoutY="496.0" prefHeight="15.0" prefWidth="386.0" text="0,00 €" textAlignment="CENTER">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="70.0" />
|
||||
<Font name="Cantarell Regular" 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: 0" textAlignment="CENTER">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="26.0" />
|
||||
<Font name="Cantarell Regular" size="26.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<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">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="26.0" />
|
||||
<Font name="Cantarell Regular" size="26.0"/>
|
||||
</font>
|
||||
</Label>
|
||||
<Button fx:id="btnLock" layoutX="1.0" layoutY="6.0" lineSpacing="2.0" onAction="#btnLockAction" prefHeight="42.0" prefWidth="180.0" text="Kasse sperren" textAlignment="CENTER" textFill="#c91c1c" textOverrun="LEADING_WORD_ELLIPSIS">
|
||||
<font>
|
||||
<Font name="Cantarell Regular" size="19.0" />
|
||||
<Font name="Cantarell Regular" size="19.0"/>
|
||||
</font>
|
||||
</Button>
|
||||
<Line endX="800.0" layoutX="62.0" layoutY="465.0" rotate="90.0" startX="-100.0" strokeWidth="4.0" />
|
||||
<Line endX="800.0" layoutX="62.0" layoutY="465.0" rotate="90.0" startX="-100.0" strokeWidth="4.0"/>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
|
||||
Reference in New Issue
Block a user