aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteve Coffman <gears@apache.org>2000-04-17 17:46:38 +0000
committerSteve Coffman <gears@apache.org>2000-04-17 17:46:38 +0000
commit280e3a1b8e0a47b4b8035a865be8c8fc5a307daa (patch)
tree0a2d0f8d7a1ea1891f10b4967713dab1862822d7 /src
parent022578c15ef7ac4303934291d85e274f3a48496c (diff)
downloadxmlgraphics-fop-280e3a1b8e0a47b4b8035a865be8c8fc5a307daa.tar.gz
xmlgraphics-fop-280e3a1b8e0a47b4b8035a865be8c8fc5a307daa.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/org/apache/fop/viewer/DocumentPanel.java88
1 files changed, 0 insertions, 88 deletions
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);
- }
-
-}
-