diff --git a/j-lawyer-client/lib/j-lawyer-cloud/j-lawyer-cloud.jar b/j-lawyer-client/lib/j-lawyer-cloud/j-lawyer-cloud.jar index 3eb0d9cb2..02474dc70 100644 Binary files a/j-lawyer-client/lib/j-lawyer-cloud/j-lawyer-cloud.jar and b/j-lawyer-client/lib/j-lawyer-cloud/j-lawyer-cloud.jar differ 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 a6601539c..e5d81bcf4 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 @@ -680,6 +680,7 @@ import java.io.IOException; import java.util.Arrays; import java.util.HashMap; +import java.util.logging.Level; import javax.imageio.ImageIO; import javax.swing.ImageIcon; import javax.swing.JOptionPane; @@ -1265,6 +1266,9 @@ private synchronized void renderContent(int currentIndex, int fromPageIndex, int pnlPage.setBorder(new EmptyBorder(0, 0, 10, 0)); pnlPage.setPage(iIndex, new ImageIcon(scaledImage)); pnlPages.add(pnlPage); + pnlPages.invalidate(); + pnlPages.revalidate(); + pnlPages.repaint(); }); @@ -1288,6 +1292,7 @@ private synchronized void renderContent(int currentIndex, int fromPageIndex, int try { SwingUtilities.invokeAndWait(() -> { pnlPages.invalidate(); + pnlPages.revalidate(); pnlPages.repaint(); }); } catch (Throwable t) { @@ -1358,7 +1363,7 @@ public void showContent(String documentId, byte[] content) { this.tabs.setEnabledAt(1, false); this.tabs.setEnabledAt(2, false); - long start=System.currentTimeMillis(); + long start = System.currentTimeMillis(); try { ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(new ByteArrayInputStream(content)); if (zii.canParse()) { @@ -1407,7 +1412,25 @@ public void showContent(String documentId, byte[] content) { } catch (Exception ex) { log.error("Error rendering e-invoice", ex); } - log.debug("invoice checking / rendering took " + (System.currentTimeMillis()-start)); + log.debug("invoice checking / rendering took " + (System.currentTimeMillis() - start)); + +// new Thread(() -> { +// try { +// Thread.sleep(200); +// } catch (InterruptedException ex) { +// log.error(ex); +// } +// if (getParent() != null) { +// // component has been added to a container +// SwingUtilities.invokeLater(() -> { +// getParent().revalidate(); +// getParent().repaint(); +// }); +// +// } else { +// log.info("not added to parent yet"); +// } +// }).start(); } @@ -1537,7 +1560,7 @@ private static BufferedImage rotateImage(BufferedImage originalImage, double deg return rotatedImage; } - + public void removePages(int[] pageIndexes) { try { @@ -1574,5 +1597,4 @@ public void removePages(int[] pageIndexes) { } - }