Update dependencies and build system #2
@ -211,6 +211,9 @@ public class MainWindowController {
|
|||||||
@FXML
|
@FXML
|
||||||
public Button btnDeleteSelectedPosition;
|
public Button btnDeleteSelectedPosition;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
public Button btnDeleteAllPositions;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public Button btnPrintBill;
|
public Button btnPrintBill;
|
||||||
|
|
||||||
@ -581,6 +584,7 @@ public class MainWindowController {
|
|||||||
isPrintBtnDisabled = true;
|
isPrintBtnDisabled = true;
|
||||||
tapPosEdit.setDisable(false);
|
tapPosEdit.setDisable(false);
|
||||||
btnDeleteSelectedPosition.setDisable(true);
|
btnDeleteSelectedPosition.setDisable(true);
|
||||||
|
btnDeleteAllPositions.setDisable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!currentJob.existsPosName(currentOrderPosName)) {
|
if (!currentJob.existsPosName(currentOrderPosName)) {
|
||||||
@ -588,6 +592,21 @@ public class MainWindowController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
public void btnDeleteAllPositionsAction(ActionEvent event) {
|
||||||
|
// Clear all positions from current job
|
||||||
|
rootCurrentJob.getChildren().remove(0, rootCurrentJob.getChildren().size());
|
||||||
|
currentJob.clearAllPositions();
|
||||||
|
|
||||||
|
// Reset UI state
|
||||||
|
setJobPrizeLabel(0);
|
||||||
|
btnPrintBill.setDisable(true);
|
||||||
|
isPrintBtnDisabled = true;
|
||||||
|
tapPosEdit.setDisable(false);
|
||||||
|
btnDeleteSelectedPosition.setDisable(true);
|
||||||
|
btnDeleteAllPositions.setDisable(true);
|
||||||
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void btnPrintBillAction(ActionEvent event) {
|
public void btnPrintBillAction(ActionEvent event) {
|
||||||
btnPrintBill.setDisable(true);
|
btnPrintBill.setDisable(true);
|
||||||
@ -783,6 +802,7 @@ public class MainWindowController {
|
|||||||
btnReprintJob.setDisable(true);
|
btnReprintJob.setDisable(true);
|
||||||
btnCancelJob.setDisable(true);
|
btnCancelJob.setDisable(true);
|
||||||
btnDeleteSelectedPosition.setDisable(true);
|
btnDeleteSelectedPosition.setDisable(true);
|
||||||
|
btnDeleteAllPositions.setDisable(true);
|
||||||
tapJobs.setDisable(true);
|
tapJobs.setDisable(true);
|
||||||
btnOpenFolder.setFocusTraversable(false);
|
btnOpenFolder.setFocusTraversable(false);
|
||||||
ueberbtn.setFocusTraversable(false);
|
ueberbtn.setFocusTraversable(false);
|
||||||
@ -1077,12 +1097,14 @@ public class MainWindowController {
|
|||||||
// Print was not disabled and will be enabled again
|
// Print was not disabled and will be enabled again
|
||||||
btnPrintBill.setDisable(pState);
|
btnPrintBill.setDisable(pState);
|
||||||
btnDeleteSelectedPosition.setDisable(pState);
|
btnDeleteSelectedPosition.setDisable(pState);
|
||||||
|
btnDeleteAllPositions.setDisable(pState);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pState) {
|
if (pState) {
|
||||||
// Always disable
|
// Always disable
|
||||||
btnPrintBill.setDisable(pState);
|
btnPrintBill.setDisable(pState);
|
||||||
btnDeleteSelectedPosition.setDisable(pState);
|
btnDeleteSelectedPosition.setDisable(pState);
|
||||||
|
btnDeleteAllPositions.setDisable(pState);
|
||||||
}
|
}
|
||||||
|
|
||||||
btnReprintJob.setDisable(pState);
|
btnReprintJob.setDisable(pState);
|
||||||
@ -1209,6 +1231,7 @@ public class MainWindowController {
|
|||||||
btnPrintBill.setDisable(false);
|
btnPrintBill.setDisable(false);
|
||||||
isPrintBtnDisabled = false;
|
isPrintBtnDisabled = false;
|
||||||
tapPosEdit.setDisable(true);
|
tapPosEdit.setDisable(true);
|
||||||
|
btnDeleteAllPositions.setDisable(false);
|
||||||
|
|
||||||
rootCurrentJob.getChildren().remove(0, rootCurrentJob.getChildren().size());
|
rootCurrentJob.getChildren().remove(0, rootCurrentJob.getChildren().size());
|
||||||
|
|
||||||
|
|||||||
@ -161,6 +161,14 @@ public class Job {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearAllPositions() {
|
||||||
|
positionenQuantity.clear();
|
||||||
|
positionenName.clear();
|
||||||
|
positionenValue.clear();
|
||||||
|
positionenCat.clear();
|
||||||
|
jobvalue = 0;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean existsPosName(String pPosName) {
|
public boolean existsPosName(String pPosName) {
|
||||||
for (int i = 0; i < positionenName.size(); i++) {
|
for (int i = 0; i < positionenName.size(); i++) {
|
||||||
if (positionenName.get(i).equals(pPosName)) {
|
if (positionenName.get(i).equals(pPosName)) {
|
||||||
|
|||||||
@ -511,7 +511,12 @@
|
|||||||
<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="458.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="438.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>
|
||||||
|
<Button fx:id="btnDeleteAllPositions" layoutX="43.0" layoutY="473.0" mnemonicParsing="false" onAction="#btnDeleteAllPositionsAction" prefHeight="17.0" prefWidth="332.0" text="Alle Positionen löschen" textAlignment="CENTER">
|
||||||
<font>
|
<font>
|
||||||
<Font name="Cantarell Regular" size="20.0"/>
|
<Font name="Cantarell Regular" size="20.0"/>
|
||||||
</font>
|
</font>
|
||||||
|
|||||||
Reference in New Issue
Block a user