diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/DocumentPreviewTooLarge.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/DocumentPreviewTooLarge.java index 23262acfb..d7523dafe 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/DocumentPreviewTooLarge.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/DocumentPreviewTooLarge.java @@ -761,7 +761,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }// //GEN-END:initComponents private void cmdForcePreviewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdForcePreviewActionPerformed - new Thread(new LoadDocumentPreviewThread(this.caseDto, this.docDto, this.readOnly, this.pnlPreview, true, this.saveCallback)).start(); + new Thread(new LoadDocumentPreviewThread(null, this.caseDto, this.docDto, this.readOnly, this.pnlPreview, true, this.saveCallback)).start(); }//GEN-LAST:event_cmdForcePreviewActionPerformed private void cmdPreviewSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdPreviewSettingsActionPerformed diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/LoadDocumentPreviewThread.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/LoadDocumentPreviewThread.java index 7fa5e75db..4fe40e8b2 100755 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/LoadDocumentPreviewThread.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/LoadDocumentPreviewThread.java @@ -681,6 +681,7 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JProgressBar; +import javax.swing.JSplitPane; import javax.swing.SwingUtilities; import org.apache.log4j.Logger; @@ -694,6 +695,7 @@ public class LoadDocumentPreviewThread implements Runnable { private static boolean running = false; + private JSplitPane previewContainer=null; private JPanel pnlPreview = null; private boolean readOnly = false; private ArchiveFileBean caseDto=null; @@ -701,13 +703,14 @@ public class LoadDocumentPreviewThread implements Runnable { private boolean forceAnyDocumentSize=false; private DocumentPreviewSaveCallback saveCallback=null; - public LoadDocumentPreviewThread(ArchiveFileBean caseDto, ArchiveFileDocumentsBean value, boolean readOnly, JPanel pnlPreview, boolean forceAnyDocumentSize, DocumentPreviewSaveCallback saveCallback) { + public LoadDocumentPreviewThread(JSplitPane previewContainer, ArchiveFileBean caseDto, ArchiveFileDocumentsBean value, boolean readOnly, JPanel pnlPreview, boolean forceAnyDocumentSize, DocumentPreviewSaveCallback saveCallback) { this.docDto=value; this.pnlPreview = pnlPreview; this.readOnly = readOnly; this.caseDto=caseDto; this.forceAnyDocumentSize=forceAnyDocumentSize; this.saveCallback=saveCallback; + this.previewContainer=previewContainer; } public static boolean isRunning() { @@ -782,6 +785,14 @@ public void run() { ((GifJpegPngImageWithTextPanel) prev).intelligentScrolling(); }); } + +// SwingUtilities.invokeLater(() -> { +// if (this.previewContainer != null) { +// ComponentUtils.bumpSplitPane(this.previewContainer); +// this.previewContainer.doLayout(); +// } +// }); + running = false; } catch (Exception ex) { running = false; diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/viewer/PdfImageScrollingPanel.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/viewer/PdfImageScrollingPanel.java index dc61252d8..c121fe9ef 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/viewer/PdfImageScrollingPanel.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/viewer/PdfImageScrollingPanel.java @@ -732,6 +732,7 @@ public class PdfImageScrollingPanel extends javax.swing.JPanel implements Previe * * @param fileName * @param content + * @param saveCallback */ public PdfImageScrollingPanel(String fileName, byte[] content, DocumentPreviewSaveCallback saveCallback) { initComponents(); diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/ArchiveFilePanel.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/ArchiveFilePanel.java index 05c9f5289..040c10b4b 100755 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/ArchiveFilePanel.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/ArchiveFilePanel.java @@ -4670,7 +4670,7 @@ public void updateDocumentPreview() { } else { ArchiveFileDocumentsBean value = selectedDocs.get(0); - new Thread(new LoadDocumentPreviewThread(this.dto, value, this.readOnly, this.pnlPreview, false, this)).start(); + new Thread(new LoadDocumentPreviewThread(this.splitDocumentsMain, this.dto, value, this.readOnly, this.pnlPreview, false, this)).start(); } }