summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-08-02 16:04:49 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-08-02 16:04:49 +0200
commita3a190f41b5b509f2af1c1565ad9599169cf7f82 (patch)
treef617c0ef11ea37178a29089db41a2c4bcb376c30 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration
parent84a57e47b435e5b44e827536b3eb29fae7ec3501 (diff)
downloadpdf-over-a3a190f41b5b509f2af1c1565ad9599169cf7f82.tar.gz
pdf-over-a3a190f41b5b509f2af1c1565ad9599169cf7f82.tar.bz2
pdf-over-a3a190f41b5b509f2af1c1565ad9599169cf7f82.zip
YAGNI: Emblem interface
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java16
1 files changed, 8 insertions, 8 deletions
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 e821d78f..4fb4874e 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
@@ -66,7 +66,7 @@ import at.asit.pdfover.gui.utils.ImageConverter;
import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory;
import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.pdfover.signator.CachedFileNameEmblem;
+import at.asit.pdfover.signator.Emblem;
import at.asit.pdfover.signer.pdfas.PdfAs4SignatureParameter;
/**
@@ -423,8 +423,8 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
private void setEmblemFileInternal(final String filename, boolean force)
throws Exception {
- if (!force && this.configurationContainer.getEmblem() != null) {
- if (this.configurationContainer.getEmblem().equals(filename)) {
+ if (!force && this.configurationContainer.getEmblemPath() != null) {
+ if (this.configurationContainer.getEmblemPath().equals(filename)) {
return; // Ignore ...
}
}
@@ -435,7 +435,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
}
void updateSignatureBlockPreview() {
- String image = this.configurationContainer.getEmblem();
+ String image = this.configurationContainer.getEmblemPath();
ImageData img = null;
ImageData logo = null;
@@ -449,7 +449,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
param.enablePDFACompat = this.configurationContainer.signaturePDFACompat;
if (image != null && !image.trim().isEmpty()) {
logo = new ImageData(image);
- param.emblem = new CachedFileNameEmblem(image);
+ param.emblem = new Emblem(image);
}
//TODO deactivated the placeholder preview
//TODO display accurate placeholder preview -> now its only standard placeholder shown
@@ -468,7 +468,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
try {
File imgFile = new File(image);
this.logo = new Image(this.getDisplay(),
- ImageConverter.convertToSWT(CachedFileNameEmblem.fixImage(
+ ImageConverter.convertToSWT(Emblem.fixImage(
ImageIO.read(imgFile), imgFile)));
} catch (IOException e) {
log.error("Error reading image", e);
@@ -604,7 +604,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
this.txtMobileNumber.setText(number);
}
- String emblemFile = this.configurationContainer.getEmblem();
+ String emblemFile = this.configurationContainer.getEmblemPath();
if (emblemFile != null && !emblemFile.trim().isEmpty()) {
this.logoFile = emblemFile;
try {
@@ -636,7 +636,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
@Override
public void storeConfiguration(ConfigurationManager store) {
store.setDefaultMobileNumberPersistent(this.configurationContainer.getMobileNumber());
- store.setDefaultEmblemPersistent(this.configurationContainer.getEmblem());
+ store.setDefaultEmblemPersistent(this.configurationContainer.getEmblemPath());
store.setSignatureLocalePersistent(this.configurationContainer.signatureLocale);
store.setSignatureNotePersistent(this.configurationContainer.signatureNote);
store.setSignatureProfilePersistent(this.configurationContainer.getSignatureProfile().name());