aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/awt
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2008-07-25 10:55:49 +0000
committerVincent Hennebert <vhennebert@apache.org>2008-07-25 10:55:49 +0000
commitd058e870151a49af34ec1e7204edd0ffc64aaefc (patch)
tree14c346af79c0d2207f98b17e1e9f0212c8c32f44 /src/java/org/apache/fop/render/awt
parentcc5d6604bde87fca098633ceccd66fc92808bddc (diff)
downloadxmlgraphics-fop-d058e870151a49af34ec1e7204edd0ffc64aaefc.tar.gz
xmlgraphics-fop-d058e870151a49af34ec1e7204edd0ffc64aaefc.zip
Merged revisions 679052-679352 via svnmerge from
https://svn.eu.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r679060 | acumiskey | 2008-07-23 11:39:11 +0100 (Wed, 23 Jul 2008) | 2 lines My bad.. copy paste error I introduced which broke forrest. ........ r679164 | jeremias | 2008-07-23 20:33:24 +0100 (Wed, 23 Jul 2008) | 1 line Only update the generated files if any source file is newer than the generated ones. ........ r679326 | vhennebert | 2008-07-24 10:35:34 +0100 (Thu, 24 Jul 2008) | 2 lines Fed up with all those trailing whitespaces. Let's remove them all (once... and for all?) ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@679758 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/awt')
-rw-r--r--src/java/org/apache/fop/render/awt/AWTRenderer.java24
-rw-r--r--src/java/org/apache/fop/render/awt/AWTRendererMaker.java8
-rw-r--r--src/java/org/apache/fop/render/awt/viewer/Command.java6
-rw-r--r--src/java/org/apache/fop/render/awt/viewer/GoToPageDialog.java8
-rw-r--r--src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java6
-rw-r--r--src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java14
-rw-r--r--src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java14
-rw-r--r--src/java/org/apache/fop/render/awt/viewer/Renderable.java2
-rw-r--r--src/java/org/apache/fop/render/awt/viewer/StatusListener.java4
-rw-r--r--src/java/org/apache/fop/render/awt/viewer/Translator.java8
10 files changed, 47 insertions, 47 deletions
diff --git a/src/java/org/apache/fop/render/awt/AWTRenderer.java b/src/java/org/apache/fop/render/awt/AWTRenderer.java
index 4e24a7799..5b4c6b13a 100644
--- a/src/java/org/apache/fop/render/awt/AWTRenderer.java
+++ b/src/java/org/apache/fop/render/awt/AWTRenderer.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -67,17 +67,17 @@ public class AWTRenderer extends Java2DRenderer implements Pageable {
private boolean previewAsMainWindow;
/**
- * Renderable instance that can be used to reload and re-render a document after
+ * Renderable instance that can be used to reload and re-render a document after
* modifications.
*/
protected Renderable renderable;
/**
- * Will be notified when rendering progresses
+ * Will be notified when rendering progresses
*/
protected StatusListener statusListener = null;
-
+
/**
* Creates a new AWTRenderer instance.
*/
@@ -98,7 +98,7 @@ public class AWTRenderer extends Java2DRenderer implements Pageable {
public void setUserAgent(FOUserAgent foUserAgent) {
super.setUserAgent(foUserAgent);
if (dialogDisplay) {
- setStatusListener(PreviewDialog.createPreviewDialog(userAgent, this.renderable,
+ setStatusListener(PreviewDialog.createPreviewDialog(userAgent, this.renderable,
this.previewAsMainWindow));
}
}
@@ -111,7 +111,7 @@ public class AWTRenderer extends Java2DRenderer implements Pageable {
public void setRenderable(Renderable renderable) {
this.renderable = renderable;
}
-
+
/**
* Sets whether the preview dialog should be created and displayed when
* the rendering is finished.
@@ -121,7 +121,7 @@ public class AWTRenderer extends Java2DRenderer implements Pageable {
dialogDisplay = show;
}
- /**
+ /**
* {@inheritDoc}
*/
public void renderPage(PageViewport pageViewport) throws IOException {
@@ -164,15 +164,15 @@ public class AWTRenderer extends Java2DRenderer implements Pageable {
if (pageIndex >= getNumberOfPages()) {
return null;
}
-
+
PageFormat pageFormat = new PageFormat();
-
+
Paper paper = new Paper();
-
+
Rectangle2D dim = getPageViewport(pageIndex).getViewArea();
double width = dim.getWidth();
double height = dim.getHeight();
-
+
// if the width is greater than the height assume lanscape mode
// and swap the width and height values in the paper format
if (width > height) {
diff --git a/src/java/org/apache/fop/render/awt/AWTRendererMaker.java b/src/java/org/apache/fop/render/awt/AWTRendererMaker.java
index bca4c0817..983b42e0c 100644
--- a/src/java/org/apache/fop/render/awt/AWTRendererMaker.java
+++ b/src/java/org/apache/fop/render/awt/AWTRendererMaker.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,8 +30,8 @@ import org.apache.fop.render.Renderer;
public class AWTRendererMaker extends AbstractRendererMaker {
private static final String[] MIMES = new String[] {MimeConstants.MIME_FOP_AWT_PREVIEW};
-
-
+
+
/** {@inheritDoc} */
public Renderer makeRenderer(FOUserAgent ua) {
return new AWTRenderer();
diff --git a/src/java/org/apache/fop/render/awt/viewer/Command.java b/src/java/org/apache/fop/render/awt/viewer/Command.java
index a56527516..ef6559a11 100644
--- a/src/java/org/apache/fop/render/awt/viewer/Command.java
+++ b/src/java/org/apache/fop/render/awt/viewer/Command.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render.awt.viewer;
//Java
diff --git a/src/java/org/apache/fop/render/awt/viewer/GoToPageDialog.java b/src/java/org/apache/fop/render/awt/viewer/GoToPageDialog.java
index 376280159..0ff71be67 100644
--- a/src/java/org/apache/fop/render/awt/viewer/GoToPageDialog.java
+++ b/src/java/org/apache/fop/render/awt/viewer/GoToPageDialog.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render.awt.viewer;
import java.awt.Dimension;
@@ -42,7 +42,7 @@ import java.awt.event.ActionListener;
* Stanislav Gorkhover: Stanislav.Gorkhover@jCatalog.com
*/
public class GoToPageDialog extends JDialog {
-
+
private JTextField pageNumberField;
private int pageNumber = -1;
diff --git a/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java b/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java
index cc00244fc..a96d73a46 100644
--- a/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java
+++ b/src/java/org/apache/fop/render/awt/viewer/ImageProxyPanel.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -129,7 +129,7 @@ public class ImageProxyPanel extends JPanel {
int x = (getWidth() - image.getWidth()) / 2;
int y = (getHeight() - image.getHeight()) / 2;
-
+
graphics.drawImage(image, x, y, image.getWidth(), image.getHeight(), null);
} catch (FOPException fopEx) {
fopEx.printStackTrace();
diff --git a/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java b/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java
index ee220d629..7c4d66689 100644
--- a/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java
+++ b/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java
@@ -77,7 +77,7 @@ public class PreviewDialog extends JFrame implements StatusListener {
/** The FOUserAgent associated with this window */
protected FOUserAgent foUserAgent;
/**
- * Renderable instance that can be used to reload and re-render a document after
+ * Renderable instance that can be used to reload and re-render a document after
* modifications.
*/
protected Renderable renderable;
@@ -253,14 +253,14 @@ public class PreviewDialog extends JFrame implements StatusListener {
new Insets(0, 0, 0, 0), 0, 0));
getContentPane().add(statusBar, BorderLayout.SOUTH);
}
-
+
/**
- * Creates and initialize the AWT Viewer main window.
+ * Creates and initialize the AWT Viewer main window.
* @param foUserAgent the FO user agent
* @param renderable the target for the rendering
* @return the newly initialized preview dialog
*/
- public static PreviewDialog createPreviewDialog(FOUserAgent foUserAgent,
+ public static PreviewDialog createPreviewDialog(FOUserAgent foUserAgent,
Renderable renderable, boolean asMainWindow) {
PreviewDialog frame = new PreviewDialog(foUserAgent, renderable);
@@ -295,7 +295,7 @@ public class PreviewDialog extends JFrame implements StatusListener {
public PreviewDialog(FOUserAgent foUserAgent) {
this(foUserAgent, null);
}
-
+
/**
* Creates a new menubar to be shown in this window.
* @return the newly created menubar
@@ -454,7 +454,7 @@ public class PreviewDialog extends JFrame implements StatusListener {
setStatus(translator.getString("Status.Show"));
previewPanel.reload();
}
-
+
/**
* Changes the current visible page
* @param number the page number to go to
@@ -541,7 +541,7 @@ public class PreviewDialog extends JFrame implements StatusListener {
fopEx.printStackTrace();
}
}
-
+
public void setScaleToFitWidth() {
try {
setScale(previewPanel.getScaleToFitWidth() * 100);
diff --git a/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java b/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
index 734dc90dd..05e03fda0 100644
--- a/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
+++ b/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
@@ -51,7 +51,7 @@ import org.apache.fop.render.awt.AWTRenderer;
* <p>Use PreviewPanel when you want to embed a preview in your own application
* with your own controls. Use PreviewDialog when you want to use the standard
* Fop controls.
- * </p>
+ * </p>
* <p>In order to embed a PreviewPanel in your own app, create your own renderer,
* and your own agent. In order to support reloads, you may also implement your
* own Renderable extension or the default InputHandler. Setting the Renderable
@@ -109,7 +109,7 @@ public class PreviewPanel extends JPanel {
/** The FOUserAgent associated with this panel - often shared with PreviewDialog */
protected FOUserAgent foUserAgent;
/**
- * Renderable instance that can be used to reload and re-render a document after
+ * Renderable instance that can be used to reload and re-render a document after
* modifications.
*/
protected Renderable renderable;
@@ -142,7 +142,7 @@ public class PreviewPanel extends JPanel {
*/
private ViewportScroller scroller;
-
+
/**
* Creates a new PreviewPanel instance.
* @param foUserAgent the user agent
@@ -170,7 +170,7 @@ public class PreviewPanel extends JPanel {
previewArea.setMinimumSize(new Dimension(50, 50));
add(previewArea);
}
-
+
/**
* @return the currently visible page
*/
@@ -242,12 +242,12 @@ public class PreviewPanel extends JPanel {
private int startPosX = 0;
/** Starting position of a mouse drag - Y co-ordinate */
private int startPosY = 0;
-
+
ViewportScroller(JViewport vp) {
viewport = vp;
}
- // ***** MouseMotionListener *****
+ // ***** MouseMotionListener *****
public synchronized void mouseDragged(MouseEvent e) {
if (viewport == null) {
@@ -261,7 +261,7 @@ public class PreviewPanel extends JPanel {
int viewHeight = viewport.getExtentSize().height;
int imageWidth = viewport.getViewSize().width;
int imageHeight = viewport.getViewSize().height;
-
+
Point viewPoint = viewport.getViewPosition();
int viewX = Math.max(0, Math.min(imageWidth - viewWidth, viewPoint.x - xmove));
int viewY = Math.max(0, Math.min(imageHeight - viewHeight, viewPoint.y - ymove));
diff --git a/src/java/org/apache/fop/render/awt/viewer/Renderable.java b/src/java/org/apache/fop/render/awt/viewer/Renderable.java
index 5324ff8d7..c40272220 100644
--- a/src/java/org/apache/fop/render/awt/viewer/Renderable.java
+++ b/src/java/org/apache/fop/render/awt/viewer/Renderable.java
@@ -35,5 +35,5 @@ public interface Renderable {
*/
void renderTo(FOUserAgent userAgent, String outputFormat)
throws FOPException;
-
+
}
diff --git a/src/java/org/apache/fop/render/awt/viewer/StatusListener.java b/src/java/org/apache/fop/render/awt/viewer/StatusListener.java
index 6a7cf7d9b..d145d7718 100644
--- a/src/java/org/apache/fop/render/awt/viewer/StatusListener.java
+++ b/src/java/org/apache/fop/render/awt/viewer/StatusListener.java
@@ -26,9 +26,9 @@ public interface StatusListener {
/** Called when a page has been renderered. */
void notifyPageRendered();
-
+
/** Called when the renderer has stopped. */
void notifyRendererStopped();
-
+
}
diff --git a/src/java/org/apache/fop/render/awt/viewer/Translator.java b/src/java/org/apache/fop/render/awt/viewer/Translator.java
index 6ae76be5b..df07a987f 100644
--- a/src/java/org/apache/fop/render/awt/viewer/Translator.java
+++ b/src/java/org/apache/fop/render/awt/viewer/Translator.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render.awt.viewer;
//Java
@@ -29,7 +29,7 @@ import java.util.Locale;
* Stanislav.Gorkhover@jCatalog.com
*/
public class Translator {
-
+
private ResourceBundle bundle;
private static String bundleBaseName = "org/apache/fop/render/awt/viewer/resources/Viewer";