|
29 | 29 | import org.springframework.stereotype.Component; |
30 | 30 |
|
31 | 31 | import de.doubleslash.keeptime.ApplicationProperties; |
32 | | -import de.doubleslash.keeptime.common.BrowserHelper; |
33 | | -import de.doubleslash.keeptime.common.FileOpenHelper; |
34 | | -import de.doubleslash.keeptime.common.Licenses; |
35 | | -import de.doubleslash.keeptime.common.OS; |
36 | | -import de.doubleslash.keeptime.common.Resources; |
| 32 | +import de.doubleslash.keeptime.common.*; |
37 | 33 | import de.doubleslash.keeptime.common.Resources.RESOURCE; |
38 | | -import de.doubleslash.keeptime.common.SvgNodeProvider; |
39 | 34 | import de.doubleslash.keeptime.controller.Controller; |
40 | 35 | import de.doubleslash.keeptime.model.Model; |
41 | 36 | import de.doubleslash.keeptime.model.Settings; |
|
45 | 40 | import javafx.collections.ObservableList; |
46 | 41 | import javafx.fxml.FXML; |
47 | 42 | import javafx.fxml.FXMLLoader; |
48 | | -import javafx.scene.control.Alert; |
| 43 | +import javafx.scene.control.*; |
49 | 44 | import javafx.scene.control.Alert.AlertType; |
50 | | -import javafx.scene.control.Button; |
51 | | -import javafx.scene.control.ButtonType; |
52 | | -import javafx.scene.control.CheckBox; |
53 | | -import javafx.scene.control.ColorPicker; |
54 | | -import javafx.scene.control.Hyperlink; |
55 | | -import javafx.scene.control.Label; |
56 | | -import javafx.scene.control.TableCell; |
57 | | -import javafx.scene.control.TableColumn; |
58 | | -import javafx.scene.control.TableView; |
59 | 45 | import javafx.scene.control.cell.PropertyValueFactory; |
60 | | -import javafx.scene.input.MouseButton; |
61 | 46 | import javafx.scene.image.Image; |
| 47 | +import javafx.scene.input.MouseButton; |
62 | 48 | import javafx.scene.layout.AnchorPane; |
63 | 49 | import javafx.scene.layout.Region; |
64 | 50 | import javafx.scene.paint.Color; |
@@ -378,12 +364,13 @@ private void initImportButton() { |
378 | 364 |
|
379 | 365 | confirmationAlert.setTitle("Import"); |
380 | 366 | confirmationAlert.setHeaderText("Do you want to Override current Data ?"); |
381 | | - confirmationAlert.setContentText( |
382 | | - "Import previously exported .sql file. This will overwrite the currently used database contents - all current data will be lost!\n" |
383 | | - + "\n" |
384 | | - + "If you do not have a .sql file yet you need to open the previous version of KeepTime and in the settings dialog press \"Export\".\n" |
385 | | - + "\n" |
386 | | - + "You will need to restart the application after this action. If you proceed you need to select the previous exported .sql file."); |
| 367 | + confirmationAlert.getDialogPane() |
| 368 | + .setContent(new Label( |
| 369 | + "Import previously exported .sql file. This will overwrite the currently used database contents - all current data will be lost!\n" |
| 370 | + + "\n" |
| 371 | + + "If you do not have a .sql file yet you need to open the previous version of KeepTime and in the settings dialog press \"Export\".\n" |
| 372 | + + "\n" |
| 373 | + + "You will need to restart the application after this action. If you proceed you need to select the previous exported .sql file.")); |
387 | 374 | confirmationAlert.showAndWait(); |
388 | 375 |
|
389 | 376 | if (confirmationAlert.getResult() == ButtonType.NO) { |
@@ -415,8 +402,9 @@ private void initImportButton() { |
415 | 402 |
|
416 | 403 | informationDialog.setTitle("Import done"); |
417 | 404 | informationDialog.setHeaderText("The data was imported."); |
418 | | - informationDialog.setContentText( |
419 | | - "KeepTime will now be CLOSED! You have to RESTART it again to see the changes"); |
| 405 | + informationDialog.getDialogPane() |
| 406 | + .setContent(new Label("KeepTime will now be CLOSED!\n" |
| 407 | + + "You have to RESTART it again to see the changes")); |
420 | 408 | informationDialog.showAndWait(); |
421 | 409 | Platform.exit(); |
422 | 410 |
|
@@ -464,8 +452,7 @@ private void initExportButton() { |
464 | 452 | Alert informationDialog = new Alert(AlertType.INFORMATION); |
465 | 453 | informationDialog.setTitle("Export done"); |
466 | 454 | informationDialog.setHeaderText("The current data was exported."); |
467 | | - informationDialog.setContentText("The data was exported to '" + fileToSave + "'."); |
468 | | - |
| 455 | + informationDialog.getDialogPane().setContent(new Label("The data was exported to '\n" + fileToSave + "'.")); |
469 | 456 | informationDialog.showAndWait(); |
470 | 457 | } catch (final SQLException e) { |
471 | 458 | LOG.error("Could not export db to script file.", e); |
|
0 commit comments