예제 #1
0
 /**
  * Sets the number of scene units visible per page.
  *
  * @param perPage the number of scene units visible per page.
  */
 public void setPerPage(final double perPage) {
   this.perPage = perPage;
   double content = paper.getPrintableHeight();
   if (renderHeader) {
     content -= scene.getHeaderSize().getHeight();
   }
   if (renderFooter) {
     content -= scene.getFooterSize().getHeight();
   }
   scene.setScalingFactor(content / perPage);
 }
예제 #2
0
 /**
  * Create a new PageableScene.
  *
  * @param scene the scene.
  * @param paper the paper.
  * @param start the starting value.
  * @param perPage the number of scene units per page.
  * @param renderHeader the render header flag.
  * @param renderFooter the render footer flag.
  */
 public PageableScene(
     final Scene scene,
     final Paper paper,
     final double start,
     final double perPage,
     final boolean renderHeader,
     final boolean renderFooter) {
   this.scene = scene;
   this.paper = paper;
   this.start = start;
   this.renderHeader = renderHeader;
   this.renderFooter = renderFooter;
   setPreferredWidth(paper.getPrintableWidth());
   setPerPage(perPage);
 }