complete UI in 'Positionen'

This commit is contained in:
hendrik 2018-03-31 02:00:12 +02:00
parent 9da746d19b
commit 1c6c5ba72e
7 changed files with 186 additions and 34 deletions

Binary file not shown.

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXColorPicker?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
@ -23,14 +25,63 @@
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
<children>
<Button fx:id="ueberbtn" layoutX="676.0" layoutY="315.0" mnemonicParsing="false" onAction="#ueberbtnAction" text="Über" />
<Button fx:id="ueberbtn" layoutX="664.0" layoutY="325.0" mnemonicParsing="false" onAction="#ueberbtnAction" text="Über" />
</children>
</AnchorPane>
</content>
</Tab>
<Tab text="Positionen bearbeiten">
<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>
<TreeTableView fx:id="entryTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="502.0" prefWidth="1346.0">
<columns>
<TreeTableColumn fx:id="columnColor" editable="false" prefWidth="135.0" resizable="false" sortable="false" text="Farbe" />
<TreeTableColumn fx:id="columnPrize" editable="false" prefWidth="117.0" resizable="false" sortable="false" text="Preis" />
<TreeTableColumn fx:id="columnPositionsEdit" editable="false" prefWidth="1002.666748046875" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="3000.0" prefWidth="92.333251953125" resizable="false" sortable="false" text="Nummer" />
</columns>
</TreeTableView>
<Button fx:id="btnSaveEntry" layoutX="66.0" layoutY="620.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="437.0" layoutY="620.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" layoutX="160.0" layoutY="10.0" prefHeight="25.0" prefWidth="279.0" />
<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" layoutX="380.0" layoutY="50.0" prefHeight="25.0" prefWidth="58.0" />
<JFXColorPicker fx:id="colorChooser" layoutX="340.0" layoutY="90.0" />
<Label fx:id="lableNewColor" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="455.0" layoutY="90.0" prefHeight="34.0" prefWidth="105.0" text="Farbe:">
<font>
<Font name="Cantarell Regular" size="18.0" />
</font>
</Label>
</children>
</AnchorPane>
</content>
<font>
<Font name="Cantarell Regular" size="13.0" />
</font>
</TitledPane>
</children></AnchorPane>
</content>
</Tab>
<Tab text="Aufträge">
@ -39,19 +90,19 @@
<children>
<TreeTableView fx:id="jobsTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="541.0" prefWidth="1346.0">
<columns>
<TreeTableColumn fx:id="columnValue" editable="false" prefWidth="90.6666259765625" text="Betrag" />
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="91.0" text="Zustand" />
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="1140.333251953125" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="121.666748046875" text="Zeit" />
<TreeTableColumn fx:id="columnNumber" editable="false" prefWidth="72.333251953125" text="Nummer" />
<TreeTableColumn fx:id="columnValue" editable="false" prefWidth="90.6666259765625" resizable="false" text="Betrag" />
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="91.0" resizable="false" text="Zustand" />
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="981.333251953125" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="99.666748046875" resizable="false" text="Zeit" />
<TreeTableColumn fx:id="columnNumber" editable="false" maxWidth="3000.0" prefWidth="83.6666259765625" resizable="false" text="Nummer" />
</columns>
</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">
<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">
<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>
@ -74,7 +125,7 @@
</AnchorPane>
</content>
</TitledPane>
<Button fx:id="bntCancelJob" layoutX="44.0" layoutY="603.0" mnemonicParsing="false" onAction="#bntCancelJobAction" text="Ausgewählter Auftrag stonieren">
<Button fx:id="bntCancelJob" layoutX="44.0" layoutY="603.0" mnemonicParsing="false" onAction="#bntCancelJobAction" text="Ausgewählter Auftrag stornieren">
<font>
<Font name="Cantarell Regular" size="17.0" />
</font>

View File

