private PrintJob(MapViewer viewer, boolean viewerPrint) { super("PrintJob#" + JobCount++); this.map = viewer.getMap(); this.focal = viewerPrint ? viewer.getFocal() : map; this.jobName = map.getDisplayLabel(); this.isPrintingView = viewerPrint; // be sure to grab bounds info now -- sometimes it's possible // that the viewer bounds go negative once the model print dialog // boxes go active and VUE is hung without being able to reshape // or repaint itself. (That's not a problem when we run this // in a thread, but there's a java bug with that right now, tho // it's safer to do it this way anyway). if (isPrintingView()) { if (focal == map) this.bounds = viewer.getVisibleMapBounds(); else this.bounds = focal.getBorderBounds(); } else this.bounds = map.getBounds(); out(viewerPrint ? "printing: viewer contents" : "printing: whole map"); out("requested map bounds: " + bounds); }