ui fixes and bill layout improvements

This commit is contained in:
Hendrik Schutter 2018-12-07 11:25:45 +01:00
parent 96d5968fef
commit 5c9d54dabf
6 changed files with 24 additions and 19 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com</groupId>
<artifactId>jFxKasse</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
<name>jFxKasse</name>
<dependencies>

View File

@ -378,7 +378,7 @@ public class MainWindowController
// creates a dialog
Dialog<Pair<String, String>> dialog = new Dialog<>();
dialog.setTitle("Über jFxKasse");
dialog.setHeaderText("Informationen und Lizenzen - Version 0.3.0");
dialog.setHeaderText("Informationen und Lizenzen - Version 0.3.1");
dialog.getDialogPane().getButtonTypes().addAll(ButtonType.OK);
@ -398,8 +398,8 @@ public class MainWindowController
+ " \n(c) 2018 Hendrik Schutter"),
0, 0);
dialog.getDialogPane().setContent(grid); // Setzt die GridPane auf die
dialog.setResizable(true); // DialogPane
dialog.getDialogPane().setContent(grid);
dialog.setResizable(true);
dialog.showAndWait();
}
@ -837,8 +837,11 @@ public class MainWindowController
public void changed(ObservableValue<? extends Number> ov,
Number value, Number new_value)
{
selectedCatName = catChoise.getItems().get((int) new_value)
.toString();
try {
selectedCatName = catChoise.getItems().get((int) new_value)
.toString();
} catch (Exception e) {
}
}
});
@ -964,9 +967,8 @@ public class MainWindowController
int selected = entryTreeTable.getSelectionModel()
.getSelectedIndex(); // get selected item
idPositionen = columnPosnumber.getCellData(selected);
try {
idPositionen = columnPosnumber.getCellData(selected);
tftNewPosition
.setText(dbc.getName_Positionen(idPositionen));
tftNewValue.setText(dbc.getValue_Positionen(idPositionen));
@ -978,7 +980,7 @@ public class MainWindowController
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
// e.printStackTrace();
}
}
});

View File

@ -1,5 +1,6 @@
package com.jFxKasse.datatypes;
import java.math.BigDecimal;
import java.util.ArrayList;
public class Job
@ -109,6 +110,8 @@ public class Job
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()

View File

@ -35,7 +35,7 @@ public class PrintDataSimple extends PrintData
protected void generatePrintString()
{
/* Header */
String header = "\n";
String header = " ";
for (int i = 1; i < headerSpace; i++) {
header = header + "\n";
}

View File

@ -43,7 +43,7 @@ public class PrintDataSplitted extends PrintData
String firstBill;
/* Header */
String header = "\n";
String header = "-";
for (int i = 1; i < headerSpace; i++) {
header = header + "\n";
}
@ -107,7 +107,7 @@ public class PrintDataSplitted extends PrintData
String thisBill;
/* Header */
header = "\n";
header = " ";
for (int o = 1; o < headerSpace; o++) {
header = header + "\n";
}

View File

@ -131,7 +131,7 @@
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="327.0" prefWidth="564.0">
<children>
<ChoiceBox fx:id="printerChoise" layoutX="270.0" layoutY="10.0" prefHeight="25.0" prefWidth="178.0" />
<ChoiceBox fx:id="printerChoise" layoutX="270.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="178.0" />
<Spinner fx:id="linesSpinner" layoutX="35.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="92.0" />
<JFXTextField fx:id="tftheader" alignment="CENTER" layoutX="65.0" layoutY="90.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="377.0">
<font>
@ -247,13 +247,13 @@
<Font name="Cantarell Regular" size="18.0" />
</font>
</Label>
<ChoiceBox fx:id="colorChoise" layoutX="340.0" layoutY="90.0" prefHeight="25.0" prefWidth="169.0" />
<ChoiceBox fx:id="colorChoise" layoutX="340.0" layoutY="90.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="169.0" />
<Label fx:id="labelSelectCat" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="185.0" layoutY="10.0" prefHeight="34.0" prefWidth="105.0" text="Kategorie:">
<font>
<Font name="Cantarell Regular" size="18.0" />
</font>
</Label>
<ChoiceBox fx:id="catChoise" layoutX="16.0" layoutY="10.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" />
<Button fx:id="btnSaveEntry" layoutX="23.0" layoutY="86.0" mnemonicParsing="false" onAction="#btnSaveEntryAction" text="Ausgewählten Eintrag speichern">
<font>
<Font name="Cantarell Regular" size="17.0" />
@ -279,11 +279,11 @@
<Label text="" />
</placeholder>
<columns>
<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="85.0" resizable="false" text="Nummer" />
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="160.0" resizable="false" text="Zeit" />
<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="85.0" resizable="false" sortable="false" text="Nummer" />
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="160.0" resizable="false" sortable="false" text="Zeit" />
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="856.0" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="116.0" resizable="false" text="Zustand" />
<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="103.0" resizable="false" text="Betrag" />
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="116.0" resizable="false" sortable="false" text="Zustand" />
<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="103.0" resizable="false" sortable="false" text="Betrag" />
</columns>
</TreeTableView>
<Button fx:id="btnReprintJob" layoutX="378.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnReprintJobAction" text="Ausgewählter Auftrag drucken">