Browse Source

ui fixes and bill layout improvements

master
Hendrik Schutter 4 years ago
parent
commit
5c9d54dabf
  1. 2
      pom.xml
  2. 18
      src/main/java/com/jFxKasse/controller/MainWindowController.java
  3. 3
      src/main/java/com/jFxKasse/datatypes/Job.java
  4. 2
      src/main/java/com/jFxKasse/datatypes/PrintDataSimple.java
  5. 4
      src/main/java/com/jFxKasse/datatypes/PrintDataSplitted.java
  6. 14
      src/main/resources/fxml/MainWindow.fxml

2
pom.xml

@ -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>

18
src/main/java/com/jFxKasse/controller/MainWindowController.java

@ -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();
}
}
});

3
src/main/java/com/jFxKasse/datatypes/Job.java

@ -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()

2
src/main/java/com/jFxKasse/datatypes/PrintDataSimple.java

@ -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";
}

4
src/main/java/com/jFxKasse/datatypes/PrintDataSplitted.java

@ -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";
}

14
src/main/resources/fxml/MainWindow.fxml

@ -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">

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close