]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
This should finally fix the build errors, as Wouter has been saying.
authorSteve Coffman <gears@apache.org>
Mon, 17 Apr 2000 17:46:38 +0000 (17:46 +0000)
committerSteve Coffman <gears@apache.org>
Mon, 17 Apr 2000 17:46:38 +0000 (17:46 +0000)
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 [deleted file]

diff --git a/src/org/apache/fop/viewer/DocumentPanel.java b/src/org/apache/fop/viewer/DocumentPanel.java
deleted file mode 100644 (file)
index abdf75f..0000000
+++ /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);
-  }
-
-}
-