Compare commits
	
		
			61 Commits
		
	
	
		
			e130401126
			...
			Wurstwasse
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| a56ad43852 | |||
| 188214dfbe | |||
| cdbe2cccc0 | |||
| 5152846478 | |||
| f5c5d546c5 | |||
| 5c9d54dabf | |||
| 96d5968fef | |||
| 88b39820ca | |||
| 25bedae873 | |||
| 1ec02d74a3 | |||
| 783d9f9bc0 | |||
| a7b2753aa3 | |||
| dd9ff0d410 | |||
| 4e902415d7 | |||
| 87f9b8786c | |||
| 37cfe02c5b | |||
| 76020e371b | |||
| b9b6748ac7 | |||
| 078b3dfdea | |||
| 0db448019c | |||
| fbd128e5b9 | |||
| 290a5d8e5c | |||
| dfe1008786 | |||
| e691d4e1dc | |||
| 8ff4d88202 | |||
| 86c0ad144a | |||
| 38d42db6cd | |||
| c85f239651 | |||
| 4291038d4e | |||
| ccaf68d60f | |||
| ac85cb82ff | |||
| ea7f84c2c1 | |||
| 9d506475cb | |||
| aca967e88d | |||
| ebda172415 | |||
| 279f358392 | |||
| 244243f07a | |||
| 50b623dd39 | |||
| 3f4edc85f0 | |||
| 121a86a6b5 | |||
| 0185053b8d | |||
| 06495ebd5b | |||
| fc03ba40e3 | |||
| 640a9e4de4 | |||
| 0cad411304 | |||
| 514f1b0605 | |||
| 0944f210dd | |||
| ef23a0d631 | |||
| ae3e02278d | |||
| 259988195f | |||
| 8650177d86 | |||
| 2a59156b0b | |||
| 786586c382 | |||
| 1c640de416 | |||
| 5f1b0d9ae1 | |||
| 105c168157 | |||
| 606b879fb9 | |||
| 748f08abfd | |||
| a24023ac66 | |||
| a79a90a678 | |||
| 830f1576a6 | 
							
								
								
									
										31
									
								
								README.md
									
									
									
									
									
								
							
							
						
						| @ -1,2 +1,33 @@ | |||||||
