MCPcopy Create free account
hub / github.com/ArtifexSoftware/mupdf / shrinkWrap

Method shrinkWrap

platform/java/example/Viewer.java:760–772  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

758 }
759
760 protected void shrinkWrap() {
761 Dimension newSize = new Dimension(pixmapWidth, pixmapHeight);
762 newSize.width += 4;
763 newSize.height += 4;
764
765 if (newSize.width > screenSize.width)
766 newSize.width = screenSize.width;
767 if (newSize.height > screenSize.height)
768 newSize.height = screenSize.height;
769
770 pageScroll.setPreferredSize(newSize);
771 pack();
772 }
773
774 protected void redraw() {
775 boolean wasShrinkWrapped = isShrinkWrapped(pixmapWidth, pixmapHeight);

Callers 2

canvasKeyTypedMethod · 0.95
redrawMethod · 0.95

Calls 1

packMethod · 0.80

Tested by

no test coverage detected