Browse Source

scroll bar is now on right side

master
Hendrik Schutter 4 years ago
parent
commit
25bedae873
  1. 93
      src/main/java/com/jFxKasse/datatypes/PrintDataSplitted.java
  2. 22
      src/main/resources/fxml/MainWindow.fxml

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

@ -0,0 +1,93 @@
package com.jFxKasse.datatypes;
public class PrintDataSplitted 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 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 Print String
*/
public String getPrintString()
{
generatePrintString();
return this.printString;
}
@Override
protected void generatePrintString()
{
/* Header */
String header = "\n";
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 = positionenQuantity.length()
- positionenQuantity.replace(";", "").length() + 1;
String[] positionQuantity = positionenQuantity.split(";");
String[] positionName = positionenName.split(";");
String[] positionValue = positionenValue.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;
}
}

22
src/main/resources/fxml/MainWindow.fxml

@ -171,16 +171,16 @@
<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">
<TreeTableView fx:id="entryTreeTable" layoutX="11.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="502.0" prefWidth="1346.0">
<placeholder>
<Label text="" />
</placeholder>
<columns>
<TreeTableColumn fx:id="columnColor" editable="false" maxWidth="428.0" minWidth="119.333251953125" prefWidth="119.333251953125" resizable="false" sortable="false" text="Farbe" />
<TreeTableColumn fx:id="columnCat" editable="false" maxWidth="800.0" minWidth="94.0" prefWidth="300.0" resizable="false" sortable="false" text="Kategorie" />
<TreeTableColumn fx:id="columnPrize" editable="false" maxWidth="693.3333129882812" minWidth="44.33331298828125" prefWidth="140.33331298828125" resizable="false" sortable="false" text="Preis" />
<TreeTableColumn fx:id="columnPositionsEdit" editable="false" maxWidth="1581.6666870117188" minWidth="38.0" prefWidth="596.333251953125" 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="columnPositionsEdit" editable="false" maxWidth="1581.6666870117188" minWidth="38.0" prefWidth="596.333251953125" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnPrize" editable="false" maxWidth="693.3333129882812" minWidth="44.33331298828125" prefWidth="140.33331298828125" resizable="false" sortable="false" text="Preis" />
<TreeTableColumn fx:id="columnCat" editable="false" maxWidth="800.0" minWidth="94.0" prefWidth="300.0" resizable="false" sortable="false" text="Kategorie" />
<TreeTableColumn fx:id="columnColor" editable="false" maxWidth="428.0" minWidth="119.333251953125" prefWidth="119.333251953125" resizable="false" sortable="false" text="Farbe" />
</columns>
<columnResizePolicy>
<TreeTableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
@ -247,16 +247,16 @@
<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">
<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>
<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="111.0" resizable="false" text="Betrag" />
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="101.0" resizable="false" text="Zustand" />
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="861.0" resizable="false" sortable="false" text="Positionen" />
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="159.0" resizable="false" text="Zeit" />
<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="110.666748046875" resizable="false" text="Nummer" />
<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="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" />
</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