@ -53,8 +53,8 @@ public class Main extends Application
AnchorPane pane = loader.load();
// Test
//Test
primaryStage.setWidth(1366);
primaryStage.setHeight(732);
//primaryStage.setWidth(1366);
//primaryStage.setHeight(732);
primaryStage.setTitle("jFxKasse"); // Title der Stage
mwc = loader.getController();

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXColorPicker?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
@ -23,14 +25,63 @@
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
<children>
<Button fx:id="ueberbtn" layoutX="676.0" layoutY="315.0" mnemonicParsing="false" onAction="#ueberbtnAction" text="Über" />
<Button fx:id="ueberbtn" layoutX="664.0" layoutY="325.0" mnemonicParsing="false" onAction="#ueberbtnAction" text="Über" />
</children>
</AnchorPane>
</content>
</Tab>
<Tab text="Positionen bearbeiten">
<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>
<TreeTableView fx:id="entryTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="502.0" prefWidth="1346.0">
<columns>
<TreeTableColumn fx:id="columnColor" editable="false" prefWidth="135.0" resizable="false" sortable="false" text="Farbe" />
<TreeTableColumn fx:id="columnPrize" editable="false" prefWidth="117.0" resizable="false" sortable="false" text="Preis" />
<TreeTableColumn fx:id="columnPositionsEdit" editable="false" prefWidth="1002.666748046875" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnPosnumber" editable="false" maxWidth="3000.0" prefWidth="92.333251953125" resizable="false" sortable="false" text="Nummer" />
</columns>
</TreeTableView>
<Button fx:id="btnSaveEntry" layoutX="66.0" layoutY="620.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="437.0" layoutY="620.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" layoutX="160.0" layoutY="10.0" prefHeight="25.0" prefWidth="279.0" />
<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" layoutX="380.0" layoutY="50.0" prefHeight="25.0" prefWidth="58.0" />
<JFXColorPicker fx:id="colorChooser" layoutX="340.0" layoutY="90.0" />
<Label fx:id="lableNewColor" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="455.0" layoutY="90.0" prefHeight="34.0" prefWidth="105.0" text="Farbe:">
<font>
<Font name="Cantarell Regular" size="18.0" />
</font>
</Label>
</children>
</AnchorPane>
</content>
<font>
<Font name="Cantarell Regular" size="13.0" />
</font>
</TitledPane>
</children></AnchorPane>
</content>
</Tab>
<Tab text="Aufträge">
@ -39,19 +90,19 @@
<children>
<TreeTableView fx:id="jobsTreeTable" layoutX="11.0" layoutY="10.0" prefHeight="541.0" prefWidth="1346.0">
<columns>
<TreeTableColumn fx:id="columnValue" editable="false" prefWidth="90.6666259765625" text="Betrag" />
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="91.0" text="Zustand" />
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="1140.333251953125" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="121.666748046875" text="Zeit" />
<TreeTableColumn fx:id="columnNumber" editable="false" prefWidth="72.333251953125" text="Nummer" />
<TreeTableColumn fx:id="columnValue" editable="false" prefWidth="90.6666259765625" resizable="false" text="Betrag" />
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="91.0" resizable="false" text="Zustand" />
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="981.333251953125" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="99.666748046875" resizable="false" text="Zeit" />
<TreeTableColumn fx:id="columnNumber" editable="false" maxWidth="3000.0" prefWidth="83.6666259765625" resizable="false" text="Nummer" />
</columns>
</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">
<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">
<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>
@ -74,7 +125,7 @@
</AnchorPane>
</content>
</TitledPane>
<Button fx:id="bntCancelJob" layoutX="44.0" layoutY="603.0" mnemonicParsing="false" onAction="#bntCancelJobAction" text="Ausgewählter Auftrag stonieren">
<Button fx:id="bntCancelJob" layoutX="44.0" layoutY="603.0" mnemonicParsing="false" onAction="#bntCancelJobAction" text="Ausgewählter Auftrag stornieren">
<font>
<Font name="Cantarell Regular" size="17.0" />
</font>

View File

