From 280e3a1b8e0a47b4b8035a865be8c8fc5a307daa Mon Sep 17 00:00:00 2001 From: Steve Coffman Date: Mon, 17 Apr 2000 17:46:38 +0000 Subject: [PATCH] This should finally fix the build errors, as Wouter has been saying. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193329 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/viewer/DocumentPanel.java | 88 -------------------- 1 file changed, 88 deletions(-) delete mode 100644 src/org/apache/fop/viewer/DocumentPanel.java diff --git a/src/org/apache/fop/viewer/DocumentPanel.java b/src/org/apache/fop/viewer/DocumentPanel.java deleted file mode 100644 index abdf75f2b..000000000 --- a/src/org/apache/fop/viewer/DocumentPanel.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.apache.fop.viewer; - - - -import java.awt.*; -import javax.swing.*; - - -import org.apache.fop.layout.*; -import org.apache.fop.render.awt.*; - - - /** - * Diese Komponente stellt im Dialog das Dokument dar. - */ -public class DocumentPanel extends JComponent { - static final int V_BORDER = 80; - static final int H_BORDER = 70; - - protected AWTRenderer renderer; - protected PreviewDialog previewDialog; - protected AreaTree areaTree; - protected int pageNumber = 0; - - protected int docWidth; - protected int docHeight; - protected Color myColor; - protected int pageCount = 0; - - public DocumentPanel(AWTRenderer aRenderer, PreviewDialog p) { - previewDialog = p; - renderer = aRenderer; - renderer.setComponent(this); - myColor = previewDialog.getBackground(); - } - - public void updateSize(int aPageNumber, double aFactor) { - if (areaTree == null) - return; - - Page aPage = (Page)areaTree.getPages().elementAt(aPageNumber); - docWidth = aPage.getWidth() / 1000; - docHeight = aPage.getHeight() / 1000; - // Ruft paintComponent auf. - setSize((int)(aFactor * aPage.getWidth() / 1000.0 + 2*V_BORDER), - (int)(aFactor * aPage.getHeight()/ 1000.0 + 2*H_BORDER)); - } - - public void setAreaTree(AreaTree tree) { - areaTree = tree; - updateSize(pageNumber, 1.0); - getParent().getParent().doLayout(); - } - - - public void paintComponent(Graphics g) { - Color ownColor = g.getColor(); - g.setColor(myColor); - g.fillRect(0, 0, getWidth(), getHeight()); - g.setColor(ownColor); - g.translate(V_BORDER, H_BORDER); - - renderer.setGraphics((Graphics2D)g); - if (areaTree != null) { - try { - renderer.render(areaTree, pageNumber); - } catch(Exception ex) { - ex.printStackTrace(); - } - } - g.translate(-V_BORDER, -H_BORDER); - } - - public void setPageNumber(int number) { - pageNumber = number; - } - - public Dimension getPreferredSize() { - return getSize(); - } - - public void setPageCount(int aPageCount) { - pageCount = aPageCount; - previewDialog.setPageCount(pageCount); - } - -} - -- 2.39.5