summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow
diff options
context:
space:
mode:
authorTobias Kellner <tobias.kellner@iaik.tugraz.at>2016-10-10 18:35:33 +0200
committerTobias Kellner <tobias.kellner@iaik.tugraz.at>2016-10-25 17:00:13 +0200
commit5962867b411bc53bf14938b0312414f040986b54 (patch)
tree91c25af9dd61249f047f0567e0f72b87abda3091 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow
parent1f614332bcd103229f15f51157a52824005fba96 (diff)
downloadpdf-over-5962867b411bc53bf14938b0312414f040986b54.tar.gz
pdf-over-5962867b411bc53bf14938b0312414f040986b54.tar.bz2
pdf-over-5962867b411bc53bf14938b0312414f040986b54.zip
Cache (and scale) custom emblem images
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
index ae1303c8..32b335a7 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
@@ -36,8 +36,8 @@ import at.asit.pdfover.gui.utils.SignaturePlaceholderCache;
import at.asit.pdfover.gui.workflow.StateMachine;
import at.asit.pdfover.gui.workflow.Status;
import at.asit.pdfover.gui.workflow.config.ConfigProvider;
+import at.asit.pdfover.signator.CachedFileNameEmblem;
import at.asit.pdfover.signator.Emblem;
-import at.asit.pdfover.signator.FileNameEmblem;
import at.asit.pdfover.signator.SignatureParameter;
import at.asit.pdfover.signator.SignaturePosition;
@@ -104,7 +104,7 @@ public class PositioningState extends State {
// Update possibly changed values
ConfigProvider config = stateMachine.getConfigProvider();
SignatureParameter param = stateMachine.getPDFSigner().getPDFSigner().newParameter();
- Emblem emblem = new FileNameEmblem(config.getDefaultEmblem());
+ Emblem emblem = new CachedFileNameEmblem(config.getDefaultEmblem());
param.setEmblem(emblem);
if(config.getSignatureNote() != null && !config.getSignatureNote().isEmpty()) {
param.setProperty("SIG_NOTE", config.getSignatureNote()); //$NON-NLS-1$
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
index 45636568..155073d6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
@@ -26,14 +26,14 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.MainWindow.Buttons;
import at.asit.pdfover.gui.MainWindowBehavior;
import at.asit.pdfover.gui.composites.WaitingComposite;
-import at.asit.pdfover.gui.controls.ErrorDialog;
import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
+import at.asit.pdfover.gui.controls.ErrorDialog;
import at.asit.pdfover.gui.utils.Messages;
import at.asit.pdfover.gui.workflow.StateMachine;
import at.asit.pdfover.gui.workflow.Status;
import at.asit.pdfover.gui.workflow.config.ConfigProvider;
import at.asit.pdfover.signator.BKUs;
-import at.asit.pdfover.signator.FileNameEmblem;
+import at.asit.pdfover.signator.CachedFileNameEmblem;
import at.asit.pdfover.signator.PDFFileDocumentSource;
import at.asit.pdfover.signator.SignatureParameter;
import at.asit.pdfover.signator.Signer;
@@ -144,7 +144,7 @@ public class PrepareSigningState extends State {
if (configuration.getDefaultEmblem() != null
&& !configuration.getDefaultEmblem().isEmpty()) {
- this.state.signatureParameter.setEmblem(new FileNameEmblem(
+ this.state.signatureParameter.setEmblem(new CachedFileNameEmblem(
configuration.getDefaultEmblem()));
}