[FOray-commit] SF.net SVN: foray:[10717] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2009-03-19 17:02:05
|
Revision: 10717
http://foray.svn.sourceforge.net/foray/?rev=10717&view=rev
Author: victormote
Date: 2009-03-19 17:01:51 +0000 (Thu, 19 Mar 2009)
Log Message:
-----------
Remove unnecessary dependency on PDFDocument.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphics2D.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFLink.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFPage.java
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphics2D.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphics2D.java 2009-03-19 16:44:01 UTC (rev 10716)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphics2D.java 2009-03-19 17:01:51 UTC (rev 10717)
@@ -278,7 +278,7 @@
PDFLink link = null;
if (externalLink) {
final String pdfdest = "/XYZ " + dest;
- link = new PDFLink(this.pdfDoc, pdfPage, linkRectangle, pdfdest);
+ link = new PDFLink(pdfPage, linkRectangle, pdfdest);
} else {
link = pdfPage.makeLink(linkRectangle, dest, false);
}
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFLink.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFLink.java 2009-03-19 16:44:01 UTC (rev 10716)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFLink.java 2009-03-19 17:01:51 UTC (rev 10717)
@@ -51,56 +51,48 @@
/**
* Create a PDFLink object.
- * @param doc The parent PDF document.
* @param page The page on which this link exists.
* @param rect The rectangle which outlines the link. All dimension in the
* rectangle should be expressed in 1/1000ths of a user space unit.
*/
- private PDFLink(final PDFDocument doc, final PDFPage page,
- final Rectangle2D rect) {
- super(doc, rect);
+ private PDFLink(final PDFPage page, final Rectangle2D rect) {
+ super(page.getPDFDocument(), rect);
}
/**
* Constructor for a link to a named destination.
- * @param doc The parent PDF document.
* @param page The page on which this link exists.
* @param rect The rectangle which outlines the link. All dimension in the
* rectangle should be expressed in 1/1000ths of a user space unit.
* @param destinationName The name of the destination to which this link
* points.
*/
- public PDFLink(final PDFDocument doc, final PDFPage page,
- final Rectangle2D rect, final String destinationName) {
- this(doc, page, rect);
- this.destinationName = new PDFTextString(doc, destinationName);
+ public PDFLink(final PDFPage page, final Rectangle2D rect, final String destinationName) {
+ this(page, rect);
+ this.destinationName = new PDFTextString(page.getPDFDocument(), destinationName);
}
/**
* Constructor for a link to a named destination.
- * @param doc The parent PDF document.
* @param page The page on which this link exists.
* @param rect The rectangle which outlines the link. All dimension in the
* rectangle should be expressed in 1/1000ths of a user space unit.
* @param destination The destination to which this link points.
*/
- public PDFLink(final PDFDocument doc, final PDFPage page,
- final Rectangle2D rect, final PDFDestination destination) {
- this(doc, page, rect);
+ public PDFLink(final PDFPage page, final Rectangle2D rect, final PDFDestination destination) {
+ this(page, rect);
this.destination = destination;
}
/**
* Constructor for a link to an action.
- * @param doc The parent PDF document.
* @param page The page on which this link exists.
* @param rect The rectangle which outlines the link. All dimension in the
* rectangle should be expressed in 1/1000ths of a user space unit.
* @param action The action to be activated by this link.
*/
- public PDFLink(final PDFDocument doc, final PDFPage page,
- final Rectangle2D rect, final PDFAction action) {
- this(doc, page, rect);
+ public PDFLink(final PDFPage page, final Rectangle2D rect, final PDFAction action) {
+ this(page, rect);
this.action = action;
}
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFPage.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFPage.java 2009-03-19 16:44:01 UTC (rev 10716)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFPage.java 2009-03-19 17:01:51 UTC (rev 10717)
@@ -194,9 +194,9 @@
} else { // URI
action = new PDFUri(destination);
}
- link = new PDFLink(pdfDoc, this, rect, action);
+ link = new PDFLink(this, rect, action);
} else { // linkType is internal
- link = new PDFLink(pdfDoc, this, rect, destination);
+ link = new PDFLink(this, rect, destination);
}
getAnnotList().addAnnotation(link);
return link;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|