use of system.Undo in project Money-Manager by krHasan.
the class TransactionHistoryController method mnuUndo.
@FXML
private void mnuUndo(ActionEvent event) {
String feedback = new Undo().actionUndo();
Stage TransactionHistoryStage = (Stage) btnSignOut.getScene().getWindow();
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("Action Successful");
alert.setHeaderText(null);
alert.setContentText(feedback);
alert.setX(TransactionHistoryStage.getX() + 190);
alert.setY(TransactionHistoryStage.getY() + 190);
initialize();
Timeline idlestage = new Timeline(new KeyFrame(Duration.seconds(2), new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
alert.hide();
}
}));
idlestage.setCycleCount(1);
idlestage.play();
alert.showAndWait();
}
use of system.Undo in project Money-Manager by krHasan.
the class MakeATransactionController method mnuUndo.
@FXML
private void mnuUndo(ActionEvent event) {
String feedback = new Undo().actionUndo();
Stage MakeATransactionStage = (Stage) btnSignOut.getScene().getWindow();
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("Action Successful");
alert.setHeaderText(null);
alert.setContentText(feedback);
alert.setX(MakeATransactionStage.getX() + 190);
alert.setY(MakeATransactionStage.getY() + 29);
// initialize();
gmInitialize();
exInitialize();
leInitialize();
bkInitialize();
rocInitialize();
perInitialize();
Timeline idlestage = new Timeline(new KeyFrame(Duration.seconds(3), new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
alert.hide();
}
}));
idlestage.setCycleCount(1);
idlestage.play();
alert.showAndWait();
}
Aggregations