fix(ui): prevent button text truncation across all dialogs with USE_PREF_SIZE and sizeToScene
This commit is contained in:
+13
-4
@@ -41,7 +41,6 @@ public class A1PasswordDialog {
|
|||||||
VBox root = new VBox(16);
|
VBox root = new VBox(16);
|
||||||
root.getStyleClass().add("dialog-container");
|
root.getStyleClass().add("dialog-container");
|
||||||
root.setPadding(new Insets(24));
|
root.setPadding(new Insets(24));
|
||||||
root.setPrefWidth(440);
|
|
||||||
|
|
||||||
Label header = new Label("IMPORTAR CERTIFICADO A1");
|
Label header = new Label("IMPORTAR CERTIFICADO A1");
|
||||||
header.getStyleClass().add("dialog-header");
|
header.getStyleClass().add("dialog-header");
|
||||||
@@ -70,14 +69,19 @@ public class A1PasswordDialog {
|
|||||||
actionsRow.setAlignment(Pos.CENTER_RIGHT);
|
actionsRow.setAlignment(Pos.CENTER_RIGHT);
|
||||||
|
|
||||||
Button btnCancel = new Button("Cancelar");
|
Button btnCancel = new Button("Cancelar");
|
||||||
btnCancel.getStyleClass().add("btn-secondary");
|
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
|
btnCancel.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnCancel.setOnAction(e -> {
|
btnCancel.setOnAction(e -> {
|
||||||
passwordFuture.complete(null);
|
passwordFuture.complete(null);
|
||||||
stage.close();
|
stage.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
HBox spacer = new HBox();
|
||||||
|
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||||
|
|
||||||
Button btnConfirm = new Button("Importar");
|
Button btnConfirm = new Button("Importar");
|
||||||
btnConfirm.getStyleClass().add("btn-primary");
|
btnConfirm.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||||
|
btnConfirm.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnConfirm.setDefaultButton(true);
|
btnConfirm.setDefaultButton(true);
|
||||||
btnConfirm.setOnAction(e -> {
|
btnConfirm.setOnAction(e -> {
|
||||||
String text = passwordField.getText();
|
String text = passwordField.getText();
|
||||||
@@ -85,7 +89,7 @@ public class A1PasswordDialog {
|
|||||||
stage.close();
|
stage.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
actionsRow.getChildren().addAll(btnCancel, btnConfirm);
|
actionsRow.getChildren().addAll(btnCancel, spacer, btnConfirm);
|
||||||
|
|
||||||
root.getChildren().addAll(header, desc, fileBox, inputGroup, actionsRow);
|
root.getChildren().addAll(header, desc, fileBox, inputGroup, actionsRow);
|
||||||
|
|
||||||
@@ -93,6 +97,7 @@ public class A1PasswordDialog {
|
|||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
|
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
stage.setOnCloseRequest(e -> passwordFuture.complete(null));
|
stage.setOnCloseRequest(e -> passwordFuture.complete(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,4 +105,8 @@ public class A1PasswordDialog {
|
|||||||
stage.show();
|
stage.show();
|
||||||
return passwordFuture;
|
return passwordFuture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-1
@@ -95,20 +95,25 @@ public class ApplicationApprovalDialog {
|
|||||||
|
|
||||||
Button btnReject = new Button("Recusar Acesso");
|
Button btnReject = new Button("Recusar Acesso");
|
||||||
btnReject.getStyleClass().addAll("btn-danger-outline", "btn-dialog");
|
btnReject.getStyleClass().addAll("btn-danger-outline", "btn-dialog");
|
||||||
|
btnReject.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnReject.setOnAction(e -> {
|
btnReject.setOnAction(e -> {
|
||||||
approvalFuture.complete(false);
|
approvalFuture.complete(false);
|
||||||
stage.close();
|
stage.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
HBox spacer = new HBox();
|
||||||
|
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||||
|
|
||||||
Button btnAuthorize = new Button("Autorizar Conexão");
|
Button btnAuthorize = new Button("Autorizar Conexão");
|
||||||
btnAuthorize.getStyleClass().addAll("btn-primary", "btn-dialog");
|
btnAuthorize.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||||
|
btnAuthorize.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnAuthorize.setDefaultButton(true);
|
btnAuthorize.setDefaultButton(true);
|
||||||
btnAuthorize.setOnAction(e -> {
|
btnAuthorize.setOnAction(e -> {
|
||||||
approvalFuture.complete(true);
|
approvalFuture.complete(true);
|
||||||
stage.close();
|
stage.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
actionsRow.getChildren().addAll(btnReject, btnAuthorize);
|
actionsRow.getChildren().addAll(btnReject, spacer, btnAuthorize);
|
||||||
|
|
||||||
root.getChildren().addAll(header, detailsBox, secWarning, actionsRow);
|
root.getChildren().addAll(header, detailsBox, secWarning, actionsRow);
|
||||||
|
|
||||||
@@ -116,6 +121,7 @@ public class ApplicationApprovalDialog {
|
|||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
|
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
stage.setOnCloseRequest(e -> approvalFuture.complete(false));
|
stage.setOnCloseRequest(e -> approvalFuture.complete(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,4 +130,8 @@ public class ApplicationApprovalDialog {
|
|||||||
stage.toFront();
|
stage.toFront();
|
||||||
return approvalFuture;
|
return approvalFuture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-3
@@ -245,6 +245,7 @@ public final class BatchSigningDialog {
|
|||||||
|
|
||||||
btnChooseOutputDir = new Button("Selecionar...");
|
btnChooseOutputDir = new Button("Selecionar...");
|
||||||
btnChooseOutputDir.getStyleClass().add("btn-secondary");
|
btnChooseOutputDir.getStyleClass().add("btn-secondary");
|
||||||
|
btnChooseOutputDir.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnChooseOutputDir.setOnAction(e -> handleChooseOutputDir());
|
btnChooseOutputDir.setOnAction(e -> handleChooseOutputDir());
|
||||||
|
|
||||||
outputRow.getChildren().addAll(lblOutput, txtOutputDir, btnChooseOutputDir);
|
outputRow.getChildren().addAll(lblOutput, txtOutputDir, btnChooseOutputDir);
|
||||||
@@ -266,16 +267,21 @@ public final class BatchSigningDialog {
|
|||||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||||
|
|
||||||
Button btnClose = new Button("Fechar");
|
Button btnClose = new Button("Fechar");
|
||||||
btnClose.getStyleClass().add("btn-secondary");
|
btnClose.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
|
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnClose.setOnAction(e -> {
|
btnClose.setOnAction(e -> {
|
||||||
if (!isRunning) stage.close();
|
if (!isRunning) stage.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
HBox spacer = new HBox();
|
||||||
|
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||||
|
|
||||||
btnStart = new Button("Iniciar Assinatura em Lote");
|
btnStart = new Button("Iniciar Assinatura em Lote");
|
||||||
btnStart.getStyleClass().add("btn-primary");
|
btnStart.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||||
|
btnStart.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnStart.setOnAction(e -> startBatchSigning());
|
btnStart.setOnAction(e -> startBatchSigning());
|
||||||
|
|
||||||
footer.getChildren().addAll(btnClose, btnStart);
|
footer.getChildren().addAll(btnClose, spacer, btnStart);
|
||||||
|
|
||||||
root.getChildren().addAll(header, fileActions, tableView, configBox, progressBox, footer);
|
root.getChildren().addAll(header, fileActions, tableView, configBox, progressBox, footer);
|
||||||
|
|
||||||
@@ -283,6 +289,7 @@ public final class BatchSigningDialog {
|
|||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
|
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleAddFiles() {
|
private void handleAddFiles() {
|
||||||
|
|||||||
+6
-2
@@ -129,8 +129,7 @@ public class CertificateDetailsDialog {
|
|||||||
|
|
||||||
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
||||||
btnClose.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
btnClose.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
btnClose.setPrefWidth(110);
|
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnClose.setMinWidth(110);
|
|
||||||
btnClose.setOnAction(e -> stage.close());
|
btnClose.setOnAction(e -> stage.close());
|
||||||
|
|
||||||
actionsRow.getChildren().add(btnClose);
|
actionsRow.getChildren().add(btnClose);
|
||||||
@@ -141,12 +140,17 @@ public class CertificateDetailsDialog {
|
|||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
|
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void show() {
|
public void show() {
|
||||||
stage.show();
|
stage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
|
|
||||||
private void addField(GridPane grid, int row, String label, String value) {
|
private void addField(GridPane grid, int row, String label, String value) {
|
||||||
Label lbl = new Label(label);
|
Label lbl = new Label(label);
|
||||||
lbl.getStyleClass().add("dialog-field-title");
|
lbl.getStyleClass().add("dialog-field-title");
|
||||||
|
|||||||
+8
@@ -75,10 +75,12 @@ public final class CertificatesManagerDialog {
|
|||||||
|
|
||||||
Button btnAddA1 = new Button("Importar A1 (.pfx / .p12)...");
|
Button btnAddA1 = new Button("Importar A1 (.pfx / .p12)...");
|
||||||
btnAddA1.getStyleClass().add("btn-primary");
|
btnAddA1.getStyleClass().add("btn-primary");
|
||||||
|
btnAddA1.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnAddA1.setOnAction(e -> handleImportA1());
|
btnAddA1.setOnAction(e -> handleImportA1());
|
||||||
|
|
||||||
Button btnRefresh = new Button(" Atualizar Lista", SvgIcons.refreshIcon(14));
|
Button btnRefresh = new Button(" Atualizar Lista", SvgIcons.refreshIcon(14));
|
||||||
btnRefresh.getStyleClass().add("btn-secondary");
|
btnRefresh.getStyleClass().add("btn-secondary");
|
||||||
|
btnRefresh.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnRefresh.setOnAction(e -> refreshList());
|
btnRefresh.setOnAction(e -> refreshList());
|
||||||
|
|
||||||
actions.getChildren().addAll(btnAddA1, btnRefresh);
|
actions.getChildren().addAll(btnAddA1, btnRefresh);
|
||||||
@@ -95,6 +97,7 @@ public final class CertificatesManagerDialog {
|
|||||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||||
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
||||||
btnClose.getStyleClass().add("btn-secondary");
|
btnClose.getStyleClass().add("btn-secondary");
|
||||||
|
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnClose.setOnAction(e -> stage.close());
|
btnClose.setOnAction(e -> stage.close());
|
||||||
footer.getChildren().add(btnClose);
|
footer.getChildren().add(btnClose);
|
||||||
|
|
||||||
@@ -104,6 +107,7 @@ public final class CertificatesManagerDialog {
|
|||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
|
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshList() {
|
private void refreshList() {
|
||||||
@@ -189,4 +193,8 @@ public final class CertificatesManagerDialog {
|
|||||||
public void show() {
|
public void show() {
|
||||||
stage.show();
|
stage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -37,8 +37,6 @@ public final class ExitConfirmationDialog {
|
|||||||
}
|
}
|
||||||
this.stage.setTitle("CyberCore Signer — Encerrar ou Manter na Bandeja");
|
this.stage.setTitle("CyberCore Signer — Encerrar ou Manter na Bandeja");
|
||||||
this.stage.setResizable(false);
|
this.stage.setResizable(false);
|
||||||
this.stage.setMinWidth(520);
|
|
||||||
this.stage.setMinHeight(190);
|
|
||||||
|
|
||||||
initLayout();
|
initLayout();
|
||||||
}
|
}
|
||||||
@@ -71,6 +69,7 @@ public final class ExitConfirmationDialog {
|
|||||||
|
|
||||||
Button btnCancel = new Button("Cancelar");
|
Button btnCancel = new Button("Cancelar");
|
||||||
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
|
btnCancel.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnCancel.setOnAction(e -> {
|
btnCancel.setOnAction(e -> {
|
||||||
chosenAction = ExitChoice.CANCEL;
|
chosenAction = ExitChoice.CANCEL;
|
||||||
stage.close();
|
stage.close();
|
||||||
@@ -81,6 +80,7 @@ public final class ExitConfirmationDialog {
|
|||||||
|
|
||||||
Button btnExit = new Button("Encerrar Definitivamente");
|
Button btnExit = new Button("Encerrar Definitivamente");
|
||||||
btnExit.getStyleClass().addAll("btn-danger-outline", "btn-dialog");
|
btnExit.getStyleClass().addAll("btn-danger-outline", "btn-dialog");
|
||||||
|
btnExit.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnExit.setOnAction(e -> {
|
btnExit.setOnAction(e -> {
|
||||||
chosenAction = ExitChoice.EXIT_COMPLETELY;
|
chosenAction = ExitChoice.EXIT_COMPLETELY;
|
||||||
stage.close();
|
stage.close();
|
||||||
@@ -88,6 +88,7 @@ public final class ExitConfirmationDialog {
|
|||||||
|
|
||||||
Button btnMinimize = new Button("Minimizar para a Bandeja");
|
Button btnMinimize = new Button("Minimizar para a Bandeja");
|
||||||
btnMinimize.getStyleClass().addAll("btn-primary", "btn-dialog");
|
btnMinimize.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||||
|
btnMinimize.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnMinimize.setDefaultButton(true);
|
btnMinimize.setDefaultButton(true);
|
||||||
btnMinimize.setOnAction(e -> {
|
btnMinimize.setOnAction(e -> {
|
||||||
chosenAction = ExitChoice.MINIMIZE_TO_TRAY;
|
chosenAction = ExitChoice.MINIMIZE_TO_TRAY;
|
||||||
@@ -101,6 +102,7 @@ public final class ExitConfirmationDialog {
|
|||||||
Scene scene = new Scene(root);
|
Scene scene = new Scene(root);
|
||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
stage.setOnCloseRequest(e -> chosenAction = ExitChoice.CANCEL);
|
stage.setOnCloseRequest(e -> chosenAction = ExitChoice.CANCEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-3
@@ -112,6 +112,7 @@ public final class FileSignDialog {
|
|||||||
|
|
||||||
Button btnBrowse = new Button("Procurar...");
|
Button btnBrowse = new Button("Procurar...");
|
||||||
btnBrowse.getStyleClass().add("btn-secondary");
|
btnBrowse.getStyleClass().add("btn-secondary");
|
||||||
|
btnBrowse.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnBrowse.setOnAction(e -> handleBrowseFile());
|
btnBrowse.setOnAction(e -> handleBrowseFile());
|
||||||
|
|
||||||
fileRow.getChildren().addAll(txtFilePath, btnBrowse);
|
fileRow.getChildren().addAll(txtFilePath, btnBrowse);
|
||||||
@@ -159,15 +160,20 @@ public final class FileSignDialog {
|
|||||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||||
|
|
||||||
Button btnCancel = new Button("Cancelar");
|
Button btnCancel = new Button("Cancelar");
|
||||||
btnCancel.getStyleClass().add("btn-secondary");
|
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
|
btnCancel.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnCancel.setOnAction(e -> stage.close());
|
btnCancel.setOnAction(e -> stage.close());
|
||||||
|
|
||||||
|
HBox spacer = new HBox();
|
||||||
|
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||||
|
|
||||||
Button btnSign = new Button("Assinar Documento");
|
Button btnSign = new Button("Assinar Documento");
|
||||||
btnSign.getStyleClass().add("btn-primary");
|
btnSign.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||||
|
btnSign.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnSign.setDefaultButton(true);
|
btnSign.setDefaultButton(true);
|
||||||
btnSign.setOnAction(e -> executeSignature());
|
btnSign.setOnAction(e -> executeSignature());
|
||||||
|
|
||||||
footer.getChildren().addAll(btnCancel, btnSign);
|
footer.getChildren().addAll(btnCancel, spacer, btnSign);
|
||||||
|
|
||||||
root.getChildren().addAll(header, fileBox, certBox, footer);
|
root.getChildren().addAll(header, fileBox, certBox, footer);
|
||||||
|
|
||||||
@@ -175,6 +181,7 @@ public final class FileSignDialog {
|
|||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
|
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleBrowseFile() {
|
private void handleBrowseFile() {
|
||||||
@@ -257,4 +264,8 @@ public final class FileSignDialog {
|
|||||||
public void show() {
|
public void show() {
|
||||||
stage.show();
|
stage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-6
@@ -64,7 +64,7 @@ public final class LogsViewerDialog {
|
|||||||
|
|
||||||
Button btnCopy = new Button("Copiar");
|
Button btnCopy = new Button("Copiar");
|
||||||
btnCopy.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
btnCopy.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
||||||
btnCopy.setPrefWidth(90);
|
btnCopy.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnCopy.setOnAction(e -> {
|
btnCopy.setOnAction(e -> {
|
||||||
javafx.scene.input.ClipboardContent content = new javafx.scene.input.ClipboardContent();
|
javafx.scene.input.ClipboardContent content = new javafx.scene.input.ClipboardContent();
|
||||||
content.putString(txtLogs.getText());
|
content.putString(txtLogs.getText());
|
||||||
@@ -77,7 +77,7 @@ public final class LogsViewerDialog {
|
|||||||
|
|
||||||
Button btnClear = new Button("Limpar");
|
Button btnClear = new Button("Limpar");
|
||||||
btnClear.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
btnClear.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
||||||
btnClear.setPrefWidth(90);
|
btnClear.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnClear.setOnAction(e -> {
|
btnClear.setOnAction(e -> {
|
||||||
br.com.cybercore.signer.core.log.AppLogBuffer.clear();
|
br.com.cybercore.signer.core.log.AppLogBuffer.clear();
|
||||||
loadLogs();
|
loadLogs();
|
||||||
@@ -85,15 +85,18 @@ public final class LogsViewerDialog {
|
|||||||
|
|
||||||
Button btnRefresh = new Button("Atualizar");
|
Button btnRefresh = new Button("Atualizar");
|
||||||
btnRefresh.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
btnRefresh.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
||||||
btnRefresh.setPrefWidth(100);
|
btnRefresh.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnRefresh.setOnAction(e -> loadLogs());
|
btnRefresh.setOnAction(e -> loadLogs());
|
||||||
|
|
||||||
|
HBox spacer = new HBox();
|
||||||
|
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||||
|
|
||||||
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
||||||
btnClose.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
btnClose.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
btnClose.setPrefWidth(100);
|
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnClose.setOnAction(e -> stage.close());
|
btnClose.setOnAction(e -> stage.close());
|
||||||
|
|
||||||
footer.getChildren().addAll(btnCopy, btnClear, btnRefresh, btnClose);
|
footer.getChildren().addAll(btnCopy, btnClear, btnRefresh, spacer, btnClose);
|
||||||
|
|
||||||
root.getChildren().addAll(header, txtLogs, footer);
|
root.getChildren().addAll(header, txtLogs, footer);
|
||||||
|
|
||||||
@@ -101,6 +104,7 @@ public final class LogsViewerDialog {
|
|||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
|
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadLogs() {
|
private void loadLogs() {
|
||||||
@@ -127,4 +131,8 @@ public final class LogsViewerDialog {
|
|||||||
public void show() {
|
public void show() {
|
||||||
stage.show();
|
stage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -304,13 +304,12 @@ public final class PdfCertificateSignDialog {
|
|||||||
|
|
||||||
btnCancel = new Button("Cancelar");
|
btnCancel = new Button("Cancelar");
|
||||||
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
btnCancel.setMinWidth(110);
|
btnCancel.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnCancel.setOnAction(e -> stage.close());
|
btnCancel.setOnAction(e -> stage.close());
|
||||||
|
|
||||||
btnSign = new Button("Assinar Documento PDF");
|
btnSign = new Button("Assinar Documento PDF");
|
||||||
btnSign.getStyleClass().addAll("btn-primary", "btn-dialog-wide");
|
btnSign.getStyleClass().addAll("btn-primary", "btn-dialog-wide");
|
||||||
btnSign.setMinWidth(220);
|
btnSign.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnSign.setPrefWidth(Region.USE_COMPUTED_SIZE);
|
|
||||||
btnSign.setDefaultButton(true);
|
btnSign.setDefaultButton(true);
|
||||||
btnSign.setOnAction(e -> handleSign());
|
btnSign.setOnAction(e -> handleSign());
|
||||||
|
|
||||||
@@ -318,9 +317,10 @@ public final class PdfCertificateSignDialog {
|
|||||||
|
|
||||||
root.getChildren().addAll(header, summaryBox, certSection, footer);
|
root.getChildren().addAll(header, summaryBox, certSection, footer);
|
||||||
|
|
||||||
Scene scene = new Scene(root, 720, 500);
|
Scene scene = new Scene(root);
|
||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
|
|
||||||
updatePinFieldVisibility();
|
updatePinFieldVisibility();
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-3
@@ -270,14 +270,13 @@ public final class PdfSignDialog {
|
|||||||
|
|
||||||
btnCancel = new Button("Cancelar");
|
btnCancel = new Button("Cancelar");
|
||||||
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
btnCancel.setMinWidth(110);
|
btnCancel.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnCancel.setOnAction(e -> stage.close());
|
btnCancel.setOnAction(e -> stage.close());
|
||||||
|
|
||||||
btnNextToCert = new Button("Avançar", SvgIcons.arrowRightIcon(12));
|
btnNextToCert = new Button("Avançar", SvgIcons.arrowRightIcon(12));
|
||||||
btnNextToCert.setContentDisplay(javafx.scene.control.ContentDisplay.RIGHT);
|
btnNextToCert.setContentDisplay(javafx.scene.control.ContentDisplay.RIGHT);
|
||||||
btnNextToCert.getStyleClass().addAll("btn-primary", "btn-dialog-wide");
|
btnNextToCert.getStyleClass().addAll("btn-primary", "btn-dialog-wide");
|
||||||
btnNextToCert.setMinWidth(240);
|
btnNextToCert.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnNextToCert.setPrefWidth(250);
|
|
||||||
btnNextToCert.setDefaultButton(true);
|
btnNextToCert.setDefaultButton(true);
|
||||||
btnNextToCert.setOnAction(e -> handleAdvanceToCertificate());
|
btnNextToCert.setOnAction(e -> handleAdvanceToCertificate());
|
||||||
|
|
||||||
@@ -291,6 +290,7 @@ public final class PdfSignDialog {
|
|||||||
Scene scene = new Scene(root, 1020, 680);
|
Scene scene = new Scene(root, 1020, 680);
|
||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
|
|
||||||
updateSealPreview();
|
updateSealPreview();
|
||||||
}
|
}
|
||||||
@@ -429,6 +429,7 @@ public final class PdfSignDialog {
|
|||||||
|
|
||||||
btnPrevPage = new Button("◀");
|
btnPrevPage = new Button("◀");
|
||||||
btnPrevPage.getStyleClass().addAll("btn-secondary", "btn-compact");
|
btnPrevPage.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||||
|
btnPrevPage.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnPrevPage.setTooltip(new Tooltip("Página Anterior"));
|
btnPrevPage.setTooltip(new Tooltip("Página Anterior"));
|
||||||
btnPrevPage.setDisable(true);
|
btnPrevPage.setDisable(true);
|
||||||
btnPrevPage.setOnAction(e -> navigatePage(-1));
|
btnPrevPage.setOnAction(e -> navigatePage(-1));
|
||||||
@@ -438,6 +439,7 @@ public final class PdfSignDialog {
|
|||||||
|
|
||||||
btnNextPage = new Button("▶");
|
btnNextPage = new Button("▶");
|
||||||
btnNextPage.getStyleClass().addAll("btn-secondary", "btn-compact");
|
btnNextPage.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||||
|
btnNextPage.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnNextPage.setTooltip(new Tooltip("Próxima Página"));
|
btnNextPage.setTooltip(new Tooltip("Próxima Página"));
|
||||||
btnNextPage.setDisable(true);
|
btnNextPage.setDisable(true);
|
||||||
btnNextPage.setOnAction(e -> navigatePage(1));
|
btnNextPage.setOnAction(e -> navigatePage(1));
|
||||||
@@ -456,6 +458,7 @@ public final class PdfSignDialog {
|
|||||||
btnZoomOut = new Button();
|
btnZoomOut = new Button();
|
||||||
btnZoomOut.setGraphic(SvgIcons.zoomOutIcon(13));
|
btnZoomOut.setGraphic(SvgIcons.zoomOutIcon(13));
|
||||||
btnZoomOut.getStyleClass().addAll("btn-secondary", "btn-compact");
|
btnZoomOut.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||||
|
btnZoomOut.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnZoomOut.setTooltip(new Tooltip("Diminuir Zoom"));
|
btnZoomOut.setTooltip(new Tooltip("Diminuir Zoom"));
|
||||||
btnZoomOut.setOnAction(e -> adjustZoom(-ZOOM_STEP));
|
btnZoomOut.setOnAction(e -> adjustZoom(-ZOOM_STEP));
|
||||||
|
|
||||||
@@ -465,12 +468,14 @@ public final class PdfSignDialog {
|
|||||||
btnZoomIn = new Button();
|
btnZoomIn = new Button();
|
||||||
btnZoomIn.setGraphic(SvgIcons.zoomInIcon(13));
|
btnZoomIn.setGraphic(SvgIcons.zoomInIcon(13));
|
||||||
btnZoomIn.getStyleClass().addAll("btn-secondary", "btn-compact");
|
btnZoomIn.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||||
|
btnZoomIn.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnZoomIn.setTooltip(new Tooltip("Aumentar Zoom"));
|
btnZoomIn.setTooltip(new Tooltip("Aumentar Zoom"));
|
||||||
btnZoomIn.setOnAction(e -> adjustZoom(ZOOM_STEP));
|
btnZoomIn.setOnAction(e -> adjustZoom(ZOOM_STEP));
|
||||||
|
|
||||||
btnZoomFit = new Button("Ajustar");
|
btnZoomFit = new Button("Ajustar");
|
||||||
btnZoomFit.setGraphic(SvgIcons.zoomFitIcon(12));
|
btnZoomFit.setGraphic(SvgIcons.zoomFitIcon(12));
|
||||||
btnZoomFit.getStyleClass().addAll("btn-secondary", "btn-compact");
|
btnZoomFit.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||||
|
btnZoomFit.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnZoomFit.setTooltip(new Tooltip("Ajustar à janela"));
|
btnZoomFit.setTooltip(new Tooltip("Ajustar à janela"));
|
||||||
btnZoomFit.setOnAction(e -> setZoom(1.0));
|
btnZoomFit.setOnAction(e -> setZoom(1.0));
|
||||||
|
|
||||||
@@ -483,6 +488,7 @@ public final class PdfSignDialog {
|
|||||||
|
|
||||||
btnToggleResize = new Button(" Redimensionar", SvgIcons.zoomFitIcon(13));
|
btnToggleResize = new Button(" Redimensionar", SvgIcons.zoomFitIcon(13));
|
||||||
btnToggleResize.getStyleClass().addAll("btn-secondary", "btn-compact");
|
btnToggleResize.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||||
|
btnToggleResize.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnToggleResize.setTooltip(new Tooltip("Ativar/desativar alça interativa para alterar o tamanho do selo"));
|
btnToggleResize.setTooltip(new Tooltip("Ativar/desativar alça interativa para alterar o tamanho do selo"));
|
||||||
btnToggleResize.setOnAction(e -> toggleResizeMode());
|
btnToggleResize.setOnAction(e -> toggleResizeMode());
|
||||||
|
|
||||||
@@ -491,6 +497,7 @@ public final class PdfSignDialog {
|
|||||||
|
|
||||||
btnResetSealScale = new Button(" 100%", SvgIcons.refreshIcon(12));
|
btnResetSealScale = new Button(" 100%", SvgIcons.refreshIcon(12));
|
||||||
btnResetSealScale.getStyleClass().addAll("btn-secondary", "btn-compact");
|
btnResetSealScale.getStyleClass().addAll("btn-secondary", "btn-compact");
|
||||||
|
btnResetSealScale.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnResetSealScale.setTooltip(new Tooltip("Restaurar tamanho padrão original (100%)"));
|
btnResetSealScale.setTooltip(new Tooltip("Restaurar tamanho padrão original (100%)"));
|
||||||
btnResetSealScale.setVisible(false);
|
btnResetSealScale.setVisible(false);
|
||||||
btnResetSealScale.setOnAction(e -> applySealScale(1.0));
|
btnResetSealScale.setOnAction(e -> applySealScale(1.0));
|
||||||
|
|||||||
+15
-2
@@ -383,24 +383,33 @@ public final class SealDesignerDialog {
|
|||||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||||
footer.setPadding(new Insets(6, 0, 0, 0));
|
footer.setPadding(new Insets(6, 0, 0, 0));
|
||||||
|
|
||||||
|
Region spacer = new Region();
|
||||||
|
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||||
|
|
||||||
Button btnCancel = new Button("Cancelar");
|
Button btnCancel = new Button("Cancelar");
|
||||||
btnCancel.getStyleClass().add("btn-secondary");
|
btnCancel.getStyleClass().add("btn-ghost");
|
||||||
|
btnCancel.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnCancel.setPrefHeight(34);
|
btnCancel.setPrefHeight(34);
|
||||||
btnCancel.setOnAction(e -> stage.close());
|
btnCancel.setOnAction(e -> stage.close());
|
||||||
|
|
||||||
Button btnInstall = new Button("💾 Instalar Selo no Sistema");
|
Button btnInstall = new Button("💾 Instalar Selo no Sistema");
|
||||||
btnInstall.getStyleClass().add("btn-primary");
|
btnInstall.getStyleClass().add("btn-primary");
|
||||||
|
btnInstall.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnInstall.setPrefHeight(34);
|
btnInstall.setPrefHeight(34);
|
||||||
btnInstall.setDefaultButton(true);
|
btnInstall.setDefaultButton(true);
|
||||||
btnInstall.setOnAction(e -> handleInstallSeal());
|
btnInstall.setOnAction(e -> handleInstallSeal());
|
||||||
|
|
||||||
footer.getChildren().addAll(btnCancel, btnInstall);
|
btnImport.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
|
btnExport.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
|
|
||||||
|
footer.getChildren().addAll(spacer, btnCancel, btnInstall);
|
||||||
|
|
||||||
root.getChildren().addAll(header, mainSplit, footer);
|
root.getChildren().addAll(header, mainSplit, footer);
|
||||||
|
|
||||||
Scene scene = new Scene(root, 880, 580);
|
Scene scene = new Scene(root, 880, 580);
|
||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updatePreview() {
|
private void updatePreview() {
|
||||||
@@ -640,4 +649,8 @@ public final class SealDesignerDialog {
|
|||||||
stage.centerOnScreen();
|
stage.centerOnScreen();
|
||||||
stage.show();
|
stage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-3
@@ -222,9 +222,8 @@ public final class SealManagementDialog {
|
|||||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||||
|
|
||||||
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
Button btnClose = new Button(" Fechar", SvgIcons.closeIcon(13));
|
||||||
btnClose.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
btnClose.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
btnClose.setPrefWidth(110);
|
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnClose.setMinWidth(110);
|
|
||||||
btnClose.setOnAction(e -> stage.close());
|
btnClose.setOnAction(e -> stage.close());
|
||||||
|
|
||||||
footer.getChildren().add(btnClose);
|
footer.getChildren().add(btnClose);
|
||||||
@@ -234,6 +233,7 @@ public final class SealManagementDialog {
|
|||||||
Scene scene = new Scene(root, 880, 560);
|
Scene scene = new Scene(root, 880, 560);
|
||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshSealsList() {
|
private void refreshSealsList() {
|
||||||
@@ -441,6 +441,10 @@ public final class SealManagementDialog {
|
|||||||
stage.showAndWait();
|
stage.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Célula customizada para a listagem visual dos selos.
|
* Célula customizada para a listagem visual dos selos.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+12
-4
@@ -66,7 +66,6 @@ public class SignaturePromptDialog {
|
|||||||
VBox root = new VBox(16);
|
VBox root = new VBox(16);
|
||||||
root.getStyleClass().add("dialog-container");
|
root.getStyleClass().add("dialog-container");
|
||||||
root.setPadding(new Insets(20, 24, 20, 24));
|
root.setPadding(new Insets(20, 24, 20, 24));
|
||||||
root.setPrefWidth(560);
|
|
||||||
|
|
||||||
HBox headerBox = new HBox(14);
|
HBox headerBox = new HBox(14);
|
||||||
headerBox.setAlignment(Pos.CENTER_LEFT);
|
headerBox.setAlignment(Pos.CENTER_LEFT);
|
||||||
@@ -240,14 +239,19 @@ public class SignaturePromptDialog {
|
|||||||
actionsRow.setPadding(new Insets(4, 0, 0, 0));
|
actionsRow.setPadding(new Insets(4, 0, 0, 0));
|
||||||
|
|
||||||
Button btnCancel = new Button("Cancelar");
|
Button btnCancel = new Button("Cancelar");
|
||||||
btnCancel.getStyleClass().add("btn-cancel");
|
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
|
btnCancel.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnCancel.setOnAction(e -> {
|
btnCancel.setOnAction(e -> {
|
||||||
approvalFuture.complete(false);
|
approvalFuture.complete(false);
|
||||||
stage.close();
|
stage.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
HBox spacer = new HBox();
|
||||||
|
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||||
|
|
||||||
Button btnConfirm = new Button(isAuthentication ? "Confirmar e Entrar" : "Confirmar e Assinar");
|
Button btnConfirm = new Button(isAuthentication ? "Confirmar e Entrar" : "Confirmar e Assinar");
|
||||||
btnConfirm.getStyleClass().add("btn-primary");
|
btnConfirm.getStyleClass().addAll("btn-primary", "btn-dialog");
|
||||||
|
btnConfirm.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnConfirm.setDefaultButton(true);
|
btnConfirm.setDefaultButton(true);
|
||||||
btnConfirm.setOnAction(e -> {
|
btnConfirm.setOnAction(e -> {
|
||||||
if (isA3 && !isWindowsStore) {
|
if (isA3 && !isWindowsStore) {
|
||||||
@@ -277,7 +281,7 @@ public class SignaturePromptDialog {
|
|||||||
stage.close();
|
stage.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
actionsRow.getChildren().addAll(btnCancel, btnConfirm);
|
actionsRow.getChildren().addAll(btnCancel, spacer, btnConfirm);
|
||||||
|
|
||||||
if (isA3) {
|
if (isA3) {
|
||||||
root.getChildren().addAll(headerBox, detailsBox, pinContainer, validationLabel, actionsRow);
|
root.getChildren().addAll(headerBox, detailsBox, pinContainer, validationLabel, actionsRow);
|
||||||
@@ -335,4 +339,8 @@ public class SignaturePromptDialog {
|
|||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-2
@@ -19,6 +19,7 @@ import javafx.scene.control.TextField;
|
|||||||
import javafx.scene.control.ToggleGroup;
|
import javafx.scene.control.ToggleGroup;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
import javafx.scene.layout.Priority;
|
import javafx.scene.layout.Priority;
|
||||||
|
import javafx.scene.layout.Region;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.stage.FileChooser;
|
import javafx.stage.FileChooser;
|
||||||
import javafx.stage.Modality;
|
import javafx.stage.Modality;
|
||||||
@@ -120,6 +121,7 @@ public final class SignatureValidationDialog {
|
|||||||
|
|
||||||
Button btnBrowseSig = new Button("Procurar...");
|
Button btnBrowseSig = new Button("Procurar...");
|
||||||
btnBrowseSig.getStyleClass().add("btn-secondary");
|
btnBrowseSig.getStyleClass().add("btn-secondary");
|
||||||
|
btnBrowseSig.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnBrowseSig.setOnAction(e -> handleBrowseSig());
|
btnBrowseSig.setOnAction(e -> handleBrowseSig());
|
||||||
|
|
||||||
sigRow.getChildren().addAll(txtSigPath, btnBrowseSig);
|
sigRow.getChildren().addAll(txtSigPath, btnBrowseSig);
|
||||||
@@ -139,6 +141,7 @@ public final class SignatureValidationDialog {
|
|||||||
|
|
||||||
Button btnBrowseDoc = new Button("Procurar...");
|
Button btnBrowseDoc = new Button("Procurar...");
|
||||||
btnBrowseDoc.getStyleClass().add("btn-secondary");
|
btnBrowseDoc.getStyleClass().add("btn-secondary");
|
||||||
|
btnBrowseDoc.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnBrowseDoc.setOnAction(e -> handleBrowseDoc());
|
btnBrowseDoc.setOnAction(e -> handleBrowseDoc());
|
||||||
|
|
||||||
docRow.getChildren().addAll(txtDocPath, btnBrowseDoc);
|
docRow.getChildren().addAll(txtDocPath, btnBrowseDoc);
|
||||||
@@ -161,28 +164,35 @@ public final class SignatureValidationDialog {
|
|||||||
|
|
||||||
btnSaveExtracted = new Button("Salvar Conteúdo Extraído...");
|
btnSaveExtracted = new Button("Salvar Conteúdo Extraído...");
|
||||||
btnSaveExtracted.getStyleClass().add("btn-secondary");
|
btnSaveExtracted.getStyleClass().add("btn-secondary");
|
||||||
|
btnSaveExtracted.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnSaveExtracted.setVisible(false);
|
btnSaveExtracted.setVisible(false);
|
||||||
btnSaveExtracted.setManaged(false);
|
btnSaveExtracted.setManaged(false);
|
||||||
btnSaveExtracted.setOnAction(e -> handleSaveExtracted());
|
btnSaveExtracted.setOnAction(e -> handleSaveExtracted());
|
||||||
|
|
||||||
HBox.setHgrow(btnSaveExtracted, Priority.NEVER);
|
HBox.setHgrow(btnSaveExtracted, Priority.NEVER);
|
||||||
|
|
||||||
|
Region spacer = new Region();
|
||||||
|
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||||
|
|
||||||
Button btnClose = new Button("Fechar");
|
Button btnClose = new Button("Fechar");
|
||||||
btnClose.getStyleClass().add("btn-secondary");
|
btnClose.getStyleClass().add("btn-ghost");
|
||||||
|
btnClose.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnClose.setOnAction(e -> stage.close());
|
btnClose.setOnAction(e -> stage.close());
|
||||||
|
|
||||||
Button btnValidate = new Button("Validar Agora");
|
Button btnValidate = new Button("Validar Agora");
|
||||||
btnValidate.getStyleClass().add("btn-primary");
|
btnValidate.getStyleClass().add("btn-primary");
|
||||||
|
btnValidate.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnValidate.setDefaultButton(true);
|
btnValidate.setDefaultButton(true);
|
||||||
btnValidate.setOnAction(e -> handleValidate());
|
btnValidate.setOnAction(e -> handleValidate());
|
||||||
|
|
||||||
footer.getChildren().addAll(btnSaveExtracted, btnClose, btnValidate);
|
footer.getChildren().addAll(btnSaveExtracted, spacer, btnClose, btnValidate);
|
||||||
|
|
||||||
root.getChildren().addAll(header, typeBox, sigBox, docBox, scrollResult, footer);
|
root.getChildren().addAll(header, typeBox, sigBox, docBox, scrollResult, footer);
|
||||||
|
|
||||||
Scene scene = new Scene(root);
|
Scene scene = new Scene(root);
|
||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
|
|
||||||
updateModeView();
|
updateModeView();
|
||||||
}
|
}
|
||||||
@@ -382,4 +392,8 @@ public final class SignatureValidationDialog {
|
|||||||
public void show() {
|
public void show() {
|
||||||
stage.show();
|
stage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-3
@@ -77,9 +77,8 @@ public final class TutorialDialog {
|
|||||||
HBox footer = new HBox();
|
HBox footer = new HBox();
|
||||||
footer.setAlignment(Pos.CENTER_RIGHT);
|
footer.setAlignment(Pos.CENTER_RIGHT);
|
||||||
Button btnClose = new Button(" Entendi", SvgIcons.closeIcon(13));
|
Button btnClose = new Button(" Entendi", SvgIcons.closeIcon(13));
|
||||||
btnClose.getStyleClass().addAll("btn-secondary", "btn-dialog");
|
btnClose.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
btnClose.setPrefWidth(110);
|
btnClose.setMinWidth(javafx.scene.layout.Region.USE_PREF_SIZE);
|
||||||
btnClose.setMinWidth(110);
|
|
||||||
btnClose.setOnAction(e -> stage.close());
|
btnClose.setOnAction(e -> stage.close());
|
||||||
footer.getChildren().add(btnClose);
|
footer.getChildren().add(btnClose);
|
||||||
|
|
||||||
@@ -89,6 +88,7 @@ public final class TutorialDialog {
|
|||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
|
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addStep(VBox container, String title, String description) {
|
private void addStep(VBox container, String title, String description) {
|
||||||
@@ -116,4 +116,8 @@ public final class TutorialDialog {
|
|||||||
public void show() {
|
public void show() {
|
||||||
stage.show();
|
stage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -294,6 +294,7 @@ public final class XmlSignDialog {
|
|||||||
|
|
||||||
btnCancel = new Button("Cancelar");
|
btnCancel = new Button("Cancelar");
|
||||||
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
btnCancel.getStyleClass().addAll("btn-ghost", "btn-dialog");
|
||||||
|
btnCancel.setMinWidth(Region.USE_PREF_SIZE);
|
||||||
btnCancel.setOnAction(e -> stage.close());
|
btnCancel.setOnAction(e -> stage.close());
|
||||||
|
|
||||||
btnSign = new Button("Assinar Documento XML");
|
btnSign = new Button("Assinar Documento XML");
|
||||||
@@ -309,6 +310,7 @@ public final class XmlSignDialog {
|
|||||||
Scene scene = new Scene(root);
|
Scene scene = new Scene(root);
|
||||||
ThemeManager.applyTheme(scene);
|
ThemeManager.applyTheme(scene);
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.sizeToScene();
|
||||||
|
|
||||||
updatePinFieldVisibility();
|
updatePinFieldVisibility();
|
||||||
}
|
}
|
||||||
@@ -554,4 +556,8 @@ public final class XmlSignDialog {
|
|||||||
stage.show();
|
stage.show();
|
||||||
stage.toFront();
|
stage.toFront();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return this.stage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user