From 5962867b411bc53bf14938b0312414f040986b54 Mon Sep 17 00:00:00 2001 From: Tobias Kellner Date: Mon, 10 Oct 2016 18:35:33 +0200 Subject: Cache (and scale) custom emblem images --- .../java/at/asit/pdfover/gui/workflow/states/PositioningState.java | 4 ++-- .../at/asit/pdfover/gui/workflow/states/PrepareSigningState.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow') 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())); } -- cgit v1.2.3