@ -14,6 +14,7 @@ import javafx.scene.control.TreeTableView;
import javafx.scene.control.TextField;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TitledPane;
import com.jfoenix.controls.JFXColorPicker;
import java.awt.Desktop;
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
@ -85,6 +86,25 @@ public class MainWindowController
private TreeTableColumn<tableData, Integer> idSpalte02 = new TreeTableColumn<>(
"");
@FXML
private TreeTableView<tableData> entryTreeTable;
@FXML
private TreeTableColumn<tableData, String> columnColor;
@FXML
private TreeTableColumn<tableData, String> columnPrize;
@FXML
private TreeTableColumn<tableData, String> columnPositionsEdit;
@FXML
private TreeTableColumn<tableData, String> columnPosnumber;
@FXML
private TreeTableColumn<tableData, Integer> idSpalte03 = new TreeTableColumn<>(
"");
@FXML
private Button ueberbtn;
@ -181,6 +201,12 @@ public class MainWindowController
@FXML
private Button btnCalcStats;
@FXML
private Button btnSaveEntry;
@FXML
private Button btnClearEntry;
@FXML
private Label labelAllPrize;
@ -199,9 +225,27 @@ public class MainWindowController
@FXML
private Label lableAllValue;
@FXML
private Label lableNewPosition;
@FXML
private Label labelNewValue;
@FXML
private Label lableNewColor;
@FXML
private TitledPane titlePaneStats;
@FXML
private TextField tftNewPosition;
@FXML
private TextField tftNewValue;
@FXML
private JFXColorPicker colorChooser;
private Main main;
private DBController dbc;
@ -225,8 +269,8 @@ public class MainWindowController
// Erstellt einen Dialog
Dialog<Pair<String, String>> dialog = new Dialog<>();
dialog.setTitle("Über PWMaster");
dialog.setHeaderText("Informationen und Lizenzen - Version 0.5");
dialog.setTitle("Über jFxKasse");
dialog.setHeaderText("Informationen und Lizenzen - Version 0.7 - UI Techdemo");
// Erzeugt den Button
dialog.getDialogPane().getButtonTypes().addAll(ButtonType.OK);
@ -238,19 +282,28 @@ public class MainWindowController
grid.setPadding(new Insets(20, 150, 10, 10));
grid.add(new Label("Datenbank: sqlite.org - Public Domain"
+ "\nBASE64Decoder: java2s.com/Code/Jar/s/DownloadsunmiscBASE64Decoderjar.htm - GPLv2"
+ "\nCrypo: blog.axxg.de/ - Copyright 2013 AxxG Alexander Grösel"
+ " \nzwei Faktoren: github.com/j256/two-factor-auth - ISC License"
+ " \nUI Design: eclipse.org/efxclipse/install.html - Eclipse Public License 1.0"
+ " \nUI - Datenbank Integration: basierend auf Project-HomeFlix - github.com/Seil0/Project-HomeFlix - GPLv3 \n"
+ " \nMaintainer: hendrik.schutter@icloud.com"
+ " \n(c) 2017 Hendrik Schutter"), 0, 0);
+ " \nMaintainer: hendrik.schutter@coptersicht.de"
+ " \n(c) 2018 Hendrik Schutter"), 0, 0);
dialog.getDialogPane().setContent(grid); // Setzt die GridPane auf die
// DialogPane
dialog.setResizable(true); // DialogPane
dialog.showAndWait();
}
@FXML
public void btnSaveEntryAction(ActionEvent event)
{
System.out.println("Button!");
}
@FXML
public void btnClearEntryAction(ActionEvent event)
{
System.out.println("Button!");
}
@FXML
public void btnCalcStatsAction(ActionEvent event)
{
@ -442,7 +495,7 @@ public class MainWindowController
public void fuelleTablle()
{ // Lädt die Datenbank in die Tabelle
//dbc.setSchluessel(schluessel);
// dbc.setSchluessel(schluessel);
for (int i = 0; i < dbc.ladeTabelle().size(); i++) {
tableData helpTableData = new tableData(
dbc.ladeTabelle().get(i).getID(),
@ -477,7 +530,6 @@ public class MainWindowController
int selected = tableCurrentOrder.getSelectionModel()
.getSelectedIndex(); // get selected item
id = idSpalte01.getCellData(selected); // Ausgewählte Spalte
try { // Setzt den entschlüsselten Inhalt in die Textfelder
// tf01.setText("Verschlüsseltes Passwort von " +
@ -554,8 +606,6 @@ public class MainWindowController
}
}
public void starteDB()
{ // Startet die Datenbank
dbc.verbindeDatenbank();