diff options
-rw-r--r-- | pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java | 11 | ||||
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java | 6 |
2 files changed, 16 insertions, 1 deletions
diff --git a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java index f06d489d..d26c8877 100644 --- a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java +++ b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java @@ -39,4 +39,15 @@ public enum Profile { } } + public boolean hasText() { + return ((this == SIGNATURBLOCK_SMALL) || (this == AMTSSIGNATURBLOCK)); + } + + public boolean hasLogo() { + return (this != INVISIBLE); + } + + public boolean isVisibleSignature() { + return (this != INVISIBLE); + } } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java index 8f652603..f97f8c0b 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java @@ -511,7 +511,11 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase { if (txtSignatureNote.getText().equals(getDefaultSignatureBlockNoteTextFor(oldProfile, null))) txtSignatureNote.setText(getDefaultSignatureBlockNoteTextFor(newProfile, null)); - this.grpPreview.setVisible(!Profile.INVISIBLE.equals(newProfile)); + this.cmbSignatureLang.setEnabled(newProfile.hasText()); + this.txtSignatureNote.setEnabled(newProfile.hasText()); + this.btnSignatureNoteDefault.setEnabled(newProfile.hasText()); + + this.grpPreview.setVisible(newProfile.isVisibleSignature()); signatureBlockPreviewChanged(); } |