export_lbl_header.setText(RBLoader.ll("Here you can export or import your accounts and notes in Zip format or a readable JSON."));
export_btn_exzip.setText(RBLoader.ll("Export to Zip (MakiPass format)"));
export_btn_exjson.setText(RBLoader.ll("Export to JSON (readable format)"));
export_btn_exec.setText(RBLoader.ll("Import from Zip or JSON"));
export_btn_exzip.setGraphic(new ImageView(UtilityFX.getImage("arrow_up_24.png")));
export_btn_exzip.setOnAction((ActionEvent e) -> {
try {
File f = manager.openSaveFileChooser(getInitFile().toString());
if (f != null) {
manager.exportDataInZip(f);
manager.createPopupMessage("export_plugin_ok_operation")
.setHeader("")
.setContent("Export completed successfully.")
.setOkButton("Ok")
.setIcon(UtilityFX.getImage("info_24.png"))
.show();
}
} catch (Exception exc) {
exc(exc);
manager.createPopupMessage("export_plugin_err_operation")
.setHeader("Error.")
.setContent(exc.getMessage())
.setOkButton("Ok")
.setIcon(UtilityFX.getImage("info_24.png"))
.show();
}
});
export_btn_exjson.setGraphic(new ImageView(UtilityFX.getImage("arrow_up_24.png")));
export_btn_exjson.setOnAction((ActionEvent e) -> {
try {
File f = manager.openSaveFileChooser(getInitFile().toString());
if (f != null) {
manager.exportDataInClear(f);
manager.createPopupMessage("export_plugin_ok_operation")
.setHeader("")
.setContent("Export completed successfully.")
.setOkButton("Ok")
.setIcon(UtilityFX.getImage("info_24.png"))
.show();
}
} catch (Exception exc) {
exc(exc);
manager.createPopupMessage("export_plugin_err_operation")
.setHeader("Error.")
.setContent(exc.getMessage())
.setOkButton("Ok")
.setIcon(UtilityFX.getImage("info_24.png"))
.show();
}
});
export_btn_exec.setGraphic(new ImageView(UtilityFX.getImage("inbox_48.png")));
export_btn_exec.setOnAction((ActionEvent e) -> {
manager.createPopupMessage("export_plugin_question_operation", new AnswarePopupMessage() {
@Override
public void onOkAnsware() {