package org.apache.fop.render.awt;
-import java.awt.print.PrinterException;
+//import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
-import java.io.IOException;
+//import java.io.IOException;
import java.util.Vector;
public class AWTPrintRenderer extends AWTRenderer {
printerJob.setPageable(this);
}
- public void stopRenderer() throws IOException {
- super.stopRenderer();
-
- if (endNumber == -1) {
- endNumber = getNumberOfPages();
- }
-
- Vector numbers = getInvalidPageNumbers();
- for (int i = numbers.size() - 1; i > -1; i--) {
- // removePage(Integer.parseInt((String)numbers.elementAt(i)));
- }
-
- try {
- printerJob.print();
- } catch (PrinterException e) {
- e.printStackTrace();
- throw new IOException("Unable to print: "
- + e.getClass().getName()
- + ": " + e.getMessage());
- }
- }
+// public void stopRenderer() throws IOException {
+// super.stopRenderer();
+//
+// if (endNumber == -1) {
+// endNumber = getNumberOfPages();
+// }
+//
+// Vector numbers = getInvalidPageNumbers();
+// for (int i = numbers.size() - 1; i > -1; i--) {
+// // removePage(Integer.parseInt((String)numbers.elementAt(i)));
+// }
+//
+// try {
+// printerJob.print();
+// } catch (PrinterException e) {
+// e.printStackTrace();
+// throw new IOException("Unable to print: "
+// + e.getClass().getName()
+// + ": " + e.getMessage());
+// }
+// }
public static int getIntProperty(String name, int def) {
String propValue = System.getProperty(name);
import java.awt.print.Pageable;
import java.awt.print.Printable;
import java.io.IOException;
-import java.io.OutputStream;
import java.util.Map;
import java.util.Vector;
/**
* This is FOP's AWT renderer.
*/
-public class AWTRenderer extends AbstractRenderer implements Printable, Pageable {
+public class AWTRenderer
+extends AbstractRenderer
+implements Printable, Pageable {
protected double scaleFactor = 100.0;
protected int pageNumber = 0;
return scaleFactor;
}
- public void startRenderer(OutputStream out)
- throws IOException {
- // empty pageViewportList, in case of a reload from PreviewDialog
- pageViewportList.removeAllElements();
- pageList.removeAllElements();
- bufferedImageList.removeAllElements();
- System.out.println("\nRegion Types: 0-Before/Top, 1-Start/Left, 2-Body, 3-End/Right, 4-After/Bottom");
- }
-
- public void stopRenderer()
- throws IOException {
- frame.setStatus(translator.getString("Status.Show"));
- frame.showPage();
- }
+// public void startRenderer(OutputStream out)
+// throws IOException {
+// // empty pageViewportList, in case of a reload from PreviewDialog
+// pageViewportList.removeAllElements();
+// pageList.removeAllElements();
+// bufferedImageList.removeAllElements();
+// System.out.println("\nRegion Types: 0-Before/Top, 1-Start/Left, 2-Body, 3-End/Right, 4-After/Bottom");
+// }
+//
+// public void stopRenderer()
+// throws IOException {
+// frame.setStatus(translator.getString("Status.Show"));
+// frame.showPage();
+// }
// Printable Interface
public PageFormat getPageFormat(int pos) {