| # jFxKasse | # jFxKasse | ||||||
| easy payment system for small to middel sized events with a sales slip printer | easy payment system for small to middel sized events with a sales slip printer | ||||||
|  |  | ||||||
|  | Simples Kassensystem für kleine bis mittlere Veranstalltungen bit Bon-Drucker | ||||||
|  |  | ||||||
|  | ## Screenshots | ||||||
|  |  | ||||||
|  | ### Main View | Hauptansicht | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ### Jobs | Auftäge | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ### Positions | Positionen | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ### Settings | Einstellungen | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ## Requirements | Anforderungen | ||||||
|  |  | ||||||
|  | ### Software | ||||||
|  |  | ||||||
|  | * Java JRE 11 | ||||||
|  | * Display/Bildschirm > 1366px X 768px | ||||||
|  | * Windoofs, Mac, GNU/Linux (openSuse tested) | ||||||
|  |  | ||||||
|  | ### Hardware | ||||||
|  |  | ||||||
|  | I used this prtiner: [Epson TM T20II](https://www.epson.de/products/sd/pos-printer/epson-tm-t20ii) | ||||||
|  |  | ||||||
|  | Other sales slip printer are possible.  | ||||||
| @ -1,374 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> |  | ||||||
|  |  | ||||||
| <?import com.jfoenix.controls.JFXButton?> |  | ||||||
| <?import com.jfoenix.controls.JFXTextField?> |  | ||||||
| <?import javafx.scene.control.Button?> |  | ||||||
| <?import javafx.scene.control.ChoiceBox?> |  | ||||||
| <?import javafx.scene.control.Label?> |  | ||||||
| <?import javafx.scene.control.Tab?> |  | ||||||
| <?import javafx.scene.control.TabPane?> |  | ||||||
| <?import javafx.scene.control.TitledPane?> |  | ||||||
| <?import javafx.scene.control.TreeTableColumn?> |  | ||||||
| <?import javafx.scene.control.TreeTableView?> |  | ||||||
| <?import javafx.scene.layout.AnchorPane?> |  | ||||||
| <?import javafx.scene.layout.ColumnConstraints?> |  | ||||||
| <?import javafx.scene.layout.GridPane?> |  | ||||||
| <?import javafx.scene.layout.RowConstraints?> |  | ||||||
| <?import javafx.scene.shape.Line?> |  | ||||||
| <?import javafx.scene.text.Font?> |  | ||||||
|  |  | ||||||
| <AnchorPane fx:id="mainAnchorpane" maxHeight="732.0" maxWidth="1366.0" minHeight="732.0" minWidth="1366.0" prefHeight="732.0" prefWidth="1366.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MainWindowController"> |  | ||||||
| 	<children> |  | ||||||
| 		<TabPane layoutX="4.0" layoutY="5.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="924.0" prefWidth="1536.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> |  | ||||||
| 			<tabs> |  | ||||||
| 				<Tab text="Einstellungen"> |  | ||||||
| 					<content> |  | ||||||
| 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"> |  | ||||||
| 							<children> |  | ||||||
| 								<Button fx:id="ueberbtn" layoutX="664.0" layoutY="325.0" mnemonicParsing="false" onAction="#ueberbtnAction" text="Über" /> |  | ||||||
|                         <TitledPane alignment="CENTER" animated="false" collapsible="false" contentDisplay="CENTER" layoutX="790.0" layoutY="10.0" prefHeight="163.0" prefWidth="566.0" text="Datenbank"> |  | ||||||
|                            <content> |  | ||||||
|                               <AnchorPane fx:id="paneDB" minHeight="0.0" minWidth="0.0" prefHeight="135.0" prefWidth="547.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> |  | ||||||
|                                     </Label> |  | ||||||
|                                     <JFXTextField fx:id="tftNewDBName" alignment="CENTER" layoutX="25.0" layoutY="10.0" prefHeight="25.0" prefWidth="376.0" /> |  | ||||||
|                                     <Label fx:id="labelDBStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="7.0" layoutY="50.0" prefHeight="34.0" prefWidth="551.0" text="Keine Datenbank gefunden!"> |  | ||||||
|                                        <font> |  | ||||||
|                                           <Font name="Cantarell Regular" size="18.0" /> |  | ||||||
|                                        </font> |  | ||||||
|                                     </Label> |  | ||||||
|                                     <Button fx:id="btnCreateNewDatabase" layoutX="297.0" layoutY="90.0" mnemonicParsing="false" onAction="#btnCreateNewDatabaseAction" text="Neue Datenbank anlegen"> |  | ||||||
|                                        <font> |  | ||||||
|                                           <Font name="Cantarell Regular" size="13.0" /> |  | ||||||
|                                        </font> |  | ||||||
|                                     </Button> |  | ||||||
|                                     <Button fx:id="btnOpenFolder" layoutX="39.0" layoutY="90.0" mnemonicParsing="false" onAction="#btnOpenFolderAction" text="Speicherort öffnen"> |  | ||||||
|                                        <font> |  | ||||||
|                                           <Font name="Cantarell Regular" size="13.0" /> |  | ||||||
|                                        </font> |  | ||||||
|                                     </Button> |  | ||||||
|                                  </children> |  | ||||||
|                               </AnchorPane> |  | ||||||
|                            </content> |  | ||||||
|                            <font> |  | ||||||
|                               <Font name="Cantarell Regular" size="13.0" /> |  | ||||||
|                            </font> |  | ||||||
|                         </TitledPane> |  | ||||||
| 							</children> |  | ||||||
| 						</AnchorPane> |  | ||||||
| 					</content> |  | ||||||
| 				</Tab> |  | ||||||
| 				<Tab text="Positionen bearbeiten"> |  | ||||||
| 					<content> |  | ||||||
| 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"> |  | ||||||
|                      <children> |  | ||||||
|                         <TreeTableView fx:id="entryTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="502.0" prefWidth="1346.0"> |  | ||||||
|                            <columns> |  | ||||||
|                               <TreeTableColumn fx:id="columnColor" editable="false" maxWidth="200.0" minWidth="200.0" prefWidth="200.0" resizable="false" sortable="false" text="Farbe" /> |  | ||||||
|                               <TreeTableColumn fx:id="columnPrize" editable="false" maxWidth="200.0" minWidth="200.0" prefWidth="200.0" resizable="false" sortable="false" text="Preis" /> |  | ||||||
|                               <TreeTableColumn fx:id="columnPositionsEdit" editable="false" maxWidth="800.0" minWidth="800.0" prefWidth="800.0" resizable="false" sortable="false" text="Positionen" /> |  | ||||||
|                               <TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="120.0" minWidth="120.0" prefWidth="120.0" resizable="false" sortable="false" text="Nummer" /> |  | ||||||
|                            </columns> |  | ||||||
|                            <columnResizePolicy> |  | ||||||
|                               <TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> |  | ||||||
|                            </columnResizePolicy> |  | ||||||
|                         </TreeTableView> |  | ||||||
|                         <Button fx:id="btnSaveEntry" layoutX="494.0" layoutY="631.0" mnemonicParsing="false" onAction="#btnSaveEntryAction" text="Ausgewählten Eintrag speichern"> |  | ||||||
|                            <font> |  | ||||||
|                               <Font name="Cantarell Regular" size="17.0" /> |  | ||||||
|                            </font> |  | ||||||
|                         </Button> |  | ||||||
|                         <Button fx:id="btnClearEntry" layoutX="462.0" layoutY="525.0" mnemonicParsing="false" onAction="#btnClearEntryAction" text="Ausgewählten Eintrag zurücksetzten"> |  | ||||||
|                            <font> |  | ||||||
|                               <Font name="Cantarell Regular" size="17.0" /> |  | ||||||
|                            </font> |  | ||||||
|                         </Button> |  | ||||||
|                         <TitledPane alignment="CENTER" animated="false" collapsible="false" contentDisplay="CENTER" layoutX="792.0" layoutY="525.0" prefHeight="163.0" prefWidth="565.0" text="Eintrag editieren"> |  | ||||||
|                           <content> |  | ||||||
|                             <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"> |  | ||||||
|                                  <children> |  | ||||||
|                                     <Label fx:id="lableNewPosition" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="455.0" layoutY="10.0" prefHeight="34.0" prefWidth="105.0" text="Position:"> |  | ||||||
|                                        <font> |  | ||||||
|                                           <Font name="Cantarell Regular" size="18.0" /> |  | ||||||
|                                        </font> |  | ||||||
|                                     </Label> |  | ||||||
|                                     <JFXTextField fx:id="tftNewPosition" alignment="CENTER" layoutX="160.0" layoutY="10.0" prefHeight="25.0" prefWidth="279.0"> |  | ||||||
|                                        <font> |  | ||||||
|                                           <Font name="Cantarell Regular" size="13.0" /> |  | ||||||
|                                        </font></JFXTextField> |  | ||||||
|                                     <Label fx:id="labelNewValue" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="442.0" layoutY="50.0" prefHeight="34.0" prefWidth="118.0" text="Preis in Euro:"> |  | ||||||
|                                        <font> |  | ||||||
|                                           <Font name="Cantarell Regular" size="18.0" /> |  | ||||||
|                                        </font> |  | ||||||
|                                     </Label> |  | ||||||
|                                     <JFXTextField fx:id="tftNewValue" alignment="CENTER" layoutX="380.0" layoutY="50.0" prefHeight="25.0" prefWidth="58.0"> |  | ||||||
|                                        <font> |  | ||||||
|                                           <Font name="Cantarell Regular" size="13.0" /> |  | ||||||
|                                        </font></JFXTextField> |  | ||||||
|                                     <Label fx:id="lableNewColor" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="455.0" layoutY="90.0" prefHeight="34.0" prefWidth="105.0" text="Farbe:"> |  | ||||||
|                                        <font> |  | ||||||
|                                           <Font name="Cantarell Regular" size="18.0" /> |  | ||||||
|                                        </font> |  | ||||||
|                                     </Label> |  | ||||||
|                                     <ChoiceBox fx:id="colorChoise" layoutX="292.0" layoutY="95.0" prefWidth="150.0" /> |  | ||||||
|                                  </children> |  | ||||||
|                               </AnchorPane> |  | ||||||
|                           </content> |  | ||||||
|                            <font> |  | ||||||
|                               <Font name="Cantarell Regular" size="13.0" /> |  | ||||||
|                            </font> |  | ||||||
|                         </TitledPane> |  | ||||||
|                      </children></AnchorPane> |  | ||||||
| 					</content> |  | ||||||
| 				</Tab> |  | ||||||
| 				<Tab text="Aufträge"> |  | ||||||
| 					<content> |  | ||||||
| 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="850.0" prefWidth="1536.0"> |  | ||||||
| 							<children> |  | ||||||
| 								<TreeTableView fx:id="jobsTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="541.0" prefWidth="1346.0"> |  | ||||||
| 									<columns> |  | ||||||
| 										<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="90.6666259765625" resizable="false" text="Betrag" /> |  | ||||||
| 										<TreeTableColumn fx:id="columnState" editable="false" prefWidth="91.0" resizable="false" text="Zustand" /> |  | ||||||
| 										<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="981.333251953125" resizable="false" sortable="false" text="Positionen" /> |  | ||||||
| 										<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="99.666748046875" resizable="false" text="Zeit" /> |  | ||||||
| 										<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="83.6666259765625" resizable="false" text="Nummer" /> |  | ||||||
| 									</columns> |  | ||||||
| 								</TreeTableView> |  | ||||||
| 								<Button fx:id="btnReprintJob" layoutX="378.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnReprintJobAction" text="Ausgewählter Auftrag drucken"> |  | ||||||
| 									<font> |  | ||||||
| 										<Font name="Cantarell Regular" size="17.0" /> |  | ||||||
| 									</font> |  | ||||||
| 								</Button> |  | ||||||
| 								<TitledPane fx:id="titlePaneStats" alignment="CENTER" collapsible="false" contentDisplay="CENTER" layoutX="992.0" layoutY="561.0" prefHeight="118.0" prefWidth="365.0" text="Statistik - 30.03.2018 15:15 Uhr"> |  | ||||||
| 									<content> |  | ||||||
| 										<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="59.0" prefWidth="483.0"> |  | ||||||
| 											<children> |  | ||||||
| 												<Label fx:id="lableJobCount" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="17.0" layoutY="2.0" prefHeight="34.0" prefWidth="340.0" text="Anzahl Aufträge: 2781"> |  | ||||||
| 													<font> |  | ||||||
| 														<Font name="Cantarell Regular" size="18.0" /> |  | ||||||
| 													</font> |  | ||||||
| 												</Label> |  | ||||||
| 												<Label fx:id="labelAvgJob" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="17.0" layoutY="30.0" prefHeight="34.0" prefWidth="340.0" text="Durchschnittlicher Auftragswert: 12,90€"> |  | ||||||
| 													<font> |  | ||||||
| 														<Font name="Cantarell Regular" size="18.0" /> |  | ||||||
| 													</font> |  | ||||||
| 												</Label> |  | ||||||
| 												<Label fx:id="lableAllValue" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="17.0" layoutY="60.0" prefHeight="34.0" prefWidth="340.0" text="Gesamt: 1088,48€"> |  | ||||||
| 													<font> |  | ||||||
| 														<Font name="Cantarell Regular" size="18.0" /> |  | ||||||
| 													</font> |  | ||||||
| 												</Label> |  | ||||||
| 											</children> |  | ||||||
| 										</AnchorPane> |  | ||||||
| 									</content> |  | ||||||
| 								</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> |  | ||||||
| 								</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> |  | ||||||
| 								</Button> |  | ||||||
| 							</children> |  | ||||||
| 						</AnchorPane> |  | ||||||
| 					</content> |  | ||||||
| 				</Tab> |  | ||||||
| 				<Tab text="Neuer Auftrag"> |  | ||||||
| 					<content> |  | ||||||
| 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="850.0" prefWidth="1536.0"> |  | ||||||
| 							<children> |  | ||||||
| 								<TreeTableView fx:id="tableCurrentOrder" layoutX="15.0" layoutY="85.0" prefHeight="379.0" prefWidth="382.0"> |  | ||||||
| 									<columns> |  | ||||||
| 										<TreeTableColumn fx:id="columnPosition" editable="false" prefWidth="304.3333740234375" resizable="false" sortable="false" text="Position" /> |  | ||||||
| 										<TreeTableColumn fx:id="columnQuantity" editable="false" prefWidth="80.6666259765625" resizable="false" sortable="false" text="Anzahl" /> |  | ||||||
| 									</columns> |  | ||||||
| 								</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> |  | ||||||
| 									<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> |  | ||||||
| 									<children> |  | ||||||
| 										<JFXButton fx:id="gridButton04" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton04Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton05" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton05Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton03" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton03Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton02" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton02Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton01" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton01Action" prefHeight="134.0" prefWidth="179.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton10" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton10Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="1"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton09" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton09Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="1"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton08" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton08Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="1"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton07" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton07Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="1"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton06" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton06Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="1"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton15" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton15Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="2"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton14" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton14Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="2"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton13" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton13Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="2"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton12" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton12Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="2"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton11" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton11Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="2"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton20" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton20Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="3"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton19" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton19Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="3"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton18" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton18Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="3"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton17" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton17Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="3"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton16" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton16Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="3"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton25" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton25Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.rowIndex="4"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton23" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton23Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="2" GridPane.rowIndex="4"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton22" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton22Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="3" GridPane.rowIndex="4"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton21" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton21Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="4" GridPane.rowIndex="4"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 										<JFXButton fx:id="gridButton24" buttonType="RAISED" maxWidth="235.0" minWidth="179.0" onAction="#gridButton24Action" prefHeight="169.0" prefWidth="235.0" ripplerFill="#655252" text="leer 0,00€" textAlignment="CENTER" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="4"> |  | ||||||
| 											<font> |  | ||||||
| 												<Font name="Cantarell Regular" size="24.0" /> |  | ||||||
| 											</font> |  | ||||||
| 										</JFXButton> |  | ||||||
| 									</children> |  | ||||||
| 								</GridPane> |  | ||||||
| 								<Button fx:id="btnPrintBill" contentDisplay="CENTER" defaultButton="true" graphicTextGap="1.0" layoutX="75.0" layoutY="599.0" maxHeight="88.0" minHeight="75.0" mnemonicParsing="false" onAction="#btnPrintBillAction" prefHeight="88.0" prefWidth="258.0" text="Drucken" wrapText="true"> |  | ||||||
| 									<font> |  | ||||||
| 										<Font name="Cantarell Bold" size="48.0" /> |  | ||||||
| 									</font> |  | ||||||
| 								</Button> |  | ||||||
| 								<Button fx:id="btnDeleteSelectedPosition" layoutX="43.0" layoutY="475.0" mnemonicParsing="false" onAction="#btnDeleteSelectedPositionAction" prefHeight="17.0" prefWidth="332.0" text="Ausgewählte Position löschen" textAlignment="CENTER"> |  | ||||||
| 									<font> |  | ||||||
| 										<Font name="Cantarell Regular" size="20.0" /> |  | ||||||
| 									</font> |  | ||||||
| 								</Button> |  | ||||||
| 								<Label fx:id="labelAllPrize" alignment="CENTER" contentDisplay="CENTER" layoutX="10.0" layoutY="505.0" prefHeight="15.0" prefWidth="386.0" text="0,00 €" textAlignment="CENTER"> |  | ||||||
| 									<font> |  | ||||||
| 										<Font name="Open Sans" size="70.0" /> |  | ||||||
| 									</font> |  | ||||||
| 								</Label> |  | ||||||
| 								<Label fx:id="labelJobCounter" alignment="TOP_RIGHT" contentDisplay="CENTER" layoutX="5.0" layoutY="45.0" prefHeight="34.0" prefWidth="392.0" text="Auftragsnummer: 0" textAlignment="CENTER"> |  | ||||||
| 									<font> |  | ||||||
| 										<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> |  | ||||||
| 								</Label> |  | ||||||
| 								<JFXButton fx:id="btnLock" buttonType="RAISED" cancelButton="true" layoutX="1.0" layoutY="6.0" lineSpacing="2.0" onAction="#btnLockAction" prefHeight="42.0" prefWidth="180.0" ripplerFill="BLACK" text="Kasse sperren" textAlignment="CENTER" textFill="#c91c1c" textOverrun="LEADING_WORD_ELLIPSIS"> |  | ||||||
| 									<font> |  | ||||||
| 										<Font name="Cantarell Regular" size="19.0" /> |  | ||||||
| 									</font> |  | ||||||
| 								</JFXButton> |  | ||||||
| 								<Line endX="800.0" layoutX="62.0" layoutY="465.0" rotate="90.0" startX="-100.0" strokeWidth="4.0" /> |  | ||||||
| 							</children> |  | ||||||
| 						</AnchorPane> |  | ||||||
| 					</content> |  | ||||||
| 				</Tab> |  | ||||||
| 			</tabs> |  | ||||||
| 		</TabPane> |  | ||||||
| 	</children> |  | ||||||
| </AnchorPane> |  | ||||||
| Before Width: | Height: | Size: 577 B | 
| @ -1,8 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="ASCII"?> |  | ||||||
| <anttasks:AntTask xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:anttasks="http://org.eclipse.fx.ide.jdt/1.0" buildDirectory="${project}/build"> |  | ||||||
|   <deploy> |  | ||||||
|     <application name="FxPWMaster01"/> |  | ||||||
|     <info/> |  | ||||||
|   </deploy> |  | ||||||
|   <signjar/> |  | ||||||
| </anttasks:AntTask> |  | ||||||
							
								
								
									
										101
									
								
								pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,101 @@ | |||||||
|  | <project xmlns="http://maven.apache.org/POM/4.0.0" | ||||||
|  | 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||||||
|  | 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||||||
|  | 	<modelVersion>4.0.0</modelVersion> | ||||||
|  | 	<groupId>com</groupId> | ||||||
|  | 	<artifactId>jFxKasse</artifactId> | ||||||
|  | 	<version>0.3.2</version> | ||||||
|  | 	<name>jFxKasse</name> | ||||||
|  |  | ||||||
|  | 	<dependencies> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>junit</groupId> | ||||||
|  | 			<artifactId>junit</artifactId> | ||||||
|  | 			<version>4.12</version> | ||||||
|  | 			<scope>test</scope> | ||||||
|  | 		</dependency> | ||||||
|  |  | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.openjfx</groupId> | ||||||
|  | 			<artifactId>javafx-controls</artifactId> | ||||||
|  | 			<version>11</version> | ||||||
|  | 		</dependency> | ||||||
|  |  | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.openjfx</groupId> | ||||||
|  | 			<artifactId>javafx-fxml</artifactId> | ||||||
|  | 			<version>11</version> | ||||||
|  | 		</dependency> | ||||||
|  |  | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>com.jfoenix</groupId> | ||||||
|  | 			<artifactId>jfoenix</artifactId> | ||||||
|  | 			<version>9.0.8</version> | ||||||
|  | 		</dependency> | ||||||
|  |  | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.xerial</groupId> | ||||||
|  | 			<artifactId>sqlite-jdbc</artifactId> | ||||||
|  | 			<version>3.23.1</version> | ||||||
|  | 		</dependency> | ||||||
|  | 	</dependencies> | ||||||
|  |  | ||||||
|  | 	<build> | ||||||
|  | 		<plugins> | ||||||
|  |  | ||||||
|  | 			<plugin> | ||||||
|  | 				<groupId>org.apache.maven.plugins</groupId> | ||||||
|  | 				<artifactId>maven-compiler-plugin</artifactId> | ||||||
|  | 				<version>3.8.0</version> | ||||||
|  | 				<configuration> | ||||||
|  | 					<source>11</source> | ||||||
|  | 					<target>11</target> | ||||||
|  | 					<!--<release>11</release> --> | ||||||
|  | 					<showWarnings>true</showWarnings> | ||||||
|  | 					<showDeprecation>true</showDeprecation> | ||||||
|  | 				</configuration> | ||||||
|  | 			</plugin> | ||||||
|  |  | ||||||
|  | 			<plugin> | ||||||
|  | 				<groupId>org.codehaus.mojo</groupId> | ||||||
|  | 				<artifactId>exec-maven-plugin</artifactId> | ||||||
|  | 				<version>1.6.0</version> | ||||||
|  | 				<executions> | ||||||
|  | 					<execution> | ||||||
|  | 						<goals> | ||||||
|  | 							<goal>java</goal> | ||||||
|  | 						</goals> | ||||||
|  | 					</execution> | ||||||
|  | 				</executions> | ||||||
|  | 				<configuration> | ||||||
|  | 					<mainClass>com.jFxKasse.application.Main</mainClass> | ||||||
|  | 				</configuration> | ||||||
|  | 			</plugin> | ||||||
|  | 			 | ||||||
|  | 			<plugin> | ||||||
|  | 				<groupId>org.apache.maven.plugins</groupId> | ||||||
|  | 				<artifactId>maven-shade-plugin</artifactId> | ||||||
|  | 				<version>3.2.1</version> | ||||||
|  | 				<configuration> | ||||||
|  | 					<finalName>jFxKasse</finalName> | ||||||
|  | 					<shadedArtifactAttached>true</shadedArtifactAttached> | ||||||
|  | 					<transformers> | ||||||
|  | 						<transformer | ||||||
|  | 							implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||||||
|  | 							<mainClass>com.jFxKasse.application.JavaFX11Main</mainClass> | ||||||
|  | 						</transformer> | ||||||
|  | 					</transformers> | ||||||
|  | 				</configuration> | ||||||
|  | 				<executions> | ||||||
|  | 					<execution> | ||||||
|  | 						<phase>package</phase> | ||||||
|  | 						<goals> | ||||||
|  | 							<goal>shade</goal> | ||||||
|  | 						</goals> | ||||||
|  | 					</execution> | ||||||
|  | 				</executions> | ||||||
|  | 			</plugin> | ||||||
|  | 			 | ||||||
|  | 		</plugins> | ||||||
|  | 	</build> | ||||||
|  | </project> | ||||||
							
								
								
									
										
											BIN
										
									
								
								screenshots/jobs
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 123 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/newjob
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 128 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/positions
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 107 KiB | 
							
								
								
									
										
											BIN
										
									
								
								screenshots/settings
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 83 KiB | 
| @ -1,90 +0,0 @@ | |||||||
| package application; |  | ||||||
|  |  | ||||||
| import java.io.File; |  | ||||||
| import javafx.animation.Animation; |  | ||||||
| import javafx.animation.KeyFrame; |  | ||||||
| import javafx.animation.Timeline; |  | ||||||
| import javafx.application.Application; |  | ||||||
| import javafx.fxml.FXMLLoader; |  | ||||||
| import javafx.stage.Stage; |  | ||||||
| import javafx.util.Duration; |  | ||||||
| import javafx.scene.Scene; |  | ||||||
| import javafx.scene.layout.AnchorPane; |  | ||||||
|  |  | ||||||
|  |  | ||||||
| public class Main extends Application |  | ||||||
| { |  | ||||||
| 	private MainWindowController mwc; |  | ||||||
|  |  | ||||||
| 	private DBController dbc = new DBController(this); |  | ||||||
|  |  | ||||||
| 	private Stage primaryStage; |  | ||||||
|  |  | ||||||
| 	@Override |  | ||||||
| 	public void start(Stage primaryStage) |  | ||||||
| 	{ |  | ||||||
| 		this.primaryStage = primaryStage; |  | ||||||
| 		mainWindow(); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	private void mainWindow() |  | ||||||
| 	{ |  | ||||||
| 		try { |  | ||||||
| 			FXMLLoader loader = new FXMLLoader( |  | ||||||
| 					getClass().getResource("MainWindow.fxml")); |  | ||||||
| 			AnchorPane pane = loader.load(); |  | ||||||
| 			primaryStage.setTitle("jFxKasse"); // Title of window |  | ||||||
|  |  | ||||||
| 			mwc = loader.getController(); |  | ||||||
| 			mwc.setMain(this, dbc); |  | ||||||
|  |  | ||||||
| 			firstStart(); |  | ||||||
|  |  | ||||||
| 			Scene scene = new Scene(pane); |  | ||||||
| 			scene.getStylesheets() |  | ||||||
| 					.add(Main.class.getResource("application.css").toExternalForm()); |  | ||||||
| 			primaryStage.setScene(scene); |  | ||||||
| 			primaryStage.show(); // shows the stage |  | ||||||
|  |  | ||||||
| 			Timeline timeline = new Timeline( |  | ||||||
| 					new KeyFrame(Duration.seconds(1), ev -> { |  | ||||||
| 						mwc.updateTimeLabel(); // update time |  | ||||||
| 					})); |  | ||||||
| 			timeline.setCycleCount(Animation.INDEFINITE); |  | ||||||
| 			timeline.play(); |  | ||||||
| 		} catch (Exception e) { |  | ||||||
| 			e.printStackTrace(); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	public static void main(String[] args) |  | ||||||
| 	{ |  | ||||||
| 		launch(args); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	/** |  | ||||||
| 	 * Checks if the config.xml is preset. |  | ||||||
| 	 * @author hendrik |  | ||||||
| 	 */ |  | ||||||
| 	private void firstStart() throws Exception |  | ||||||
| 	{ |  | ||||||
| 		if (mwc.loadSettings()) { |  | ||||||
| 			// config.xml found, app starting normal |  | ||||||
| 			System.out.println("XML gefunden!"); |  | ||||||
| 			mwc.initUI(); // Starting the UI elements |  | ||||||
| 			mwc.setDBLabel(); // Set databese labels |  | ||||||
| 			dbc.dbname = mwc.getDatabaseName(); // handover database name |  | ||||||
| 			dbc.connectDatabase(); // estabishing DB conection |  | ||||||
| 			mwc.fillTablePositionen(); // fill TreeTable 'Positionen' |  | ||||||
| 			mwc.fillCategory(); |  | ||||||
| 			mwc.loadGridButtons(); |  | ||||||
| 			mwc.getSelectedCat(); //Load DB entries in Chois Box |  | ||||||
| 		} else { |  | ||||||
| 			// config.xml NOT found, first start of app |  | ||||||
| 			System.out.println("keine XML gefunden!"); |  | ||||||
| 			mwc.blockUI(true); // disable UI elements that need DB |  | ||||||
| 			File dir = new File(System.getProperty("user.home") + "/bin/jFxKasse"); |  | ||||||
| 			dir.mkdir(); // Create new Subfolder |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
| @ -1 +0,0 @@ | |||||||
| /* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */ |  | ||||||
| @ -1,68 +0,0 @@ | |||||||
| package application; |  | ||||||
|  |  | ||||||
| import javafx.beans.property.IntegerProperty; |  | ||||||
| import javafx.beans.property.SimpleIntegerProperty; |  | ||||||
| import javafx.beans.property.SimpleStringProperty; |  | ||||||
| import javafx.beans.property.StringProperty; |  | ||||||
|  |  | ||||||
| public class tableData |  | ||||||
| { // Datenobjekt mit der ID, Datum und Konto |  | ||||||
|  |  | ||||||
| 	private final IntegerProperty id = new SimpleIntegerProperty(); |  | ||||||
|  |  | ||||||
| 	private final StringProperty datum = new SimpleStringProperty(); |  | ||||||
|  |  | ||||||
| 	private final StringProperty konto = new SimpleStringProperty(); |  | ||||||
|  |  | ||||||
| 	public tableData(final int id, final String datum, final String konto) |  | ||||||
| 	{ |  | ||||||
| 		this.id.set(id); |  | ||||||
| 		this.datum.set(datum); |  | ||||||
| 		this.konto.set(konto); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	public IntegerProperty idProperty() |  | ||||||
| 	{ |  | ||||||
| 		return id; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	public StringProperty datumProperty() |  | ||||||
| 	{ |  | ||||||
| 		return datum; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	public StringProperty kontoProperty() |  | ||||||
| 	{ |  | ||||||
| 		return konto; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	public int getID() |  | ||||||
| 	{ |  | ||||||
| 		return idProperty().get(); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	public String getDatum() |  | ||||||
| 	{ |  | ||||||
| 		return datumProperty().get(); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	public String getKonto() |  | ||||||
| 	{ |  | ||||||
| 		return kontoProperty().get(); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	public final void setID(int id) |  | ||||||
| 	{ |  | ||||||
| 		idProperty().set(id); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	public final void setdatum(String datum) |  | ||||||
| 	{ |  | ||||||
| 		datumProperty().set(datum); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	public final void setkonto(String konto) |  | ||||||
| 	{ |  | ||||||
| 		kontoProperty().set(konto); |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
							
								
								
									
										12
									
								
								src/main/java/com/jFxKasse/application/JavaFX11Main.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,12 @@ | |||||||
|  | package com.jFxKasse.application; | ||||||
|  |  | ||||||
|  | import com.jFxKasse.application.Main; | ||||||
|  |  | ||||||
|  | public class JavaFX11Main | ||||||
|  | { | ||||||
|  |  | ||||||
|  | 	public static void main(String[] args) | ||||||
|  | 	{ | ||||||
|  | 		  Main.main(args); | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										129
									
								
								src/main/java/com/jFxKasse/application/Main.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,129 @@ | |||||||
|  | package com.jFxKasse.application; | ||||||
|  |  | ||||||
|  | import javafx.application.Application; | ||||||
|  | import javafx.event.EventHandler; | ||||||
|  |  | ||||||
|  | import java.io.File; | ||||||
|  | import javafx.animation.Animation; | ||||||
|  | import javafx.animation.KeyFrame; | ||||||
|  | import javafx.animation.Timeline; | ||||||
|  | import javafx.fxml.FXMLLoader; | ||||||
|  | import javafx.stage.Stage; | ||||||
|  | import javafx.util.Duration; | ||||||
|  | import com.jFxKasse.controller.MainWindowController; | ||||||
|  | import com.jFxKasse.controller.PrinterController; | ||||||
|  | import com.jFxKasse.controller.XMLController; | ||||||
|  | import com.jFxKasse.controller.DBController; | ||||||
|  | import com.jFxKasse.controller.KeyController; | ||||||
|  |  | ||||||
|  | import javafx.scene.Scene; | ||||||
|  | import javafx.scene.input.KeyEvent; | ||||||
|  | import javafx.scene.layout.AnchorPane; | ||||||
|  |  | ||||||
|  | public class Main extends Application | ||||||
|  | { | ||||||
|  | 	// path to config.xml and the database | ||||||
|  | 	public static String filepath; | ||||||
|  |  | ||||||
|  | 	private static String osName = System.getProperty("os.name"); | ||||||
|  |  | ||||||
|  | 	private static String userHome = System.getProperty("user.home"); | ||||||
|  |  | ||||||
|  | 	private MainWindowController mwc; | ||||||
|  |  | ||||||
|  | 	private XMLController xmlc = new XMLController(filepath); | ||||||
|  |  | ||||||
|  | 	private DBController dbc = new DBController(filepath); | ||||||
|  |  | ||||||
|  | 	private PrinterController pc = new PrinterController(); | ||||||
|  | 	 | ||||||
|  | 	private KeyController kc; | ||||||
|  |  | ||||||
|  | 	private Stage primaryStage; | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	public void start(Stage primaryStage) | ||||||
|  | 	{ | ||||||
|  | 		this.primaryStage = primaryStage; | ||||||
|  | 		System.out.println("\nstarting jFxKasse\n"); | ||||||
|  | 		mainWindow(); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	private void mainWindow() | ||||||
|  | 	{ | ||||||
|  | 		try { | ||||||
|  | 			FXMLLoader loader = new FXMLLoader( | ||||||
|  | 					getClass().getResource("/fxml/MainWindow.fxml")); | ||||||
|  |  | ||||||
|  | 			AnchorPane pane = loader.load(); | ||||||
|  | 			primaryStage.setTitle("jFxKasse"); // Title of window | ||||||
|  |  | ||||||
|  | 			mwc = loader.getController(); // set the mwc as the JavaFx | ||||||
|  | 													// MainWindowController | ||||||
|  | 			pc.searchPrinters(); // search for available printers | ||||||
|  | 			mwc.setMain(this, dbc, xmlc, pc); // set the created instances to the | ||||||
|  | 															// mwc | ||||||
|  |  | ||||||
|  | 			firstStart(); // test if this is the first run | ||||||
|  |  | ||||||
|  | 			Scene scene = new Scene(pane); | ||||||
|  | 			scene.getStylesheets().add( | ||||||
|  | 					Main.class.getResource("/css/application.css").toExternalForm()); | ||||||
|  | 			primaryStage.setScene(scene); | ||||||
|  | 			primaryStage.show(); // shows the stage | ||||||
|  |  | ||||||
|  | 			//attach the KeyController | ||||||
|  | 			kc = new KeyController(scene, mwc); | ||||||
|  | 			 | ||||||
|  | 			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) { | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public static void main(String[] args) | ||||||
|  | 	{ | ||||||
|  | 		if (osName.contains("Windows")) { | ||||||
|  | 			System.out.println("FCK Windows"); | ||||||
|  | 			filepath = userHome + "/Documents/jFxKasse/"; | ||||||
|  | 		} else { | ||||||
|  | 			filepath = userHome + "/jFxKasse/"; | ||||||
|  | 		} | ||||||
|  | 		launch(args); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Checks if the config.xml is preset. | ||||||
|  | 	 */ | ||||||
|  | 	private void firstStart() throws Exception | ||||||
|  | 	{ | ||||||
|  | 		if (xmlc.loadSettings()) { | ||||||
|  | 			// config.xml found, app starting normal | ||||||
|  | 			System.out.println("XML found!"); | ||||||
|  | 			mwc.initUI(); // Starting the UI elements | ||||||
|  | 			mwc.setDBLabel(); // Set database labels | ||||||
|  | 			dbc.setDbname(xmlc.getDatabaseName()); // handover database name | ||||||
|  | 			dbc.connectDatabase(); // estabishing DB conection | ||||||
|  | 			mwc.fillTablePositionen(); // fill TreeTable 'Positionen' | ||||||
|  | 			mwc.fillCategory(); | ||||||
|  | 			mwc.fillPrinterSettings(); | ||||||
|  | 			mwc.fillTableJobs(); | ||||||
|  | 			mwc.loadGridButtons(); | ||||||
|  | 			mwc.getSelectedCat(); // Load DB entries in Chois Box | ||||||
|  | 			mwc.createNewJob(); | ||||||
|  | 		} else { | ||||||
|  | 			// config.xml NOT found, first start of app | ||||||
|  | 			System.out.println("no XML found!"); | ||||||
|  | 			xmlc.initXML(); // set default values | ||||||
|  | 			mwc.blockUI(true); // disable UI elements that need DB | ||||||
|  | 			mwc.blockUnlock(); | ||||||
|  | 			File dir = new File(filepath); | ||||||
|  | 			dir.mkdir(); // Create new Subfolder | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										98
									
								
								src/main/java/com/jFxKasse/application/PrintJob.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,98 @@ | |||||||
|  | package com.jFxKasse.application; | ||||||
|  |  | ||||||
|  | import java.util.ArrayList; | ||||||
|  |  | ||||||
|  | import com.jFxKasse.controller.DBController; | ||||||
|  | import com.jFxKasse.controller.PrinterController; | ||||||
|  | import com.jFxKasse.controller.XMLController; | ||||||
|  |  | ||||||
|  | import com.jFxKasse.datatypes.PrintDataSimple; | ||||||
|  | import com.jFxKasse.datatypes.PrintDataSplitted; | ||||||
|  |  | ||||||
|  | import javafx.geometry.Insets; | ||||||
|  | import javafx.scene.control.ButtonType; | ||||||
|  | import javafx.scene.control.Dialog; | ||||||
|  | import javafx.scene.control.Label; | ||||||
|  | import javafx.scene.layout.GridPane; | ||||||
|  | import javafx.util.Pair; | ||||||
|  |  | ||||||
|  | public class PrintJob | ||||||
|  | { | ||||||
|  |  | ||||||
|  | 	private TimeDate timedate = new TimeDate(); | ||||||
|  |  | ||||||
|  | 	public void printJob(int jobID, XMLController xmlc, DBController dbc, | ||||||
|  | 			PrinterController pc) | ||||||
|  | 	{ | ||||||
|  |  | ||||||
|  | 		if ((xmlc.getPrintername().equals("Drucker auswählen") | ||||||
|  | 				|| xmlc.getPrintername() == null)) { | ||||||
|  | 			// no printer selected | ||||||
|  | 			System.out.println("Kein Drucker eingestellt!!!"); | ||||||
|  |  | ||||||
|  | 			// 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.getDialogPane().getButtonTypes().addAll(ButtonType.OK); | ||||||
|  |  | ||||||
|  | 			GridPane grid = new GridPane(); | ||||||
|  | 			grid.setHgap(10); | ||||||
|  | 			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); | ||||||
|  |  | ||||||
|  | 			dialog.getDialogPane().setContent(grid); | ||||||
|  | 			dialog.setResizable(true); | ||||||
|  | 			dialog.showAndWait(); | ||||||
|  |  | ||||||
|  | 		} else { | ||||||
|  | 			// printer selected | ||||||
|  | 			pc.selectPrinter(xmlc.getPrintername()); | ||||||
|  | 			/* Single bill or splitted */ | ||||||
|  | 			if (xmlc.getCategorySplitted()) { | ||||||
|  | 				// split the bills | ||||||
|  |  | ||||||
|  | 				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), | ||||||
|  | 						dbc.getJobValue_Job(jobID)); | ||||||
|  |  | ||||||
|  | 				System.out.println("Printing job ..."); | ||||||
|  |  | ||||||
|  | 				ArrayList<String> printString = pdsplitted.getPrintStrings(); | ||||||
|  |  | ||||||
|  | 				for (int i = 0; i < printString.size(); i++) { | ||||||
|  | 					pc.printString(printString.get(i)); | ||||||
|  | 				} | ||||||
|  |  | ||||||
|  | 			} else { | ||||||
|  | 				// one single bills | ||||||
|  | 				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), | ||||||
|  | 						dbc.getJobValue_Job(jobID)); | ||||||
|  | 				System.out.println("Printing job ..."); | ||||||
|  | 				pc.printString(pds.getPrintString()); | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										24
									
								
								src/main/java/com/jFxKasse/application/TimeDate.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,24 @@ | |||||||
|  | package com.jFxKasse.application; | ||||||
|  |  | ||||||
|  | import java.text.DateFormat; | ||||||
|  | import java.text.SimpleDateFormat; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  | 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() | ||||||
|  | 	{ | ||||||
|  | 		DateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy"); | ||||||
|  | 		Date date = new Date(); | ||||||
|  | 		String dateStr = dateFormat.format(date); | ||||||
|  | 		return dateStr; | ||||||
|  | 	} | ||||||
|  | } | ||||||
| @ -1,4 +1,4 @@ | |||||||
| package application; | package com.jFxKasse.controller; | ||||||
| 
 | 
 | ||||||
| import java.sql.Connection; | import java.sql.Connection; | ||||||
| import java.sql.DriverManager; | import java.sql.DriverManager; | ||||||
| @ -7,46 +7,49 @@ import java.sql.ResultSet; | |||||||
| import java.sql.SQLException; | import java.sql.SQLException; | ||||||
| import java.sql.Statement; | import java.sql.Statement; | ||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
|  | import com.jFxKasse.datatypes.tableDataJob; | ||||||
|  | import com.jFxKasse.datatypes.tableDataPositionen; | ||||||
| import java.io.File; | import java.io.File; | ||||||
| 
 | 
 | ||||||
| class DBController | public class DBController | ||||||
| { | { | ||||||
| 	private Connection connection; | 	private Connection connection; | ||||||
| 
 | 
 | ||||||
| 	private String DB_PATH_Linux = System.getProperty("user.home") | 	private String DB_PATH; | ||||||
| 			+ "/bin/jFxKasse/"; |  | ||||||
| 
 | 
 | ||||||
| 	public String dbname; | 	private String dbname; | ||||||
| 
 |  | ||||||
| 	@SuppressWarnings("unused") |  | ||||||
| 	private Main main; |  | ||||||
| 
 | 
 | ||||||
| 	public void main() | 	public void main() | ||||||
| 	{ | 	{ | ||||||
| 		try { | 		try { | ||||||
| 			connection = DriverManager | 			connection = DriverManager | ||||||
| 					.getConnection("jdbc:sqlite:" + DB_PATH_Linux + dbname + ".db"); | 					.getConnection("jdbc:sqlite:" + DB_PATH + dbname + ".db"); | ||||||
| 		} catch (SQLException e) { | 		} catch (SQLException e) { | ||||||
| 			// TODO Auto-generated catch block | 			// TODO Auto-generated catch block | ||||||
| 			e.printStackTrace(); | 			e.printStackTrace(); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	DBController(Main main) | 	public DBController(String path) | ||||||
| 	{ | 	{ | ||||||
| 		this.main = main; | 		this.DB_PATH = path; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public void setDbname(String dbname) | ||||||
|  | 	{ | ||||||
|  | 		this.dbname = dbname; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public void connectDatabase() | 	public void connectDatabase() | ||||||
| 	{ // connect to database | 	{ // connect to database | ||||||
| 		System.out.println("Verbinde ... DB name: " + dbname); | 		System.out.println("Connecting... DB name: " + dbname); | ||||||
| 		try { | 		try { | ||||||
| 			if (connection != null) | 			if (connection != null) | ||||||
| 				return; | 				return; | ||||||
| 			connection = DriverManager | 			connection = DriverManager | ||||||
| 					.getConnection("jdbc:sqlite:" + DB_PATH_Linux + dbname + ".db"); | 					.getConnection("jdbc:sqlite:" + DB_PATH + dbname + ".db"); | ||||||
| 			if (!connection.isClosed()) | 			if (!connection.isClosed()) | ||||||
| 				System.out.println("DB Datei-Verbindung erstellt"); | 				System.out.println("DB connection established"); | ||||||
| 		} catch (SQLException e) { | 		} catch (SQLException e) { | ||||||
| 			throw new RuntimeException(e); | 			throw new RuntimeException(e); | ||||||
| 		} | 		} | ||||||
| @ -66,8 +69,8 @@ class DBController | |||||||
| 		}); | 		}); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public boolean existiertDatenbank(String pPfad) | 	public boolean existDB(String pPfad) | ||||||
| 	{ // Prüft ob die Datenbank existiert | 	{ // does the DB exists? | ||||||
| 		File varTmpDir = new File(pPfad); | 		File varTmpDir = new File(pPfad); | ||||||
| 		if (!varTmpDir.exists()) { | 		if (!varTmpDir.exists()) { | ||||||
| 			return false; | 			return false; | ||||||
| @ -76,10 +79,39 @@ class DBController | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	// table Position section | 	public String getCategoryNameFromPositionen(int pID) | ||||||
|  | 	{ | ||||||
|  | 		int catInPos = 0; | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery("SELECT posid, cat FROM positionen " | ||||||
|  | 					+ "WHERE posid = " + pID + ";"); | ||||||
|  | 			catInPos = rs.getInt("cat"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 
 | ||||||
|  | 		} | ||||||
|  | 		if (catInPos == 6) { | ||||||
|  | 			return "Standard"; | ||||||
|  | 		} | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery("SELECT catid, catname FROM category " | ||||||
|  | 					+ "WHERE catid = " + catInPos + ";"); | ||||||
|  | 			return rs.getString("catname"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return "keine Kategorie"; | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	// table Position section // | ||||||
| 	public void createTablePositionen() | 	public void createTablePositionen() | ||||||
| 	{ // create table position | 	{ // create table position | ||||||
| 		System.out.println("Erstelle Tabelle Positionen"); | 		System.out.println("Creating table Positionen"); | ||||||
| 		try { | 		try { | ||||||
| 			Statement stmt = connection.createStatement(); | 			Statement stmt = connection.createStatement(); | ||||||
| 			stmt.executeUpdate("DROP TABLE IF EXISTS positionen;"); | 			stmt.executeUpdate("DROP TABLE IF EXISTS positionen;"); | ||||||
| @ -92,11 +124,185 @@ class DBController | |||||||
| 
 | 
 | ||||||
| 		// create 25 demo/default data entries | 		// create 25 demo/default data entries | ||||||
| 		for (int i = 0; i < 25; i++) { | 		for (int i = 0; i < 25; i++) { | ||||||
| 			fillPositionen_Positionen(i + 1, "Noch frei", (float) 0.00, | 			fillPositionen_Positionen(i + 1, "Noch frei", (float) 0.00, 6, | ||||||
| 					((int) (i / 5)) + 1, "#ad0000"); | 					"#ad0000"); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	public void fillPositionen_Positionen(int pID, String pName, float pValue, | ||||||
|  | 			int pCat, String pColor) | ||||||
|  | 	{ // create new data in table | ||||||
|  | 		System.out.println("Creating new positionen entry"); | ||||||
|  | 		try { | ||||||
|  | 			PreparedStatement ps = connection.prepareStatement( | ||||||
|  | 					"INSERT INTO positionen VALUES (?, ?, ?, ?, ?);"); | ||||||
|  | 			ps.setInt(1, pID); // primary | ||||||
|  | 			ps.setString(2, pName); | ||||||
|  | 			ps.setFloat(3, pValue); | ||||||
|  | 			ps.setInt(4, pCat); | ||||||
|  | 			ps.setString(5, pColor); | ||||||
|  | 
 | ||||||
|  | 			ps.addBatch(); | ||||||
|  | 			connection.setAutoCommit(false); | ||||||
|  | 			ps.executeBatch(); // SQL execution | ||||||
|  | 			connection.setAutoCommit(true); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public String getName_Positionen(int pID) | ||||||
|  | 	{ | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery( | ||||||
|  | 					"SELECT posid, name FROM positionen WHERE posid = " + pID + ";"); | ||||||
|  | 			return rs.getString("name"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return "Error 404"; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public String getValue_Positionen(int pID) | ||||||
|  | 	{ | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery( | ||||||
|  | 					"SELECT posid, value FROM positionen WHERE posid = " + pID | ||||||
|  | 							+ ";"); | ||||||
|  | 			return rs.getString("value"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return "Error 404"; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public int getCat_Positionen(int pID) | ||||||
|  | 	{ | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			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) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return 0; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public String getColor_Positionen(int pID) | ||||||
|  | 	{ | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery( | ||||||
|  | 					"SELECT posid, color FROM positionen WHERE posid = " + pID | ||||||
|  | 							+ ";"); | ||||||
|  | 			return rs.getString("color"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return "Error 404"; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	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) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	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) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	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) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	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) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public ArrayList<tableDataPositionen> ladeTabellePositionen() | ||||||
|  | 	{ | ||||||
|  | 		ArrayList<tableDataPositionen> daten = new ArrayList<>(); | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery("SELECT * FROM positionen;"); | ||||||
|  | 			while (rs.next()) { | ||||||
|  | 				try { | ||||||
|  | 					daten.add(new tableDataPositionen(rs.getInt("posid"), | ||||||
|  | 							rs.getString("name"), rs.getString("value"), | ||||||
|  | 							rs.getString("cat"), rs.getString("color"))); | ||||||
|  | 				} catch (Exception e) { | ||||||
|  | 					// TODO Auto-generated catch block | ||||||
|  | 					e.printStackTrace(); | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 		} | ||||||
|  | 		return daten; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public void ausgebenSysoPositionen() | ||||||
|  | 	{ | ||||||
|  | 		System.out.println("Print positionen"); | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery("SELECT * FROM positionen;"); | ||||||
|  | 			while (rs.next()) { | ||||||
|  | 				System.out.println("posid = " + rs.getString("posid")); | ||||||
|  | 				System.out.println("name = " + rs.getString("name")); | ||||||
|  | 				System.out.println("vale = " + rs.getString("value")); | ||||||
|  | 				System.out.println("color = " + rs.getString("color")); | ||||||
|  | 				System.out.println(" "); | ||||||
|  | 			} | ||||||
|  | 
 | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	// table Category section // | ||||||
| 	public void createTableCategory() | 	public void createTableCategory() | ||||||
| 	{ // create table position | 	{ // create table position | ||||||
| 		System.out.println("Erstelle Tabelle Kategorie"); | 		System.out.println("Erstelle Tabelle Kategorie"); | ||||||
| @ -109,32 +315,16 @@ class DBController | |||||||
| 			e.printStackTrace(); | 			e.printStackTrace(); | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		for (int i = 1; i < 6; i++) { | 		fillCategory_Category(1, "Essen"); | ||||||
| 			fillCategory_Category(i, "Cat: " + (i)); | 		fillCategory_Category(2, "alkoholische Getränke"); | ||||||
| 		} | 		fillCategory_Category(3, "alkoholfreie Getränke"); | ||||||
| 
 | 		fillCategory_Category(4, "Kuchen"); | ||||||
| 	} | 		fillCategory_Category(5, "Standard"); | ||||||
| 
 |  | ||||||
| 	public String getCategoryNameFromPositionen(int pID) |  | ||||||
| 	{ |  | ||||||
| 		//System.out.println("getCategoryName: " + pID); |  | ||||||
| 
 |  | ||||||
| 		try { |  | ||||||
| 			Statement stmt = connection.createStatement(); |  | ||||||
| 			ResultSet rs = stmt.executeQuery( |  | ||||||
| 					"SELECT posid, cat, catid, catname FROM positionen, category " |  | ||||||
| 							+ "WHERE posid = " + pID + " AND cat = catid;"); |  | ||||||
| 			return rs.getString("catname"); |  | ||||||
| 		} catch (SQLException e) { |  | ||||||
| 			System.err.println("Couldn't handle DB-Query"); |  | ||||||
| 			e.printStackTrace(); |  | ||||||
| 			return "Error 404"; |  | ||||||
| 		} |  | ||||||
| 
 | 
 | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public void setName_Category(int pID, String pName) | 	public void setName_Category(int pID, String pName) | ||||||
| 	{ // Setzte den Namen | 	{ | ||||||
| 		try { | 		try { | ||||||
| 			Statement stmt = connection.createStatement(); | 			Statement stmt = connection.createStatement(); | ||||||
| 			stmt.executeUpdate("UPDATE category SET catname = '" + pName | 			stmt.executeUpdate("UPDATE category SET catname = '" + pName | ||||||
| @ -165,45 +355,8 @@ class DBController | |||||||
| 
 | 
 | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public void fillPositionen_Positionen(int pID, String pName, float pValue, |  | ||||||
| 			int pCat, String pColor) |  | ||||||
| 	{ // create new data in table |  | ||||||
| 		System.out.println("Erstelle neuen positionen eintrag"); |  | ||||||
| 		try { |  | ||||||
| 			PreparedStatement ps = connection.prepareStatement( |  | ||||||
| 					"INSERT INTO positionen VALUES (?, ?, ?, ?, ?);"); |  | ||||||
| 			ps.setInt(1, pID); // primary |  | ||||||
| 			ps.setString(2, pName); |  | ||||||
| 			ps.setFloat(3, pValue); |  | ||||||
| 			ps.setInt(4, pCat); |  | ||||||
| 			ps.setString(5, pColor); |  | ||||||
| 
 |  | ||||||
| 			ps.addBatch(); |  | ||||||
| 			connection.setAutoCommit(false); |  | ||||||
| 			ps.executeBatch(); // SQL execution |  | ||||||
| 			connection.setAutoCommit(true); |  | ||||||
| 		} catch (SQLException e) { |  | ||||||
| 			System.err.println("Couldn't handle DB-Query"); |  | ||||||
| 			e.printStackTrace(); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	public String getName_Positionen(int pID) |  | ||||||
| 	{ // Gibt das Datum zurück |  | ||||||
| 		try { |  | ||||||
| 			Statement stmt = connection.createStatement(); |  | ||||||
| 			ResultSet rs = stmt.executeQuery( |  | ||||||
| 					"SELECT posid, name FROM positionen WHERE posid = " + pID + ";"); |  | ||||||
| 			return rs.getString("name"); |  | ||||||
| 		} catch (SQLException e) { |  | ||||||
| 			System.err.println("Couldn't handle DB-Query"); |  | ||||||
| 			e.printStackTrace(); |  | ||||||
| 			return "Error 404"; |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	public String getName_Category(int pID) | 	public String getName_Category(int pID) | ||||||
| 	{ // Gibt das Datum zurück | 	{ | ||||||
| 		try { | 		try { | ||||||
| 			Statement stmt = connection.createStatement(); | 			Statement stmt = connection.createStatement(); | ||||||
| 			ResultSet rs = stmt.executeQuery( | 			ResultSet rs = stmt.executeQuery( | ||||||
| @ -217,113 +370,200 @@ class DBController | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public String getValue_Positionen(int pID) | 	// table Jobs section // | ||||||
| 	{ // Gibt das Konto zurück | 	public void erstelleTabelleJobs() | ||||||
|  | 	{ // create table jobs | ||||||
|  | 		System.out.println("Creating table Jobs"); | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			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) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public int getLatestJobNumber_Job() | ||||||
|  | 	{ | ||||||
| 		try { | 		try { | ||||||
| 			Statement stmt = connection.createStatement(); | 			Statement stmt = connection.createStatement(); | ||||||
| 			ResultSet rs = stmt.executeQuery( | 			ResultSet rs = stmt.executeQuery( | ||||||
| 					"SELECT posid, value FROM positionen WHERE posid = " + pID | 					"SELECT jobid from jobs ORDER BY jobid DESC LIMIT 1;"); | ||||||
|  | 			return rs.getInt("jobid"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			// System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			// e.printStackTrace(); | ||||||
|  | 
 | ||||||
|  | 		} | ||||||
|  | 		return 0; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public String getTime_Job(int pID) | ||||||
|  | 	{ | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery( | ||||||
|  | 					"SELECT jobid, time FROM jobs WHERE jobid = " + pID + ";"); | ||||||
|  | 			return rs.getString("time"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return "404"; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public String getQuantity_Job(int pID) | ||||||
|  | 	{ | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery( | ||||||
|  | 					"SELECT jobid, positionen_quantity FROM jobs WHERE jobid = " | ||||||
|  | 							+ pID + ";"); | ||||||
|  | 			return rs.getString("positionen_quantity"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return "404"; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public String getName_Job(int pID) | ||||||
|  | 	{ | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery( | ||||||
|  | 					"SELECT jobid, positionen_name FROM jobs WHERE jobid = " + pID | ||||||
| 							+ ";"); | 							+ ";"); | ||||||
| 			return rs.getString("value"); | 			return rs.getString("positionen_name"); | ||||||
| 		} catch (SQLException e) { | 		} catch (SQLException e) { | ||||||
| 			System.err.println("Couldn't handle DB-Query"); | 			System.err.println("Couldn't handle DB-Query"); | ||||||
| 			e.printStackTrace(); | 			e.printStackTrace(); | ||||||
| 			return "Error 404"; | 			return "404"; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public int getCat_Positionen(int pID) | 	public String getValue_Job(int pID) | ||||||
| 	{ // Gibt den Nutzernamen zurück | 	{ | ||||||
| 		try { | 		try { | ||||||
| 			Statement stmt = connection.createStatement(); | 			Statement stmt = connection.createStatement(); | ||||||
| 			ResultSet rs = stmt.executeQuery( | 			ResultSet rs = stmt.executeQuery( | ||||||
| 					"SELECT catid, cat FROM positionen WHERE catid = " + pID + ";"); | 					"SELECT jobid, positionen_value FROM jobs WHERE jobid = " + pID | ||||||
| 			System.out.println("getCarTet: " + rs.getInt("cat")); |  | ||||||
| 			return rs.getInt("cat"); |  | ||||||
| 		} catch (SQLException e) { |  | ||||||
| 			System.err.println("Couldn't handle DB-Query"); |  | ||||||
| 			e.printStackTrace(); |  | ||||||
| 			return 0; |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	public String getColor_Positionen(int pID) |  | ||||||
| 	{ // Gibt den Nutzernamen zurück |  | ||||||
| 		try { |  | ||||||
| 			Statement stmt = connection.createStatement(); |  | ||||||
| 			ResultSet rs = stmt.executeQuery( |  | ||||||
| 					"SELECT posid, color FROM positionen WHERE posid = " + pID |  | ||||||
| 							+ ";"); | 							+ ";"); | ||||||
| 			return rs.getString("color"); | 			return rs.getString("positionen_value"); | ||||||
| 		} catch (SQLException e) { | 		} catch (SQLException e) { | ||||||
| 			System.err.println("Couldn't handle DB-Query"); | 			System.err.println("Couldn't handle DB-Query"); | ||||||
| 			e.printStackTrace(); | 			e.printStackTrace(); | ||||||
| 			return "Error 404"; | 			return "404"; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public void setName_Positionen(int pID, String pName) | 	public String getCategory_Job(int pID) | ||||||
| 	{ // Setzt das Datum | 	{ | ||||||
| 		try { | 		try { | ||||||
| 			Statement stmt = connection.createStatement(); | 			Statement stmt = connection.createStatement(); | ||||||
| 			stmt.executeUpdate("UPDATE positionen SET name = '" + pName | 			ResultSet rs = stmt.executeQuery( | ||||||
| 					+ "'WHERE posid =" + pID + ";"); | 					"SELECT jobid, positionen_cat FROM jobs WHERE jobid = " + pID | ||||||
|  | 							+ ";"); | ||||||
|  | 			return rs.getString("positionen_cat"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return "404"; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public String getState_Job(int pID) | ||||||
|  | 	{ | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery( | ||||||
|  | 					"SELECT jobid, state FROM jobs WHERE jobid = " + pID + ";"); | ||||||
|  | 			return rs.getString("state"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return "404"; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public String getJobValue_Job(int pID) | ||||||
|  | 	{ | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery( | ||||||
|  | 					"SELECT jobid, jobvalue FROM jobs WHERE jobid = " + pID + ";"); | ||||||
|  | 			return rs.getString("jobvalue"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return "404"; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	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" + '"' + ";"); | ||||||
|  | 			return rs.getString("ALLVALUE"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return "0"; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	public String getJobCount() | ||||||
|  | 	{ | ||||||
|  | 		try { | ||||||
|  | 			Statement stmt = connection.createStatement(); | ||||||
|  | 			ResultSet rs = stmt.executeQuery( | ||||||
|  | 					"SELECT count(*) AS JOBCOUNT FROM jobs WHERE state = " + '"' | ||||||
|  | 							+ "verbucht" + '"' + ";"); | ||||||
|  | 			return rs.getString("JOBCOUNT"); | ||||||
|  | 		} catch (SQLException e) { | ||||||
|  | 			System.err.println("Couldn't handle DB-Query"); | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return "0"; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	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) { | 		} catch (SQLException e) { | ||||||
| 			System.err.println("Couldn't handle DB-Query"); | 			System.err.println("Couldn't handle DB-Query"); | ||||||
| 			e.printStackTrace(); | 			e.printStackTrace(); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public void setValue_Positionen(int pID, String pValue) | 	public ArrayList<tableDataJob> loadTableJobs_Job() | ||||||
| 	{ // Setzt das Konto | 	{ | ||||||
| 		try { |  | ||||||
| 			Statement stmt = connection.createStatement(); |  | ||||||
| 			stmt.executeUpdate("UPDATE positionen SET value = '" + pValue |  | ||||||
| 					+ "'WHERE posid =" + pID + ";"); |  | ||||||
| 		} catch (SQLException e) { |  | ||||||
| 			System.err.println("Couldn't handle DB-Query"); |  | ||||||
| 			e.printStackTrace(); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	public void setCat_Positionen(int pID, int pCat) | 		ArrayList<tableDataJob> tmp = new ArrayList<tableDataJob>(); | ||||||
| 	{ // Setzt den Nutzername |  | ||||||
| 		try { | 		try { | ||||||
| 			Statement stmt = connection.createStatement(); | 			Statement stmt = connection.createStatement(); | ||||||
| 			stmt.executeUpdate("UPDATE positionen SET cat = '" + pCat | 			ResultSet rs = stmt.executeQuery( | ||||||
| 					+ "'WHERE catid =" + pID + ";"); | 					"SELECT jobid, time, positionen_quantity, positionen_name, positionen_value, positionen_cat, state, jobvalue FROM jobs;"); | ||||||
| 		} catch (SQLException e) { |  | ||||||
| 			System.err.println("Couldn't handle DB-Query"); |  | ||||||
| 			e.printStackTrace(); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	public void setColor_Positionen(int pID, String pColor) |  | ||||||
| 	{ // Setzt den Nutzername |  | ||||||
| 		try { |  | ||||||
| 			Statement stmt = connection.createStatement(); |  | ||||||
| 			stmt.executeUpdate("UPDATE positionen SET color = '" + pColor |  | ||||||
| 					+ "'WHERE posid =" + pID + ";"); |  | ||||||
| 		} catch (SQLException e) { |  | ||||||
| 			System.err.println("Couldn't handle DB-Query"); |  | ||||||
| 			e.printStackTrace(); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	public ArrayList<tableDataPositionen> ladeTabellePositionen() |  | ||||||
| 	{ // Gibt ein Objekt daten mit allen Einträgen der DB zurück |  | ||||||
| 		ArrayList<tableDataPositionen> daten = new ArrayList<>(); |  | ||||||
| 		try { |  | ||||||
| 			Statement stmt = connection.createStatement(); |  | ||||||
| 			ResultSet rs = stmt.executeQuery("SELECT * FROM positionen;"); |  | ||||||
| 			while (rs.next()) { | 			while (rs.next()) { | ||||||
| 				try { | 				try { | ||||||
| 					// Entschlüsselte Daten werden als Datenobjekt gespeichert | 
 | ||||||
| 					daten.add(new tableDataPositionen(rs.getInt("posid"), | 					String tablePosition = rs.getString("positionen_name"); | ||||||
| 							rs.getString("name"), rs.getString("value"), | 
 | ||||||
| 							rs.getString("cat"), rs.getString("color"))); | 					tableDataJob data = new tableDataJob(rs.getInt("jobid"), | ||||||
| 				} catch (Exception e) { | 							rs.getString("time"), tablePosition, rs.getString("state"), | ||||||
| 					// TODO Auto-generated catch block | 							rs.getString("jobvalue")); | ||||||
|  | 
 | ||||||
|  | 					tmp.add(data); | ||||||
|  | 				} catch (SQLException e) { | ||||||
|  | 					System.err.println("Couldn't handle DB-Query"); | ||||||
| 					e.printStackTrace(); | 					e.printStackTrace(); | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| @ -331,42 +571,32 @@ class DBController | |||||||
| 			System.err.println("Couldn't handle DB-Query"); | 			System.err.println("Couldn't handle DB-Query"); | ||||||
| 			e.printStackTrace(); | 			e.printStackTrace(); | ||||||
| 		} | 		} | ||||||
| 		return daten; | 		return tmp; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	public void ausgebenSysoPositionen() | 	public void fillJobs_Jobs(int pID, String pTime, String pPositionen_quantity, | ||||||
| 	{ // Debugging Ausgabe der kompletten Tabelle | 			String pPositionen_name, String pPositionen_value, | ||||||
| 		System.out.println("Print positionen"); | 			String pPositionen_cat, String pState, String pJobvalue) | ||||||
|  | 	{ | ||||||
|  | 		System.out.println("Create new Job Entry"); | ||||||
| 		try { | 		try { | ||||||
| 			Statement stmt = connection.createStatement(); | 			PreparedStatement ps = connection.prepareStatement( | ||||||
| 			ResultSet rs = stmt.executeQuery("SELECT * FROM positionen;"); | 					"INSERT INTO jobs VALUES (?, ?, ?, ?, ?, ?, ?, ?);"); | ||||||
| 			while (rs.next()) { | 			ps.setInt(1, pID); // primary | ||||||
| 				System.out.println("posid = " + rs.getString("posid")); | 			ps.setString(2, pTime); | ||||||
| 				System.out.println("name = " + rs.getString("name")); | 			ps.setString(3, pPositionen_quantity); | ||||||
| 				System.out.println("vale = " + rs.getString("value")); | 			ps.setString(4, pPositionen_name); | ||||||
| 				System.out.println("color = " + rs.getString("color")); | 			ps.setString(5, pPositionen_value); | ||||||
| 				System.out.println(" "); | 			ps.setString(6, pPositionen_cat); | ||||||
| 			} | 			ps.setString(7, pState); | ||||||
| 
 | 			ps.setString(8, pJobvalue); | ||||||
|  | 			ps.addBatch(); | ||||||
|  | 			connection.setAutoCommit(false); | ||||||
|  | 			ps.executeBatch(); // SQL execution | ||||||
|  | 			connection.setAutoCommit(true); | ||||||
| 		} catch (SQLException e) { | 		} catch (SQLException e) { | ||||||
| 			System.err.println("Couldn't handle DB-Query"); | 			System.err.println("Couldn't handle DB-Query"); | ||||||
| 			e.printStackTrace(); | 			e.printStackTrace(); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 |  | ||||||
| 	// table Jobs section |  | ||||||
| 	public void erstelleTabelleJobs() |  | ||||||
| 	{ // Erstelle Tabelle mit Reihen |  | ||||||
| 		System.out.println("Erstelle Tabelle Jobs"); |  | ||||||
| 		try { |  | ||||||
| 			Statement stmt = connection.createStatement(); |  | ||||||
| 			stmt.executeUpdate("DROP TABLE IF EXISTS jobs;"); |  | ||||||
| 			stmt.executeUpdate( |  | ||||||
| 					"CREATE TABLE jobs (id, time, positionen, state, value);"); |  | ||||||
| 		} catch (SQLException e) { |  | ||||||
| 			System.err.println("Couldn't handle DB-Query"); |  | ||||||
| 			e.printStackTrace(); |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| } | } | ||||||
							
								
								
									
										227
									
								
								src/main/java/com/jFxKasse/controller/KeyController.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,227 @@ | |||||||
|  | package com.jFxKasse.controller; | ||||||
|  |  | ||||||
|  | import javafx.event.EventHandler; | ||||||
|  | import javafx.scene.Scene; | ||||||
|  | import javafx.scene.input.KeyCode; | ||||||
|  | import javafx.scene.input.KeyEvent; | ||||||
|  |  | ||||||
|  | public class KeyController | ||||||
|  | { | ||||||
|  | 	private MainWindowController mwc; | ||||||
|  |  | ||||||
|  | 	public KeyController(Scene scene, MainWindowController mwc) | ||||||
|  | 	{ | ||||||
|  | 		this.mwc = mwc; | ||||||
|  |  | ||||||
|  | 		scene.setOnKeyPressed(new EventHandler<KeyEvent>() { | ||||||
|  | 			@Override | ||||||
|  | 			public void handle(KeyEvent keyEvent) | ||||||
|  | 			{ | ||||||
|  | 				switch (mwc.getActiveTab()) { | ||||||
|  | 				case 0: | ||||||
|  | 					handleTabNewJob(keyEvent); | ||||||
|  | 					break; | ||||||
|  |  | ||||||
|  | 				case 1: | ||||||
|  | 					handleTabJobs(keyEvent); | ||||||
|  | 					break; | ||||||
|  |  | ||||||
|  | 				case 2: | ||||||
|  | 					handleTabPosEdit(keyEvent); | ||||||
|  | 					break; | ||||||
|  |  | ||||||
|  | 				case 3: | ||||||
|  | 					handleTabSettings(keyEvent); | ||||||
|  | 					break; | ||||||
|  | 				default: | ||||||
|  |  | ||||||
|  | 				} | ||||||
|  |  | ||||||
|  | 			} | ||||||
|  | 		}); | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	private void handleTabNewJob(KeyEvent key) | ||||||
|  | 	{ | ||||||
|  | 		if ((key.getCode() == KeyCode.ENTER) | ||||||
|  | 				&& (!mwc.btnPrintBill.isDisabled())) { | ||||||
|  | 			mwc.btnPrintBillAction(null); | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		if ((key.getCode() == KeyCode.ESCAPE) && (!mwc.btnLock.isDisabled())) { | ||||||
|  | 			mwc.btnLockAction(null); | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		if ((key.getCode() == KeyCode.DELETE) | ||||||
|  | 				&& (!mwc.btnDeleteSelectedPosition.isDisabled())) { | ||||||
|  | 			mwc.btnDeleteSelectedPositionAction(null); | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		handelGridButtons(key); | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	private void handleTabJobs(KeyEvent key) | ||||||
|  | 	{ | ||||||
|  | 		if ((key.getCode() == KeyCode.ENTER) | ||||||
|  | 				&& (!mwc.btnReprintJob.isDisabled())) { | ||||||
|  | 			mwc.btnReprintJobAction(null); | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		if ((key.getCode() == KeyCode.DELETE) | ||||||
|  | 				&& (!mwc.btnCancelJob.isDisabled())) { | ||||||
|  | 			mwc.btnCancelJobAction(null); | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		if ((key.getCode() == KeyCode.S) && (!mwc.btnCalcStats.isDisabled())) { | ||||||
|  | 			mwc.btnCalcStatsAction(null); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	private void handleTabPosEdit(KeyEvent key) | ||||||
|  | 	{ | ||||||
|  | 		if ((key.getCode() == KeyCode.ENTER) | ||||||
|  | 				&& (!mwc.btnSaveEntry.isDisabled())) { | ||||||
|  | 			mwc.btnSaveEntryAction(null); | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		if ((key.getCode() == KeyCode.DELETE) | ||||||
|  | 				&& (!mwc.btnClearEntry.isDisabled())) { | ||||||
|  | 			mwc.btnClearEntryAction(null); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	private void handleTabSettings(KeyEvent key) | ||||||
|  | 	{ | ||||||
|  | 		if ((key.getCode() == KeyCode.ENTER) | ||||||
|  | 				&& (!mwc.btnSavePrinter.isDisabled())) { | ||||||
|  | 			mwc.btnSavePrinterAction(null); | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		if ((key.getCode() == KeyCode.ENTER) && (!mwc.btnSaveCat.isDisabled())) { | ||||||
|  | 			mwc.btnSaveCatAction(null); | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		if ((key.getCode() == KeyCode.ENTER) | ||||||
|  | 				&& (!mwc.btnCreateNewDatabase.isDisabled())) { | ||||||
|  | 			try { | ||||||
|  | 				mwc.btnCreateNewDatabaseAction(null); | ||||||
|  | 			} catch (Exception e) { | ||||||
|  | 				e.printStackTrace(); | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	void handelGridButtons(KeyEvent key) | ||||||
|  | 	{ | ||||||
|  |  | ||||||
|  | 		switch (key.getCode()) { | ||||||
|  | 		case Q: | ||||||
|  | 			mwc.gridButton01Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case W: | ||||||
|  | 			mwc.gridButton02Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case E: | ||||||
|  | 			mwc.gridButton03Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case R: | ||||||
|  | 			mwc.gridButton04Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case T: | ||||||
|  | 			mwc.gridButton05Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case Z: | ||||||
|  | 			mwc.gridButton06Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case U: | ||||||
|  | 			mwc.gridButton07Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case I: | ||||||
|  | 			mwc.gridButton08Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case O: | ||||||
|  | 			mwc.gridButton09Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case P: | ||||||
|  | 			mwc.gridButton10Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case A: | ||||||
|  | 			mwc.gridButton11Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case S: | ||||||
|  | 			mwc.gridButton12Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case D: | ||||||
|  | 			mwc.gridButton13Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case F: | ||||||
|  | 			mwc.gridButton14Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case G: | ||||||
|  | 			mwc.gridButton15Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case H: | ||||||
|  | 			mwc.gridButton16Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case J: | ||||||
|  | 			mwc.gridButton17Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case K: | ||||||
|  | 			mwc.gridButton18Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case L: | ||||||
|  | 			mwc.gridButton19Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case Y: | ||||||
|  | 			mwc.gridButton20Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case X: | ||||||
|  | 			mwc.gridButton21Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case C: | ||||||
|  | 			mwc.gridButton22Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case V: | ||||||
|  | 			mwc.gridButton23Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case B: | ||||||
|  | 			mwc.gridButton24Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		case N: | ||||||
|  | 			mwc.gridButton25Action(null); | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		default: | ||||||
|  | 			break; | ||||||
|  |  | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										1504
									
								
								src/main/java/com/jFxKasse/controller/MainWindowController.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										140
									
								
								src/main/java/com/jFxKasse/controller/PrinterController.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,140 @@ | |||||||
|  | /** | ||||||
|  |  *  some parts are from http://www.mets-blog.com/java-pos-thermal-printer-example/ | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | package com.jFxKasse.controller; | ||||||
|  |  | ||||||
|  | import java.awt.Graphics; | ||||||
|  | import java.awt.Graphics2D; | ||||||
|  | import java.awt.print.PageFormat; | ||||||
|  | import java.awt.print.Printable; | ||||||
|  | import java.awt.print.PrinterException; | ||||||
|  | import java.awt.print.PrinterJob; | ||||||
|  | import java.nio.charset.StandardCharsets; | ||||||
|  |  | ||||||
|  | import javax.print.Doc; | ||||||
|  | import javax.print.DocFlavor; | ||||||
|  | import javax.print.DocPrintJob; | ||||||
|  | import javax.print.PrintService; | ||||||
|  | import javax.print.PrintServiceLookup; | ||||||
|  | import javax.print.SimpleDoc; | ||||||
|  | import javax.print.attribute.HashPrintRequestAttributeSet; | ||||||
|  | import javax.print.attribute.PrintRequestAttributeSet; | ||||||
|  |  | ||||||
|  | public class PrinterController implements Printable | ||||||
|  | { | ||||||
|  | 	// All available Printers on this system | ||||||
|  | 	private PrintService[] printService; | ||||||
|  |  | ||||||
|  | 	// selected printer | ||||||
|  | 	private PrintService selectedPrinter; | ||||||
|  |  | ||||||
|  | 	private DocFlavor flavor; | ||||||
|  |  | ||||||
|  | 	public PrinterController() | ||||||
|  | 	{ | ||||||
|  | 		flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * @return A String array with all available printers | ||||||
|  | 	 */ | ||||||
|  | 	public String[] getAvailablePrinters() | ||||||
|  | 	{ | ||||||
|  | 		int printerSize = PrinterJob.lookupPrintServices().length; | ||||||
|  | 		String printers[] = new String[printerSize]; | ||||||
|  |  | ||||||
|  | 		for (int i = 0; i < printers.length; i++) { | ||||||
|  | 			printers[i] = this.printService[i].getName(); | ||||||
|  | 		} | ||||||
|  | 		return printers; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * searchs connected printers on the system | ||||||
|  | 	 */ | ||||||
|  | 	public void searchPrinters() | ||||||
|  | 	{ | ||||||
|  | 		PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet(); | ||||||
|  | 		this.printService = PrintServiceLookup.lookupPrintServices(flavor, pras); | ||||||
|  | 		String printers[] = getAvailablePrinters(); | ||||||
|  | 		System.out.println("Printers found:"); | ||||||
|  | 		System.out.println("++++++++++++++++++++"); | ||||||
|  | 		for (int i = 0; i < printers.length; i++) { | ||||||
|  | 			System.out.println(printers[i]); | ||||||
|  | 		} | ||||||
|  | 		System.out.println("++++++++++++++++++++"); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Selects the printer via its name | ||||||
|  | 	 * @param printerName | ||||||
|  | 	 */ | ||||||
|  | 	public void selectPrinter(String printerName) | ||||||
|  | 	{ | ||||||
|  | 		String printers[] = getAvailablePrinters(); | ||||||
|  |  | ||||||
|  | 		for (int i = 0; i < printers.length; i++) { | ||||||
|  | 			if (printerName.equals(printers[i])) { | ||||||
|  | 				selectedPrinter = printService[i]; | ||||||
|  | 				System.out.println("Printer: " + printers[i] + " selected"); | ||||||
|  | 				return; | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 *  | ||||||
|  | 	 * @param input data as String | ||||||
|  | 	 */ | ||||||
|  | 	public void printString(String text) | ||||||
|  | 	{ | ||||||
|  | 		PrintService service = selectedPrinter; | ||||||
|  | 		DocPrintJob job = service.createPrintJob(); | ||||||
|  |  | ||||||
|  | 		try { | ||||||
|  | 			byte[] bytes; | ||||||
|  | 			bytes = text.getBytes(StandardCharsets.UTF_8); | ||||||
|  | 			Doc doc = new SimpleDoc(bytes, flavor, null); | ||||||
|  | 			job.print(doc, null); | ||||||
|  | 		} catch (Exception e) { | ||||||
|  | 			// TODO Auto-generated catch block | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public int print(Graphics g, PageFormat pf, int page) throws PrinterException | ||||||
|  | 	{ | ||||||
|  | 		if (page > 0) { /* We have only one page, and 'page' is zero-based */ | ||||||
|  | 			return NO_SUCH_PAGE; | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		/* | ||||||
|  | 		 * 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()); | ||||||
|  | 		/* Now we perform our rendering */ | ||||||
|  | 		return PAGE_EXISTS; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void printBytes(byte[] bytes) | ||||||
|  | 	{ | ||||||
|  | 		PrintService service = selectedPrinter; | ||||||
|  | 		DocPrintJob job = service.createPrintJob(); | ||||||
|  |  | ||||||
|  | 		try { | ||||||
|  | 			Doc doc = new SimpleDoc(bytes, flavor, null); | ||||||
|  | 			job.print(doc, null); | ||||||
|  | 		} catch (Exception e) { | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void cutPaper() | ||||||
|  | 	{ | ||||||
|  | 		byte[] cutP = new byte[] { 0x1d, 'V', 1 }; | ||||||
|  | 		printBytes(cutP); | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										219
									
								
								src/main/java/com/jFxKasse/controller/XMLController.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,219 @@ | |||||||
|  | package com.jFxKasse.controller; | ||||||
|  |  | ||||||
|  | import java.io.FileInputStream; | ||||||
|  | import java.io.FileOutputStream; | ||||||
|  | import java.io.IOException; | ||||||
|  | import java.io.InputStream; | ||||||
|  | import java.io.OutputStream; | ||||||
|  | import java.util.Properties; | ||||||
|  |  | ||||||
|  | public class XMLController | ||||||
|  | { | ||||||
|  | 	private String databaseName = null; | ||||||
|  |  | ||||||
|  | 	private String printername = null; | ||||||
|  |  | ||||||
|  | 	private int linebreak; | ||||||
|  |  | ||||||
|  | 	private int offsetHeader; | ||||||
|  |  | ||||||
|  | 	private int offsetFooter; | ||||||
|  |  | ||||||
|  | 	private String header = null; | ||||||
|  |  | ||||||
|  | 	private String footer = null; | ||||||
|  |  | ||||||
|  | 	private boolean categorySplitted; | ||||||
|  |  | ||||||
|  | 	private String filePath = null; | ||||||
|  |  | ||||||
|  | 	private Properties props = null; | ||||||
|  |  | ||||||
|  | 	public XMLController(String filePath) | ||||||
|  | 	{ | ||||||
|  | 		this.filePath = filePath + "config.xml"; | ||||||
|  | 		props = new Properties(); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void saveSettings() throws Exception | ||||||
|  | 	{ // Save settings to config.xml | ||||||
|  |  | ||||||
|  | 		System.out.println("Saving XML"); | ||||||
|  |  | ||||||
|  | 		OutputStream outputStream; | ||||||
|  |  | ||||||
|  | 		String linebreak = Integer.toString(this.linebreak); | ||||||
|  | 		String offsetHeader = Integer.toString(this.offsetHeader); | ||||||
|  | 		String offsetFooter = Integer.toString(this.offsetFooter); | ||||||
|  |  | ||||||
|  | 		String categorySplitted = null; | ||||||
|  |  | ||||||
|  | 		if (this.categorySplitted) { | ||||||
|  | 			categorySplitted = "true"; | ||||||
|  | 		} else { | ||||||
|  | 			categorySplitted = "false"; | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		try { | ||||||
|  | 			props.setProperty("databasename", this.databaseName); | ||||||
|  | 			props.setProperty("printername", this.printername); | ||||||
|  | 			props.setProperty("linebreak", linebreak); | ||||||
|  | 			props.setProperty("offsetHeader", offsetHeader); | ||||||
|  | 			props.setProperty("offsetFooter", offsetFooter); | ||||||
|  | 			props.setProperty("header", this.header); | ||||||
|  | 			props.setProperty("footer", this.footer); | ||||||
|  | 			props.setProperty("categorySplitted", categorySplitted); | ||||||
|  |  | ||||||
|  | 			outputStream = new FileOutputStream(filePath); | ||||||
|  | 			props.storeToXML(outputStream, "jFxKasse settings"); | ||||||
|  | 			outputStream.close(); | ||||||
|  | 		} catch (IOException e) { | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public boolean loadSettings() throws Exception | ||||||
|  | 	{ // reads the settings from config.xml | ||||||
|  | 		InputStream inputStream; | ||||||
|  | 		try { | ||||||
|  | 			inputStream = new FileInputStream(filePath); | ||||||
|  | 			props.loadFromXML(inputStream); | ||||||
|  | 			this.databaseName = (props.getProperty("databasename")); | ||||||
|  | 			this.printername = (props.getProperty("printername")); | ||||||
|  |  | ||||||
|  | 			try { | ||||||
|  | 				this.linebreak = Integer.valueOf(props.getProperty("linebreak")); | ||||||
|  | 			} catch (Exception e) { | ||||||
|  | 				this.linebreak = 28; | ||||||
|  | 			} | ||||||
|  |  | ||||||
|  | 			try { | ||||||
|  | 				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 = 2; | ||||||
|  | 			} | ||||||
|  |  | ||||||
|  | 			this.header = (props.getProperty("header")); | ||||||
|  | 			this.footer = (props.getProperty("footer")); | ||||||
|  |  | ||||||
|  | 			try { | ||||||
|  | 				if (props.getProperty("categorySplitted").equals("true")) { | ||||||
|  | 					this.categorySplitted = true; | ||||||
|  | 				} else { | ||||||
|  | 					this.categorySplitted = false; | ||||||
|  | 				} | ||||||
|  | 			} catch (Exception e) { | ||||||
|  | 				this.categorySplitted = false; | ||||||
|  | 			} | ||||||
|  |  | ||||||
|  | 			inputStream.close(); | ||||||
|  | 			return true; | ||||||
|  | 		} catch (IOException e) { | ||||||
|  | 			e.printStackTrace(); | ||||||
|  | 			return false; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void initXML() | ||||||
|  | 	{ | ||||||
|  | 		this.printername = "Drucker auswählen"; | ||||||
|  |  | ||||||
|  | 		this.offsetHeader = 1; | ||||||
|  | 		this.offsetFooter = 2; | ||||||
|  |  | ||||||
|  | 		this.linebreak = 28; | ||||||
|  |  | ||||||
|  | 		this.categorySplitted = false; | ||||||
|  |  | ||||||
|  | 		this.header = "XYZ GmbH"; | ||||||
|  | 		this.footer = "Vielen Dank für den Einkauf"; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getDatabaseName() | ||||||
|  | 	{ | ||||||
|  | 		return databaseName; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void setDatabaseName(String databaseName) | ||||||
|  | 	{ | ||||||
|  | 		this.databaseName = databaseName; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getPrintername() | ||||||
|  | 	{ | ||||||
|  | 		return printername; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void setPrintername(String printername) | ||||||
|  | 	{ | ||||||
|  | 		this.printername = printername; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public int getLinebreak() | ||||||
|  | 	{ | ||||||
|  | 		return linebreak; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void setLinebreak(int linebreak) | ||||||
|  | 	{ | ||||||
|  | 		this.linebreak = linebreak; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public int getOffsetHeader() | ||||||
|  | 	{ | ||||||
|  | 		return offsetHeader; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void setOffsetHeader(int offsetHeader) | ||||||
|  | 	{ | ||||||
|  | 		this.offsetHeader = offsetHeader; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public int getOffsetFooter() | ||||||
|  | 	{ | ||||||
|  | 		return offsetFooter; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void setOffsetFooter(int offsetFooter) | ||||||
|  | 	{ | ||||||
|  | 		this.offsetFooter = offsetFooter; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getHeader() | ||||||
|  | 	{ | ||||||
|  | 		return header; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void setHeader(String header) | ||||||
|  | 	{ | ||||||
|  | 		this.header = header; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getFooter() | ||||||
|  | 	{ | ||||||
|  | 		return footer; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void setFooter(String footer) | ||||||
|  | 	{ | ||||||
|  | 		this.footer = footer; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public boolean getCategorySplitted() | ||||||
|  | 	{ | ||||||
|  | 		return categorySplitted; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void setCategorySplitted(boolean categorySplitted) | ||||||
|  | 	{ | ||||||
|  | 		this.categorySplitted = categorySplitted; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										32
									
								
								src/main/java/com/jFxKasse/datatypes/Category.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,32 @@ | |||||||
|  | package com.jFxKasse.datatypes; | ||||||
|  |  | ||||||
|  | public class Category | ||||||
|  | { | ||||||
|  | 	private String categoryName; | ||||||
|  |  | ||||||
|  | 	private String positionsString = "\n"; | ||||||
|  |  | ||||||
|  | 	public Category(String categoryName) | ||||||
|  | 	{ | ||||||
|  | 		this.categoryName = categoryName; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getCategoryName() | ||||||
|  | 	{ | ||||||
|  | 		return categoryName; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	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"; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getPositionsString() | ||||||
|  | 	{ | ||||||
|  | 		return positionsString; | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										192
									
								
								src/main/java/com/jFxKasse/datatypes/Job.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,192 @@ | |||||||
|  | package com.jFxKasse.datatypes; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.ArrayList; | ||||||
|  |  | ||||||
|  | public class Job | ||||||
|  | { | ||||||
|  | 	private int jobnumber; | ||||||
|  |  | ||||||
|  | 	private float jobvalue; | ||||||
|  |  | ||||||
|  | 	private String jobtime; | ||||||
|  |  | ||||||
|  | 	private ArrayList<Integer> positionenQuantity; | ||||||
|  |  | ||||||
|  | 	private ArrayList<String> positionenName; | ||||||
|  |  | ||||||
|  | 	private ArrayList<Float> positionenValue; | ||||||
|  |  | ||||||
|  | 	private ArrayList<String> positionenCat; | ||||||
|  |  | ||||||
|  | 	public Job(int pJobnumber) | ||||||
|  | 	{ | ||||||
|  | 		this.jobnumber = pJobnumber; | ||||||
|  | 		positionenQuantity = new ArrayList<Integer>(); | ||||||
|  | 		positionenName = new ArrayList<String>(); | ||||||
|  | 		positionenValue = new ArrayList<Float>(); | ||||||
|  | 		positionenCat = new ArrayList<String>(); | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void setJobtime(String jobtime) | ||||||
|  | 	{ | ||||||
|  | 		this.jobtime = jobtime; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public int getJobnumber() | ||||||
|  | 	{ | ||||||
|  | 		return this.jobnumber; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getJobtime() | ||||||
|  | 	{ | ||||||
|  | 		return this.jobtime; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public float getJobValue() | ||||||
|  | 	{ | ||||||
|  |  | ||||||
|  | 		calcJobValue(); | ||||||
|  |  | ||||||
|  | 		return this.jobvalue; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	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 | ||||||
|  | 				positionenQuantity.set(i, positionenQuantity.get(i) + 1); | ||||||
|  | 				return; | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		positionenName.add(pPositionenName); | ||||||
|  | 		positionenValue.add(pPositionenValue); | ||||||
|  | 		positionenCat.add(pPositionenCat); | ||||||
|  | 		positionenQuantity.add(1); | ||||||
|  |  | ||||||
|  | 		calcJobValue(); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void printJobOnConsole() | ||||||
|  | 	{ | ||||||
|  | 		System.out.println("---------------------------------------------"); | ||||||
|  | 		System.out.println("JobNummer: " + jobnumber); | ||||||
|  | 		System.out.println("---------------------------------------------"); | ||||||
|  |  | ||||||
|  | 		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("---------------------------------------------"); | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public ArrayList<tableDataCurrentOrder> getCurrentJobPositionen() | ||||||
|  | 	{ | ||||||
|  | 		ArrayList<tableDataCurrentOrder> jobitems = new ArrayList<tableDataCurrentOrder>(); | ||||||
|  | 		 | ||||||
|  | 		for (int i = 0; i < positionenName.size(); i++) { | ||||||
|  |  | ||||||
|  | 			tableDataCurrentOrder tmp = new tableDataCurrentOrder( | ||||||
|  | 					positionenName.get(i), positionenQuantity.get(i)); | ||||||
|  |  | ||||||
|  | 			jobitems.add(tmp); | ||||||
|  | 		} | ||||||
|  | 		return jobitems; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	private void calcJobValue() | ||||||
|  | 	{ | ||||||
|  | 		jobvalue = 0; | ||||||
|  |  | ||||||
|  | 		for (int i = 0; i < positionenValue.size(); i++) { | ||||||
|  | 			jobvalue = jobvalue | ||||||
|  | 					+ (positionenQuantity.get(i) * positionenValue.get(i)); | ||||||
|  | 		} | ||||||
|  | 		//Round to two decimals | ||||||
|  | 		jobvalue =  BigDecimal.valueOf(jobvalue).setScale(2, BigDecimal.ROUND_HALF_UP).floatValue(); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String createPosQuantityDBString() | ||||||
|  | 	{ | ||||||
|  | 		String tmp = String.valueOf(positionenQuantity.get(0)); | ||||||
|  | 		for (int i = 1; i < positionenName.size(); i++) { | ||||||
|  |  | ||||||
|  | 			tmp = tmp + ";" + positionenQuantity.get(i); | ||||||
|  | 		} | ||||||
|  | 		return tmp; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String createPosNameDBString() | ||||||
|  | 	{ | ||||||
|  | 		String tmp = positionenName.get(0); | ||||||
|  | 		for (int i = 1; i < positionenName.size(); i++) { | ||||||
|  |  | ||||||
|  | 			tmp = tmp + ";" + positionenName.get(i); | ||||||
|  | 		} | ||||||
|  | 		return tmp; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String createPosValueDBString() | ||||||
|  | 	{ | ||||||
|  | 		String tmp = String.valueOf(positionenValue.get(0)); | ||||||
|  | 		for (int i = 1; i < positionenName.size(); i++) { | ||||||
|  |  | ||||||
|  | 			tmp = tmp + ";" + positionenValue.get(i); | ||||||
|  | 		} | ||||||
|  | 		return tmp; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String createPosCatDBString() | ||||||
|  | 	{ | ||||||
|  | 		String tmp = positionenCat.get(0); | ||||||
|  | 		for (int i = 1; i < positionenName.size(); i++) { | ||||||
|  |  | ||||||
|  | 			tmp = tmp + ";" + positionenCat.get(i); | ||||||
|  | 		} | ||||||
|  | 		return tmp; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public void deletePosName(String pPosName) | ||||||
|  | 	{ | ||||||
|  |  | ||||||
|  | 		for (int i = 0; i < positionenName.size(); i++) { | ||||||
|  |  | ||||||
|  | 			if (positionenName.get(i).equals(pPosName)) { | ||||||
|  |  | ||||||
|  | 				if (positionenQuantity.get(i) > 1) { | ||||||
|  | 					positionenQuantity.set(i, positionenQuantity.get(i) - 1); | ||||||
|  | 				} else { | ||||||
|  |  | ||||||
|  | 					positionenQuantity.remove(i); | ||||||
|  | 					positionenName.remove(i); | ||||||
|  | 					positionenValue.remove(i); | ||||||
|  | 					positionenCat.remove(i); | ||||||
|  |  | ||||||
|  | 				} | ||||||
|  |  | ||||||
|  | 			} | ||||||
|  |  | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public boolean existsPosName(String pPosName) | ||||||
|  | 	{ | ||||||
|  | 		for (int i = 0; i < positionenName.size(); i++) { | ||||||
|  | 			if (positionenName.get(i).equals(pPosName)) { | ||||||
|  | 				return true; | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		return false; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										180
									
								
								src/main/java/com/jFxKasse/datatypes/PrintData.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,180 @@ | |||||||
|  | package com.jFxKasse.datatypes; | ||||||
|  |  | ||||||
|  | public abstract class PrintData | ||||||
|  | { | ||||||
|  |  | ||||||
|  | 	protected int headerSpace; | ||||||
|  |  | ||||||
|  | 	protected int footerSpace; | ||||||
|  |  | ||||||
|  | 	protected int lineBreak; | ||||||
|  |  | ||||||
|  | 	protected String header; | ||||||
|  |  | ||||||
|  | 	protected String footer; | ||||||
|  |  | ||||||
|  | 	protected String positionsQuantity; | ||||||
|  |  | ||||||
|  | 	protected String positionsName; | ||||||
|  |  | ||||||
|  | 	protected String positionsValue; | ||||||
|  |  | ||||||
|  | 	protected String positionsCategory; | ||||||
|  |  | ||||||
|  | 	protected String jobID; | ||||||
|  |  | ||||||
|  | 	protected String timeAndDateOrder; | ||||||
|  |  | ||||||
|  | 	protected String timeAndDatePrint; | ||||||
|  |  | ||||||
|  | 	protected String jobValue; | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Constructor with all data that is not in the DB | ||||||
|  | 	 * @param lineBreak | ||||||
|  | 	 * @param headerSpace | ||||||
|  | 	 * @param footerSpace | ||||||
|  | 	 * @param timeAndDatePrint | ||||||
|  | 	 * @param header | ||||||
|  | 	 * @param footer | ||||||
|  | 	 */ | ||||||
|  | 	public PrintData(int lineBreak, int headerSpace, int footerSpace, | ||||||
|  | 			String timeAndDatePrint, String header, String footer) | ||||||
|  | 	{ | ||||||
|  | 		this.lineBreak = lineBreak; | ||||||
|  | 		this.headerSpace = headerSpace; | ||||||
|  | 		this.footerSpace = footerSpace; | ||||||
|  | 		this.timeAndDatePrint = timeAndDatePrint; | ||||||
|  | 		this.header = header; | ||||||
|  | 		this.footer = footer; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * set all Data that is in the DB | ||||||
|  | 	 * @param jobID | ||||||
|  | 	 * @param timeAndDateOrder | ||||||
|  | 	 * @param positionenQuantity | ||||||
|  | 	 * @param positionenName | ||||||
|  | 	 * @param positionenValue | ||||||
|  | 	 * @param positionenCategory | ||||||
|  | 	 * @param jobValue | ||||||
|  | 	 */ | ||||||
|  | 	public void setData(String jobID, String timeAndDateOrder, | ||||||
|  | 			String positionsQuantity, String positionsName, | ||||||
|  | 			String positionsValue, String positionsCategory, String jobValue) | ||||||
|  | 	{ | ||||||
|  | 		this.jobID = jobID; | ||||||
|  | 		this.timeAndDateOrder = timeAndDateOrder; | ||||||
|  | 		this.positionsQuantity = positionsQuantity; | ||||||
|  | 		this.positionsName = positionsName; | ||||||
|  | 		this.positionsValue = positionsValue; | ||||||
|  | 		this.positionsCategory = positionsCategory; | ||||||
|  | 		this.jobValue = jobValue; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 *  | ||||||
|  | 	 * @param data String | ||||||
|  | 	 * @return same String splitted with \n after the max. line lenght | ||||||
|  | 	 */ | ||||||
|  | 	protected String breakLines(String data) | ||||||
|  | 	{ | ||||||
|  | 		boolean next = false; | ||||||
|  |  | ||||||
|  | 		int count = lineBreak; | ||||||
|  |  | ||||||
|  | 		if (data.length() > lineBreak) { | ||||||
|  | 			// Needs to be splitted | ||||||
|  | 			next = true; | ||||||
|  | 		} else { | ||||||
|  | 			// No need to be splitted | ||||||
|  | 			return data; | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		// first part | ||||||
|  | 		String tmp = data.substring(0, lineBreak); | ||||||
|  |  | ||||||
|  | 		while (next) { | ||||||
|  |  | ||||||
|  | 			try { | ||||||
|  | 				tmp = tmp + "\n" + data.substring(count, lineBreak + count); | ||||||
|  | 				count = count + lineBreak; | ||||||
|  | 			} catch (Exception e) { | ||||||
|  | 				// data string not long enough | ||||||
|  | 				next = false; | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 		// add the last part | ||||||
|  | 		return tmp + "\n" + data.substring(count); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * prints a line of '--------' | ||||||
|  | 	 * @return | ||||||
|  | 	 */ | ||||||
|  | 	protected String getSeparator() | ||||||
|  | 	{ | ||||||
|  | 		String tmp = "-"; | ||||||
|  |  | ||||||
|  | 		for (int i = 1; i < lineBreak; i++) { | ||||||
|  | 			tmp = tmp + "-"; | ||||||
|  | 		} | ||||||
|  | 		return tmp; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * sets a String into the center | ||||||
|  | 	 * @param data | ||||||
|  | 	 * @return the centered String | ||||||
|  | 	 */ | ||||||
|  | 	protected String setCenter(String data) | ||||||
|  | 	{ | ||||||
|  | 		int dataLenght = data.length(); | ||||||
|  | 		int prefix = ((lineBreak - dataLenght) / 2); | ||||||
|  | 		String tmp = " "; | ||||||
|  |  | ||||||
|  | 		for (int i = 1; i < prefix; i++) { | ||||||
|  | 			tmp = tmp + " "; | ||||||
|  | 		} | ||||||
|  | 		tmp = tmp + data; | ||||||
|  | 		 | ||||||
|  | 		return breakLines(tmp); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * sets a String right-justified after an prefix | ||||||
|  | 	 * @param prefix | ||||||
|  | 	 * @param data | ||||||
|  | 	 * @return the right-justified String | ||||||
|  | 	 */ | ||||||
|  | 	protected String setRight(String prefix, String data) | ||||||
|  | 	{ | ||||||
|  |  | ||||||
|  | 		int prefixLenght = prefix.length(); | ||||||
|  |  | ||||||
|  | 		int dataLenght = data.length(); | ||||||
|  |  | ||||||
|  | 		String tmp = prefix; | ||||||
|  |  | ||||||
|  | 		int fill = lineBreak - (prefixLenght + dataLenght); | ||||||
|  |  | ||||||
|  | 		if (fill < 0) { | ||||||
|  | 			tmp = tmp + "\n"; | ||||||
|  | 			fill = lineBreak - dataLenght; | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		for (int i = 0; i < fill; i++) { | ||||||
|  | 			tmp = tmp + " "; | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		tmp = tmp + data; | ||||||
|  |  | ||||||
|  | 		return tmp; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * How the print String or Strings are made | ||||||
|  | 	 */ | ||||||
|  | 	abstract protected void generatePrintString(); | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										93
									
								
								src/main/java/com/jFxKasse/datatypes/PrintDataSimple.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,93 @@ | |||||||
|  | package com.jFxKasse.datatypes; | ||||||
|  |  | ||||||
|  | public class PrintDataSimple extends PrintData | ||||||
|  | { | ||||||
|  |  | ||||||
|  | 	private String printString; | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Constructor with all data that is not in the DB | ||||||
|  | 	 * @param lineBreak | ||||||
|  | 	 * @param headerSpace | ||||||
|  | 	 * @param footerSpace | ||||||
|  | 	 * @param timeAndDatePrint | ||||||
|  | 	 * @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); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Generates the String | ||||||
|  | 	 * @return the final Print String | ||||||
|  | 	 */ | ||||||
|  | 	public String getPrintString() | ||||||
|  | 	{ | ||||||
|  | 		generatePrintString(); | ||||||
|  | 		return this.printString; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	protected void generatePrintString() | ||||||
|  | 	{ | ||||||
|  | 		/* Header */ | ||||||
|  | 		String header = " "; | ||||||
|  | 		for (int i = 1; i < headerSpace; i++) { | ||||||
|  | 			header = header + "\n"; | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		// This is the final header | ||||||
|  | 		header = header + setCenter(this.header); | ||||||
|  |  | ||||||
|  | 		/* Info */ | ||||||
|  |  | ||||||
|  | 		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; | ||||||
|  |  | ||||||
|  | 		String[] positionQuantity = positionsQuantity.split(";"); | ||||||
|  |  | ||||||
|  | 		String[] positionName = positionsName.split(";"); | ||||||
|  |  | ||||||
|  | 		String[] positionValue = positionsValue.split(";"); | ||||||
|  |  | ||||||
|  | 		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"; | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		/* Price */ | ||||||
|  |  | ||||||
|  | 		String price = setRight("Gesamt: ", (jobValue + " €")); | ||||||
|  |  | ||||||
|  | 		/* Footer */ | ||||||
|  |  | ||||||
|  | 		String footer = setCenter(this.footer); | ||||||
|  |  | ||||||
|  | 		for (int i = 1; i < footerSpace; i++) { | ||||||
|  | 			footer = footer + "\n"; | ||||||
|  | 		} | ||||||
|  | 		footer = footer + "_"; | ||||||
|  |  | ||||||
|  | 		/* Build final Print String */ | ||||||
|  |  | ||||||
|  | 		printString = header + "\n" + getSeparator() + "\n" + info + "\n" | ||||||
|  | 				+ getSeparator() + "\n" + positionen + "\n" + getSeparator() + "\n" | ||||||
|  | 				+ price + "\n" + getSeparator() + "\n" + footer; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										169
									
								
								src/main/java/com/jFxKasse/datatypes/PrintDataSplitted.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,169 @@ | |||||||
|  | package com.jFxKasse.datatypes; | ||||||
|  |  | ||||||
|  | import java.util.ArrayList; | ||||||
|  |  | ||||||
|  | public class PrintDataSplitted extends PrintData | ||||||
|  | { | ||||||
|  | 	private ArrayList<String> printString = new ArrayList<String>(); | ||||||
|  |  | ||||||
|  | 	private ArrayList<Category> categories = new ArrayList<Category>(); | ||||||
|  |  | ||||||
|  | 	private int categoryCount = 0; | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Constructor with all data that is not in the DB | ||||||
|  | 	 * @param lineBreak | ||||||
|  | 	 * @param headerSpace | ||||||
|  | 	 * @param footerSpace | ||||||
|  | 	 * @param timeAndDatePrint | ||||||
|  | 	 * @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); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Generates the String | ||||||
|  | 	 * @return the final Array with the Print Strings | ||||||
|  | 	 */ | ||||||
|  | 	public ArrayList<String> getPrintStrings() | ||||||
|  | 	{ | ||||||
|  | 		generatePrintString(); | ||||||
|  | 		return printString; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	protected void generatePrintString() | ||||||
|  | 	{ | ||||||
|  |  | ||||||
|  | 		String firstBill; | ||||||
|  |  | ||||||
|  | 		/* Header */ | ||||||
|  | 		String header = "-"; | ||||||
|  | 		for (int i = 1; i < headerSpace; i++) { | ||||||
|  | 			header = header + "\n"; | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		// This is the final header | ||||||
|  | 		header = header + setCenter(this.header); | ||||||
|  |  | ||||||
|  | 		/* Info */ | ||||||
|  |  | ||||||
|  | 		String info = setRight("Bestellung: ", timeAndDateOrder) + "\n" | ||||||
|  | 				+ setRight("Druck: ", timeAndDatePrint) + "\n" | ||||||
|  | 				+ setRight("Bestellnummer: ", jobID); | ||||||
|  |  | ||||||
|  | 		/* Splitted Bills */ | ||||||
|  |  | ||||||
|  | 		/* Price */ | ||||||
|  |  | ||||||
|  | 		String price = setRight("Gesamt: ", (jobValue + " €")); | ||||||
|  |  | ||||||
|  | 		/* Footer */ | ||||||
|  |  | ||||||
|  | 		String footer = setCenter(this.footer); | ||||||
|  |  | ||||||
|  | 		for (int i = 1; i < footerSpace; i++) { | ||||||
|  | 			footer = footer + "\n"; | ||||||
|  | 		} | ||||||
|  | 		footer = footer + "_"; | ||||||
|  |  | ||||||
|  | 		/* 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; | ||||||
|  |  | ||||||
|  | 		printString.add(firstBill); | ||||||
|  |  | ||||||
|  | 		/* first bill ends here */ | ||||||
|  |  | ||||||
|  | 		/* Categories in extra bills */ | ||||||
|  |  | ||||||
|  | 		String positions = null; | ||||||
|  |  | ||||||
|  | 		int posCount = positionsQuantity.length() | ||||||
|  | 				- positionsQuantity.replace(";", "").length() + 1; | ||||||
|  |  | ||||||
|  | 		String[] positionQuantity = positionsQuantity.split(";"); | ||||||
|  | 		String[] positionName = positionsName.split(";"); | ||||||
|  | 		String[] positionValue = positionsValue.split(";"); | ||||||
|  | 		String[] positionCategory = positionsCategory.split(";"); | ||||||
|  |  | ||||||
|  | 		for (int i = 0; i < posCount; i++) { // All different posNames | ||||||
|  | 			int quantity = Integer.parseInt(positionQuantity[i]); | ||||||
|  | 			insertToCategory(quantity, positionName[i], positionValue[i], | ||||||
|  | 					positionCategory[i]); | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		// loops through all categories | ||||||
|  | 		for (int i = 0; i < categories.size(); i++) { | ||||||
|  |  | ||||||
|  | 			String thisBill; | ||||||
|  |  | ||||||
|  | 			/* Header */ | ||||||
|  | 			header = " "; | ||||||
|  | 			for (int o = 1; o < headerSpace; o++) { | ||||||
|  | 				header = header + "\n"; | ||||||
|  | 			} | ||||||
|  |  | ||||||
|  | 			// This is the final header | ||||||
|  | 			header = header + setCenter(this.header); | ||||||
|  |  | ||||||
|  | 			/* Info */ | ||||||
|  |  | ||||||
|  | 			info = setRight("Bestellung: ", timeAndDateOrder) + "\n" | ||||||
|  | 					+ setRight("Druck: ", timeAndDatePrint) + "\n" | ||||||
|  | 					+ setRight("Bestellnummer: ", jobID); | ||||||
|  |  | ||||||
|  | 			/* Positions */ | ||||||
|  |  | ||||||
|  | 			positions = categories.get(i).getPositionsString(); | ||||||
|  |  | ||||||
|  | 			/* Footer */ | ||||||
|  |  | ||||||
|  | 			footer = "\n"; | ||||||
|  |  | ||||||
|  | 			for (int o = 2; o < footerSpace; o++) { | ||||||
|  | 				footer = footer + "\n"; | ||||||
|  | 			} | ||||||
|  | 			footer = 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); | ||||||
|  |  | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	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())) { | ||||||
|  | 				categories.get(i).addPosition(quantity, name, value, this); | ||||||
|  | 				createNewCategorie = false; | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 		if (createNewCategorie) { | ||||||
|  | 			// position has a new category | ||||||
|  | 			categories.add(new Category(category)); | ||||||
|  | 			categories.get(categoryCount).addPosition(quantity, name, value, this); | ||||||
|  | 			categoryCount++; | ||||||
|  | 		} | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,50 @@ | |||||||
|  | package com.jFxKasse.datatypes; | ||||||
|  |  | ||||||
|  | import javafx.beans.property.IntegerProperty; | ||||||
|  | import javafx.beans.property.SimpleIntegerProperty; | ||||||
|  | import javafx.beans.property.SimpleStringProperty; | ||||||
|  | import javafx.beans.property.StringProperty; | ||||||
|  |  | ||||||
|  | public class tableDataCurrentOrder | ||||||
|  | {  | ||||||
|  |  | ||||||
|  | 	private final StringProperty position = new SimpleStringProperty(); | ||||||
|  |  | ||||||
|  | 	private final IntegerProperty quantity = new SimpleIntegerProperty(); | ||||||
|  |  | ||||||
|  | 	public tableDataCurrentOrder(final String pPosition, final Integer pQuantity) | ||||||
|  | 	{ | ||||||
|  | 		this.position.set(pPosition); | ||||||
|  | 		this.quantity.set(pQuantity); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public StringProperty positionProperty() | ||||||
|  | 	{ | ||||||
|  | 		return position; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public IntegerProperty quantityProperty() | ||||||
|  | 	{ | ||||||
|  | 		return quantity; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getPosition() | ||||||
|  | 	{ | ||||||
|  | 		return positionProperty().get(); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public Integer getQuantity() | ||||||
|  | 	{ | ||||||
|  | 		return quantityProperty().get(); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public final void setPosition(String pPosition) | ||||||
|  | 	{ | ||||||
|  | 		positionProperty().set(pPosition); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public final void setQuantity(int pQuantity) | ||||||
|  | 	{ | ||||||
|  | 		quantityProperty().set(pQuantity); | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										107
									
								
								src/main/java/com/jFxKasse/datatypes/tableDataJob.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @ -0,0 +1,107 @@ | |||||||
|  | package com.jFxKasse.datatypes; | ||||||
|  |  | ||||||
|  | import javafx.beans.property.IntegerProperty; | ||||||
|  | import javafx.beans.property.SimpleIntegerProperty; | ||||||
|  | import javafx.beans.property.SimpleStringProperty; | ||||||
|  | import javafx.beans.property.StringProperty; | ||||||
|  |  | ||||||
|  | public class tableDataJob | ||||||
|  | { | ||||||
|  |  | ||||||
|  | 	private final IntegerProperty number = new SimpleIntegerProperty(); | ||||||
|  |  | ||||||
|  | 	private final StringProperty time = new SimpleStringProperty(); | ||||||
|  |  | ||||||
|  | 	private final StringProperty positionen = new SimpleStringProperty(); | ||||||
|  |  | ||||||
|  | 	private final StringProperty status = new SimpleStringProperty(); | ||||||
|  |  | ||||||
|  | 	private final StringProperty value = new SimpleStringProperty(); | ||||||
|  |  | ||||||
|  | 	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); | ||||||
|  | 		this.status.set(pStatus); | ||||||
|  | 		this.value.set(pValue); | ||||||
|  |  | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public IntegerProperty numberProperty() | ||||||
|  | 	{ | ||||||
|  | 		return number; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public StringProperty timeProperty() | ||||||
|  | 	{ | ||||||
|  | 		return time; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public StringProperty positionProperty() | ||||||
|  | 	{ | ||||||
|  | 		return positionen; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public StringProperty statusProperty() | ||||||
|  | 	{ | ||||||
|  | 		return status; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public StringProperty valueProperty() | ||||||
|  | 	{ | ||||||
|  | 		return value; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public Integer getNumber() | ||||||
|  | 	{ | ||||||
|  | 		return numberProperty().get(); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getTime() | ||||||
|  | 	{ | ||||||
|  | 		return timeProperty().get(); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getPosition() | ||||||
|  | 	{ | ||||||
|  | 		return positionProperty().get(); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getStatus() | ||||||
|  | 	{ | ||||||
|  | 		return statusProperty().get(); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public String getValue() | ||||||
|  | 	{ | ||||||
|  | 		return valueProperty().get(); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public final void setNumber(int pNumber) | ||||||
|  | 	{ | ||||||
|  | 		numberProperty().set(pNumber); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public final void setTime(String pTime) | ||||||
|  | 	{ | ||||||
|  | 		timeProperty().set(pTime); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public final void setPosition(String pPosition) | ||||||
|  | 	{ | ||||||
|  | 		positionProperty().set(pPosition); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public final void setStatus(String pStatus) | ||||||
|  | 	{ | ||||||
|  | 		statusProperty().set(pStatus); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	public final void setValue(String pValue) | ||||||
|  | 	{ | ||||||
|  | 		valueProperty().set(pValue); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -1,4 +1,4 @@ | |||||||
| package application; | package com.jFxKasse.datatypes; | ||||||
| 
 | 
 | ||||||
| import javafx.beans.property.IntegerProperty; | import javafx.beans.property.IntegerProperty; | ||||||
| import javafx.beans.property.SimpleIntegerProperty; | import javafx.beans.property.SimpleIntegerProperty; | ||||||
| @ -2,9 +2,11 @@ | |||||||
| 
 | 
 | ||||||
| <?import com.jfoenix.controls.JFXButton?> | <?import com.jfoenix.controls.JFXButton?> | ||||||
| <?import com.jfoenix.controls.JFXTextField?> | <?import com.jfoenix.controls.JFXTextField?> | ||||||
|  | <?import com.jfoenix.controls.JFXToggleButton?> | ||||||
| <?import javafx.scene.control.Button?> | <?import javafx.scene.control.Button?> | ||||||
| <?import javafx.scene.control.ChoiceBox?> | <?import javafx.scene.control.ChoiceBox?> | ||||||
| <?import javafx.scene.control.Label?> | <?import javafx.scene.control.Label?> | ||||||
|  | <?import javafx.scene.control.Spinner?> | ||||||
| <?import javafx.scene.control.Tab?> | <?import javafx.scene.control.Tab?> | ||||||
| <?import javafx.scene.control.TabPane?> | <?import javafx.scene.control.TabPane?> | ||||||
| <?import javafx.scene.control.TitledPane?> | <?import javafx.scene.control.TitledPane?> | ||||||
| @ -17,178 +19,271 @@ | |||||||
| <?import javafx.scene.shape.Line?> | <?import javafx.scene.shape.Line?> | ||||||
| <?import javafx.scene.text.Font?> | <?import javafx.scene.text.Font?> | ||||||
| 
 | 
 | ||||||
| <AnchorPane fx:id="mainAnchorpane" maxHeight="732.0" maxWidth="1366.0" minHeight="732.0" minWidth="1366.0" prefHeight="732.0" prefWidth="1366.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MainWindowController"> | <AnchorPane fx:id="mainAnchorpane" maxHeight="732.0" maxWidth="1366.0" minHeight="732.0" minWidth="1366.0" prefHeight="732.0" prefWidth="1366.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.jFxKasse.controller.MainWindowController"> | ||||||
| 	<children> | 	<children> | ||||||
| 		<TabPane layoutX="4.0" layoutY="5.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="924.0" prefWidth="1536.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> | 		<TabPane layoutX="4.0" layoutY="5.0" nodeOrientation="RIGHT_TO_LEFT" prefHeight="924.0" prefWidth="1536.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> | ||||||
| 			<tabs> | 			<tabs> | ||||||
| 				<Tab text="Einstellungen"> | 				<Tab fx:id="tapSettings" text="Einstellungen"> | ||||||
| 					<content> | 					<content> | ||||||
| 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"> | 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"> | ||||||
| 							<children> | 							<children> | ||||||
| 								<Button fx:id="ueberbtn" layoutX="84.0" layoutY="79.0" mnemonicParsing="false" onAction="#ueberbtnAction" prefHeight="0.0" prefWidth="46.0" text="Über" /> | 								<Button fx:id="ueberbtn" layoutX="273.0" layoutY="448.0" mnemonicParsing="false" onAction="#ueberbtnAction" prefHeight="35.0" prefWidth="324.0" text="Informationen über jFxKasse"> | ||||||
|                         <TitledPane alignment="CENTER" animated="false" collapsible="false" contentDisplay="CENTER" layoutX="790.0" layoutY="10.0" prefHeight="270.0" prefWidth="566.0" text="Datenbank Einstellungen"> |                            <font> | ||||||
|  |                               <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> | ||||||
|  | 												</Label> | ||||||
|  | 												<JFXTextField 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></JFXTextField> | ||||||
|  | 												<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> | ||||||
|  | 												</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> | ||||||
|  | 												</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> | ||||||
|  | 												</Button> | ||||||
|  | 											</children> | ||||||
|  | 										</AnchorPane> | ||||||
|  | 									</content> | ||||||
|  | 									<font> | ||||||
|  | 										<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"> | ||||||
|  | 									<content> | ||||||
|  | 										<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="260.0" prefWidth="564.0"> | ||||||
|  | 											<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> | ||||||
|  | 												</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> | ||||||
|  | 												</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> | ||||||
|  | 												</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> | ||||||
|  | 												</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> | ||||||
|  | 												</Label> | ||||||
|  | 												<JFXTextField 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></JFXTextField> | ||||||
|  | 												<JFXTextField 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></JFXTextField> | ||||||
|  | 												<JFXTextField 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></JFXTextField> | ||||||
|  | 												<JFXTextField 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></JFXTextField> | ||||||
|  | 												<JFXTextField 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></JFXTextField> | ||||||
|  | 												<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> | ||||||
|  | 												</Button> | ||||||
|  | 											</children> | ||||||
|  | 										</AnchorPane> | ||||||
|  | 									</content> | ||||||
|  | 									<font> | ||||||
|  | 										<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> |                            <content> | ||||||
|                               <AnchorPane fx:id="paneDB" minHeight="0.0" minWidth="0.0" prefHeight="238.0" prefWidth="564.0"> |                               <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="327.0" prefWidth="564.0"> | ||||||
|                                  <children> |                                  <children> | ||||||
|                                     <Label fx:id="labelDBName" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="329.0" layoutY="10.0" prefHeight="34.0" prefWidth="229.0" text="Datenbankname:"> |                                     <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" /> | ||||||
|  |                                     <JFXTextField 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></JFXTextField> | ||||||
|  |                                     <JFXToggleButton fx:id="switchSeparate" layoutX="270.0" layoutY="170.0" text="Kategorien separat drucken"> | ||||||
|  |                                        <font> | ||||||
|  |                                           <Font name="Cantarell Regular" size="18.0" /> | ||||||
|  |                                        </font> | ||||||
|  |                                     </JFXToggleButton> | ||||||
|  |                                     <Label alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="450.0" layoutY="10.0" prefHeight="34.0" prefWidth="107.0" text="Drucker:"> | ||||||
|                                        <font> |                                        <font> | ||||||
|                                           <Font name="Cantarell Regular" size="18.0" /> |                                           <Font name="Cantarell Regular" size="18.0" /> | ||||||
|                                        </font> |                                        </font> | ||||||
|                                     </Label> |                                     </Label> | ||||||
|                                     <JFXTextField fx:id="tftNewDBName" alignment="CENTER" layoutX="25.0" layoutY="10.0" prefHeight="25.0" prefWidth="376.0" /> |                                     <Label alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="140.0" layoutY="10.0" prefHeight="34.0" prefWidth="107.0" text="Zeilenlänge:"> | ||||||
|                                     <Label fx:id="labelDBStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="1.0" layoutY="75.0" prefHeight="34.0" prefWidth="551.0" text="Keine Datenbank gefunden!"> |  | ||||||
|                                        <font> |                                        <font> | ||||||
|                                           <Font name="Cantarell Regular" size="18.0" /> |                                           <Font name="Cantarell Regular" size="18.0" /> | ||||||
|                                        </font> |                                        </font> | ||||||
|                                     </Label> |                                     </Label> | ||||||
|                                     <Button fx:id="btnCreateNewDatabase" layoutX="317.0" layoutY="126.0" mnemonicParsing="false" onAction="#btnCreateNewDatabaseAction" text="Neue Datenbank anlegen"> |                                     <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> | ||||||
|  |                                     </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> | ||||||
|  |                                     </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> | ||||||
|  |                                     </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> | ||||||
|  |                                     </Label> | ||||||
|  |                                     <Button fx:id="btnSavePrinter" layoutX="27.0" layoutY="198.0" mnemonicParsing="false" onAction="#btnSavePrinterAction" text="Einstellungen speichern"> | ||||||
|                                        <font> |                                        <font> | ||||||
|                                           <Font name="Cantarell Regular" size="13.0" /> |                                           <Font name="Cantarell Regular" size="13.0" /> | ||||||
|                                        </font> |                                        </font> | ||||||
|                                     </Button> |                                     </Button> | ||||||
|                                     <Button fx:id="btnOpenFolder" layoutX="99.0" layoutY="126.0" mnemonicParsing="false" onAction="#btnOpenFolderAction" text="Speicherort öffnen"> |                                     <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" /> | ||||||
|  |                                     <JFXTextField fx:id="tftfooter" alignment="CENTER" layoutX="65.0" layoutY="130.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="377.0"> | ||||||
|                                        <font> |                                        <font> | ||||||
|                                           <Font name="Cantarell Regular" size="13.0" /> |                                           <Font name="Cantarell Regular" size="18.0" /> | ||||||
|                                        </font> |                                        </font></JFXTextField> | ||||||
|                                     </Button> |  | ||||||
|                                  </children> |                                  </children> | ||||||
|                               </AnchorPane> |                               </AnchorPane> | ||||||
|                            </content> |                            </content> | ||||||
|                            <font> |                            <font> | ||||||
|                               <Font name="Cantarell Regular" size="13.0" /> |                               <Font name="Cantarell Regular" size="13.0" /> | ||||||
|                            </font> |                            </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"> |  | ||||||
|                           <content> |  | ||||||
|                             <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="260.0" prefWidth="564.0"> |  | ||||||
|                                  <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> |  | ||||||
|                                     </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> |  | ||||||
|                                     </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> |  | ||||||
|                                     </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> |  | ||||||
|                                     </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> |  | ||||||
|                                     </Label> |  | ||||||
|                                     <JFXTextField fx:id="tftKat01" alignment="CENTER" layoutX="50.0" layoutY="5.0" prefHeight="25.0" prefWidth="376.0" /> |  | ||||||
|                                     <JFXTextField fx:id="tftKat02" alignment="CENTER" layoutX="50.0" layoutY="45.0" prefHeight="25.0" prefWidth="376.0" /> |  | ||||||
|                                     <JFXTextField fx:id="tftKat03" alignment="CENTER" layoutX="50.0" layoutY="85.0" prefHeight="25.0" prefWidth="376.0" /> |  | ||||||
|                                     <JFXTextField fx:id="tftKat04" alignment="CENTER" layoutX="50.0" layoutY="125.0" prefHeight="25.0" prefWidth="376.0" /> |  | ||||||
|                                     <JFXTextField fx:id="tftKat05" alignment="CENTER" layoutX="50.0" layoutY="165.0" prefHeight="25.0" prefWidth="376.0" /> |  | ||||||
|                                     <Button fx:id="btnSaveCat" layoutX="200.0" layoutY="204.0" mnemonicParsing="false" onAction="#btnSaveCatAction" text="Kategorien speichern"> |  | ||||||
|                                        <font> |  | ||||||
|                                           <Font name="Cantarell Regular" size="13.0" /> |  | ||||||
|                                        </font> |  | ||||||
|                                     </Button> |  | ||||||
|                                  </children> |  | ||||||
|                               </AnchorPane> |  | ||||||
|                           </content> |  | ||||||
|                            <font> |  | ||||||
|                               <Font name="Cantarell Regular" size="13.0" /> |  | ||||||
|                            </font> |  | ||||||
|                         </TitledPane> |                         </TitledPane> | ||||||
| 							</children> | 							</children> | ||||||
| 						</AnchorPane> | 						</AnchorPane> | ||||||
| 					</content> | 					</content> | ||||||
| 				</Tab> | 				</Tab> | ||||||
| 				<Tab text="Positionen bearbeiten"> | 				<Tab fx:id="tapPosEdit" text="Positionen bearbeiten"> | ||||||
| 					<content> | 					<content> | ||||||
| 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"> | 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"> | ||||||
|                      <children> | 							<children> | ||||||
|                         <TreeTableView fx:id="entryTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="502.0" prefWidth="1346.0"> | 								<TreeTableView fx:id="entryTreeTable" layoutX="11.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="502.0" prefWidth="1346.0"> | ||||||
|                            <columns> | 									<placeholder> | ||||||
|                               <TreeTableColumn fx:id="columnColor" editable="false" maxWidth="237.3333740234375" minWidth="164.0" prefWidth="164.0" resizable="false" sortable="false" text="Farbe" /> | 										<Label text="" /> | ||||||
|                               <TreeTableColumn fx:id="columnCat" editable="false" maxWidth="800.0" minWidth="176.33331298828125" prefWidth="370.0" resizable="false" sortable="false" text="Kategorie" /> | 									</placeholder> | ||||||
|                               <TreeTableColumn fx:id="columnPrize" editable="false" maxWidth="693.3333129882812" minWidth="44.33331298828125" prefWidth="126.66668701171875" resizable="false" sortable="false" text="Preis" /> | 									<columns> | ||||||
|                               <TreeTableColumn fx:id="columnPositionsEdit" editable="false" maxWidth="1581.6666870117188" minWidth="38.0" prefWidth="543.3333129882812" resizable="false" sortable="false" text="Positionen" /> | 										<TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="1218.0" minWidth="59.0" prefWidth="165.0" resizable="false" sortable="false" text="Nummer" /> | ||||||
|                               <TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="1218.0" minWidth="60.666748046875" prefWidth="148.6666259765625" 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" /> | ||||||
|                            </columns> | 										<TreeTableColumn fx:id="columnPrize" editable="false" maxWidth="693.3333129882812" minWidth="44.33331298828125" prefWidth="140.33331298828125" resizable="false" sortable="false" text="Preis" /> | ||||||
|                            <columnResizePolicy> | 										<TreeTableColumn fx:id="columnCat" editable="false" maxWidth="800.0" minWidth="94.0" prefWidth="300.0" resizable="false" sortable="false" text="Kategorie" /> | ||||||
|                               <TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | 										<TreeTableColumn fx:id="columnColor" editable="false" maxWidth="428.0" minWidth="119.333251953125" prefWidth="119.333251953125" resizable="false" sortable="false" text="Farbe" /> | ||||||
|                            </columnResizePolicy> | 									</columns> | ||||||
|                         </TreeTableView> | 									<columnResizePolicy> | ||||||
|                         <Button fx:id="btnSaveEntry" layoutX="494.0" layoutY="631.0" mnemonicParsing="false" onAction="#btnSaveEntryAction" text="Ausgewählten Eintrag speichern"> | 										<TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | ||||||
|                            <font> | 									</columnResizePolicy> | ||||||
|                               <Font name="Cantarell Regular" size="17.0" /> | 								</TreeTableView> | ||||||
|                            </font> | 								<Button fx:id="btnClearEntry" layoutX="232.0" layoutY="590.0" mnemonicParsing="false" onAction="#btnClearEntryAction" text="Ausgewählten Eintrag zurücksetzten"> | ||||||
|                         </Button> | 									<font> | ||||||
|                         <Button fx:id="btnClearEntry" layoutX="462.0" layoutY="525.0" mnemonicParsing="false" onAction="#btnClearEntryAction" text="Ausgewählten Eintrag zurücksetzten"> | 										<Font name="Cantarell Regular" size="17.0" /> | ||||||
|                            <font> | 									</font> | ||||||
|                               <Font name="Cantarell Regular" size="17.0" /> | 								</Button> | ||||||
|                            </font> | 								<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"> | ||||||
|                         </Button> | 									<content> | ||||||
|                         <TitledPane alignment="CENTER" animated="false" collapsible="false" contentDisplay="CENTER" layoutX="792.0" layoutY="525.0" prefHeight="163.0" prefWidth="565.0" text="Eintrag editieren"> | 										<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="135.0" prefWidth="640.0"> | ||||||
|                           <content> | 											<children> | ||||||
|                             <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"> | 												<Label fx:id="labelNewPosition" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="516.0" layoutY="10.0" prefHeight="34.0" prefWidth="105.0" text="Position:"> | ||||||
|                                  <children> | 													<font> | ||||||
|                                     <Label fx:id="lableNewPosition" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="455.0" layoutY="10.0" prefHeight="34.0" prefWidth="105.0" text="Position:"> | 														<Font name="Cantarell Regular" size="18.0" /> | ||||||
|                                        <font> | 													</font> | ||||||
|                                           <Font name="Cantarell Regular" size="18.0" /> | 												</Label> | ||||||
|                                        </font> | 												<JFXTextField fx:id="tftNewPosition" alignment="CENTER" layoutX="307.0" layoutY="8.0" prefHeight="27.0" prefWidth="203.0"> | ||||||
|                                     </Label> | 													<font> | ||||||
|                                     <JFXTextField fx:id="tftNewPosition" alignment="CENTER" layoutX="160.0" layoutY="10.0" prefHeight="25.0" prefWidth="279.0"> | 														<Font name="Cantarell Regular" size="13.0" /> | ||||||
|                                        <font> | 													</font> | ||||||
|                                           <Font name="Cantarell Regular" size="13.0" /> | 												</JFXTextField> | ||||||
|                                        </font></JFXTextField> | 												<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:"> | ||||||
|                                     <Label fx:id="labelNewValue" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="442.0" layoutY="50.0" prefHeight="34.0" prefWidth="118.0" text="Preis in Euro:"> | 													<font> | ||||||
|                                        <font> | 														<Font name="Cantarell Regular" size="18.0" /> | ||||||
|                                           <Font name="Cantarell Regular" size="18.0" /> | 													</font> | ||||||
|                                        </font> | 												</Label> | ||||||
|                                     </Label> | 												<JFXTextField fx:id="tftNewValue" alignment="CENTER" labelFloat="true" layoutX="442.0" layoutY="42.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="27.0" prefWidth="66.0"> | ||||||
|                                     <JFXTextField fx:id="tftNewValue" alignment="CENTER" layoutX="380.0" layoutY="50.0" prefHeight="25.0" prefWidth="58.0"> | 													<font> | ||||||
|                                        <font> | 														<Font name="Cantarell Regular" size="18.0" /> | ||||||
|                                           <Font name="Cantarell Regular" size="13.0" /> | 													</font> | ||||||
|                                        </font></JFXTextField> | 												</JFXTextField> | ||||||
|                                     <Label fx:id="lableNewColor" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="455.0" layoutY="90.0" prefHeight="34.0" prefWidth="105.0" text="Farbe:"> | 												<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> | ||||||
|                                           <Font name="Cantarell Regular" size="18.0" /> | 														<Font name="Cantarell Regular" size="18.0" /> | ||||||
|                                        </font> | 													</font> | ||||||
|                                     </Label> | 												</Label> | ||||||
|                                     <ChoiceBox fx:id="colorChoise" layoutX="346.0" layoutY="90.0" prefHeight="25.0" prefWidth="96.0" /> | 												<ChoiceBox fx:id="colorChoise" layoutX="340.0" layoutY="90.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="169.0" /> | ||||||
|                                     <Label fx:id="lableSelectCat" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="204.0" layoutY="90.0" prefHeight="34.0" prefWidth="105.0" text="Kategorie:"> | 												<Label fx:id="labelSelectCat" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="185.0" layoutY="10.0" prefHeight="34.0" prefWidth="105.0" text="Kategorie:"> | ||||||
|                                        <font> | 													<font> | ||||||
|                                           <Font name="Cantarell Regular" size="18.0" /> | 														<Font name="Cantarell Regular" size="18.0" /> | ||||||
|                                        </font> | 													</font> | ||||||
|                                     </Label> | 												</Label> | ||||||
|                                     <ChoiceBox fx:id="catChoise" layoutX="25.0" layoutY="90.0" 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" /> | ||||||
|                                  </children> |             								<Button fx:id="btnSaveEntry" layoutX="23.0" layoutY="86.0" mnemonicParsing="false" onAction="#btnSaveEntryAction" text="Ausgewählten Eintrag speichern"> | ||||||
|                               </AnchorPane> |             									<font> | ||||||
|                           </content> |             										<Font name="Cantarell Regular" size="17.0" /> | ||||||
|                            <font> |             									</font> | ||||||
|                               <Font name="Cantarell Regular" size="13.0" /> |             								</Button> | ||||||
|                            </font> | 											</children> | ||||||
|                         </TitledPane> | 										</AnchorPane> | ||||||
|                      </children></AnchorPane> | 									</content> | ||||||
|  | 									<font> | ||||||
|  | 										<Font name="Cantarell Regular" size="13.0" /> | ||||||
|  | 									</font> | ||||||
|  | 								</TitledPane> | ||||||
|  | 							</children> | ||||||
|  | 						</AnchorPane> | ||||||
| 					</content> | 					</content> | ||||||
| 				</Tab> | 				</Tab> | ||||||
| 				<Tab text="Aufträge"> | 				<Tab fx:id="tapJobs" text="Aufträge"> | ||||||
| 					<content> | 					<content> | ||||||
| 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="850.0" prefWidth="1536.0"> | 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="850.0" prefWidth="1536.0"> | ||||||
| 							<children> | 							<children> | ||||||
| 								<TreeTableView fx:id="jobsTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="541.0" prefWidth="1346.0"> | 								<TreeTableView fx:id="jobsTreeTable" layoutX="11.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="541.0" prefWidth="1346.0"> | ||||||
|  | 									<placeholder> | ||||||
|  | 										<Label text="" /> | ||||||
|  | 									</placeholder> | ||||||
| 									<columns> | 									<columns> | ||||||
| 										<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="90.6666259765625" resizable="false" text="Betrag" /> | 										<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="85.0" resizable="false" sortable="false" text="Nummer" /> | ||||||
| 										<TreeTableColumn fx:id="columnState" editable="false" prefWidth="91.0" resizable="false" text="Zustand" /> | 										<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="160.0" resizable="false" sortable="false" text="Zeit" /> | ||||||
| 										<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="981.333251953125" resizable="false" sortable="false" text="Positionen" /> | 										<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="856.0" resizable="false" sortable="false" text="Positionen" /> | ||||||
| 										<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="99.666748046875" resizable="false" text="Zeit" /> | 										<TreeTableColumn fx:id="columnState" editable="false" prefWidth="116.0" resizable="false" sortable="false" text="Zustand" /> | ||||||
| 										<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="83.6666259765625" resizable="false" text="Nummer" /> | 										<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="103.0" resizable="false" sortable="false" text="Betrag" /> | ||||||
| 									</columns> | 									</columns> | ||||||
| 								</TreeTableView> | 								</TreeTableView> | ||||||
| 								<Button fx:id="btnReprintJob" layoutX="378.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnReprintJobAction" text="Ausgewählter Auftrag drucken"> | 								<Button fx:id="btnReprintJob" layoutX="378.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnReprintJobAction" text="Ausgewählter Auftrag drucken"> | ||||||
| @ -196,21 +291,21 @@ | |||||||
| 										<Font name="Cantarell Regular" size="17.0" /> | 										<Font name="Cantarell Regular" size="17.0" /> | ||||||
| 									</font> | 									</font> | ||||||
| 								</Button> | 								</Button> | ||||||
| 								<TitledPane fx:id="titlePaneStats" alignment="CENTER" collapsible="false" contentDisplay="CENTER" layoutX="992.0" layoutY="561.0" prefHeight="118.0" prefWidth="365.0" text="Statistik - 30.03.2018 15:15 Uhr"> | 								<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"> | ||||||
| 									<content> | 									<content> | ||||||
| 										<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="59.0" prefWidth="483.0"> | 										<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="92.0" prefWidth="414.0"> | ||||||
| 											<children> | 											<children> | ||||||
| 												<Label fx:id="lableJobCount" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="17.0" layoutY="2.0" prefHeight="34.0" prefWidth="340.0" text="Anzahl Aufträge: 2781"> | 												<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> | ||||||
| 														<Font name="Cantarell Regular" size="18.0" /> | 														<Font name="Cantarell Regular" size="18.0" /> | ||||||
| 													</font> | 													</font> | ||||||
| 												</Label> | 												</Label> | ||||||
| 												<Label fx:id="labelAvgJob" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="17.0" layoutY="30.0" prefHeight="34.0" prefWidth="340.0" text="Durchschnittlicher Auftragswert: 12,90€"> | 												<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> | ||||||
| 														<Font name="Cantarell Regular" size="18.0" /> | 														<Font name="Cantarell Regular" size="18.0" /> | ||||||
| 													</font> | 													</font> | ||||||
| 												</Label> | 												</Label> | ||||||
| 												<Label fx:id="lableAllValue" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="17.0" layoutY="60.0" prefHeight="34.0" prefWidth="340.0" text="Gesamt: 1088,48€"> | 												<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> | ||||||
| 														<Font name="Cantarell Regular" size="18.0" /> | 														<Font name="Cantarell Regular" size="18.0" /> | ||||||
| 													</font> | 													</font> | ||||||
| @ -233,15 +328,21 @@ | |||||||
| 						</AnchorPane> | 						</AnchorPane> | ||||||
| 					</content> | 					</content> | ||||||
| 				</Tab> | 				</Tab> | ||||||
| 				<Tab text="Neuer Auftrag"> | 				<Tab fx:id="tapNewJob" text="Neuer Auftrag"> | ||||||
| 					<content> | 					<content> | ||||||
| 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="850.0" prefWidth="1536.0"> | 						<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="850.0" prefWidth="1536.0"> | ||||||
| 							<children> | 							<children> | ||||||
| 								<TreeTableView fx:id="tableCurrentOrder" layoutX="15.0" layoutY="85.0" prefHeight="379.0" prefWidth="382.0"> | 								<TreeTableView fx:id="tableCurrentOrder" layoutX="15.0" layoutY="85.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="358.0" prefWidth="382.0"> | ||||||
|  | 									<placeholder> | ||||||
|  | 										<Label text="" /> | ||||||
|  | 									</placeholder> | ||||||
| 									<columns> | 									<columns> | ||||||
| 										<TreeTableColumn fx:id="columnPosition" editable="false" prefWidth="304.3333740234375" resizable="false" sortable="false" text="Position" /> | 										<TreeTableColumn fx:id="columnQuantity" editable="false" prefWidth="60.0" resizable="false" sortable="false" text="Anzahl" /> | ||||||
| 										<TreeTableColumn fx:id="columnQuantity" editable="false" prefWidth="80.6666259765625" resizable="false" sortable="false" text="Anzahl" /> | 										<TreeTableColumn fx:id="columnPosition" editable="false" prefWidth="320.0" resizable="false" sortable="false" text="Position" /> | ||||||
| 									</columns> | 									</columns> | ||||||
|  | 									<columnResizePolicy> | ||||||
|  | 										<TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | ||||||
|  | 									</columnResizePolicy> | ||||||
| 								</TreeTableView> | 								</TreeTableView> | ||||||
| 								<GridPane gridLinesVisible="true" layoutX="430.0" layoutY="15.0" prefHeight="670.0" prefWidth="920.0"> | 								<GridPane gridLinesVisible="true" layoutX="430.0" layoutY="15.0" prefHeight="670.0" prefWidth="920.0"> | ||||||
| 									<columnConstraints> | 									<columnConstraints> | ||||||
| @ -386,19 +487,19 @@ | |||||||
| 										</JFXButton> | 										</JFXButton> | ||||||
| 									</children> | 									</children> | ||||||
| 								</GridPane> | 								</GridPane> | ||||||
| 								<Button fx:id="btnPrintBill" contentDisplay="CENTER" defaultButton="true" graphicTextGap="1.0" layoutX="75.0" layoutY="599.0" maxHeight="88.0" minHeight="75.0" mnemonicParsing="false" onAction="#btnPrintBillAction" prefHeight="88.0" prefWidth="258.0" text="Drucken" wrapText="true"> | 								<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> | ||||||
| 										<Font name="Cantarell Bold" size="48.0" /> | 										<Font name="Cantarell Bold" size="48.0" /> | ||||||
| 									</font> | 									</font> | ||||||
| 								</Button> | 								</Button> | ||||||
| 								<Button fx:id="btnDeleteSelectedPosition" layoutX="43.0" layoutY="475.0" mnemonicParsing="false" onAction="#btnDeleteSelectedPositionAction" prefHeight="17.0" prefWidth="332.0" text="Ausgewählte Position löschen" textAlignment="CENTER"> | 								<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> | ||||||
| 										<Font name="Cantarell Regular" size="20.0" /> | 										<Font name="Cantarell Regular" size="20.0" /> | ||||||
| 									</font> | 									</font> | ||||||
| 								</Button> | 								</Button> | ||||||
| 								<Label fx:id="labelAllPrize" alignment="CENTER" contentDisplay="CENTER" layoutX="10.0" layoutY="505.0" prefHeight="15.0" prefWidth="386.0" text="0,00 €" textAlignment="CENTER"> | 								<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> | ||||||
| 										<Font name="Open Sans" size="70.0" /> | 										<Font name="Cantarell Regular" size="70.0" /> | ||||||
| 									</font> | 									</font> | ||||||
| 								</Label> | 								</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"> | 								<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"> | ||||||
| @ -411,7 +512,7 @@ | |||||||
| 										<Font name="Cantarell Regular" size="26.0" /> | 										<Font name="Cantarell Regular" size="26.0" /> | ||||||
| 									</font> | 									</font> | ||||||
| 								</Label> | 								</Label> | ||||||
| 								<JFXButton fx:id="btnLock" buttonType="RAISED" cancelButton="true" layoutX="1.0" layoutY="6.0" lineSpacing="2.0" onAction="#btnLockAction" prefHeight="42.0" prefWidth="180.0" ripplerFill="BLACK" text="Kasse sperren" textAlignment="CENTER" textFill="#c91c1c" textOverrun="LEADING_WORD_ELLIPSIS"> | 								<JFXButton fx:id="btnLock" buttonType="RAISED" layoutX="1.0" layoutY="6.0" lineSpacing="2.0" onAction="#btnLockAction" prefHeight="42.0" prefWidth="180.0" ripplerFill="BLACK" text="Kasse sperren" textAlignment="CENTER" textFill="#c91c1c" textOverrun="LEADING_WORD_ELLIPSIS"> | ||||||
| 									<font> | 									<font> | ||||||
| 										<Font name="Cantarell Regular" size="19.0" /> | 										<Font name="Cantarell Regular" size="19.0" /> | ||||||
| 									</font> | 									</font> | ||||||
| Before Width: | Height: | Size: 577 B |