Exemple #1
0
 @FXML
 private void restoreConfiguration() {
   if (DialogUtils.showDefaultConfigurationFileMissingChoice(
       "Restore defaults", mainPane.getScene().getWindow())) {
     loadConfigurationFileAndShowErrorWhenApplicable(
         ConfigurationManager.getDefaultConfigurationFile());
   }
 }
Exemple #2
0
  @FXML
  public void openMessageLog() {
    final FileChooser fileChooser = new FileChooser();
    fileChooser.setTitle("Select message log file to open");
    String extensions = "messages";
    fileChooser.setSelectedExtensionFilter(new ExtensionFilter("Message log file", extensions));

    final File selectedFile = fileChooser.showOpenDialog(getParentWindow());

    if (selectedFile != null) {
      final TaskWithProgressUpdater<List<BaseMqttMessage>> readAndProcess =
          new LogReaderTask(selectedFile, connectionManager, this);

      DialogUtils.showWorkerDialog(readAndProcess);

      new Thread(readAndProcess).start();
    }
  }