[FOray-commit] SF.net SVN: foray: [9906] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-07-02 17:30:50
|
Revision: 9906
http://svn.sourceforge.net/foray/?rev=9906&view=rev
Author: victormote
Date: 2007-07-02 10:30:45 -0700 (Mon, 02 Jul 2007)
Log Message:
-----------
Conform to axsl method name changes.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/FOrayGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java
trunk/foray/foray-graphic/src/javatest/org/foray/graphic/TestSvgGraphic.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFContentStream.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormEps.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXObject.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/EPSGraphic.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -323,7 +323,7 @@
/**
* {@inheritDoc}
*/
- public float[] getBBox() {
+ public float[] getBoundingBox() {
return this.bbox;
}
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/FOrayGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/FOrayGraphic.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/FOrayGraphic.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -147,7 +147,7 @@
/**
* {@inheritDoc}
*/
- public URL getURL() {
+ public URL getUrl() {
return this.url;
}
@@ -523,14 +523,6 @@
}
/**
- * Returns the URL containing this graphic.
- * @return Returns the URL.
- */
- public URL getUrl() {
- return this.url;
- }
-
- /**
* Sets the height in pixels of this graphic.
* @param pixelHeight The new height in pixels.
*/
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -137,7 +137,7 @@
/**
* {@inheritDoc}
*/
- public SVGDocument getSVGDocument() throws GraphicException {
+ public SVGDocument getSvgDocument() throws GraphicException {
if (doc == null) {
this.loadImage();
}
@@ -245,7 +245,7 @@
final Rectangle2D.Float clipRectangle, final int pageHeight) {
SVGDocument svgDocument;
try {
- svgDocument = this.getSVGDocument();
+ svgDocument = this.getSvgDocument();
} catch (final GraphicException e) {
/* For some reason the SVGDocument is not usable. There is nothing
* to do. */
@@ -318,14 +318,14 @@
/**
* {@inheritDoc}
*/
- public void drawPS(final OutputStream output,
+ public void drawPs(final OutputStream output,
final FontConsumer fontConsumer, final boolean strokeText,
final boolean commentsEnabled) {
final CharacterOutputStream cos = new CharacterOutputStream(output,
commentsEnabled);
SVGDocument doc = null;
try {
- doc = this.getSVGDocument();
+ doc = this.getSvgDocument();
} catch (final GraphicException e) {
this.getLogger().error("Error getting SVGDocument in "
+ this.getClass().getName());
@@ -378,7 +378,7 @@
throws GraphicException {
SVGDocument doc = null;
try {
- doc = this.getSVGDocument();
+ doc = this.getSvgDocument();
} catch (final GraphicException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -454,7 +454,7 @@
public void drawPdfDocument(final OutputStream output)
throws GraphicException {
/* Make sure the document has been parsed. */
- this.getSVGDocument();
+ this.getSvgDocument();
/* This uses the FOP/Batik PDF Transcoder to convert the SVG to PDF. */
final PDFTranscoder pdfTranscoder = new PDFTranscoder();
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -91,7 +91,7 @@
/**
* {@inheritDoc}
*/
- public URL getURL() {
+ public URL getUrl() {
return url;
}
Modified: trunk/foray/foray-graphic/src/javatest/org/foray/graphic/TestSvgGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/javatest/org/foray/graphic/TestSvgGraphic.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-graphic/src/javatest/org/foray/graphic/TestSvgGraphic.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -68,7 +68,7 @@
final SVGGraphic svg = (SVGGraphic) graphic;
assertEquals(200, svg.pixelWidth());
assertEquals(50, svg.pixelHeight());
- final SVGDocument svgDoc = svg.getSVGDocument();
+ final SVGDocument svgDoc = svg.getSvgDocument();
assertNotNull(svgDoc);
/* This test is a Batik-specific test, and should fail if we change
@@ -139,7 +139,7 @@
assertTrue(graphic instanceof SVGGraphic);
final SVGGraphic svg = (SVGGraphic) graphic;
- final SVGDocument svgDoc = svg.getSVGDocument();
+ final SVGDocument svgDoc = svg.getSvgDocument();
assertNotNull(svgDoc);
assertTrue(svgDoc instanceof SVGOMDocument);
/* We need this cast to get the CSS implementation and access to the
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFContentStream.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFContentStream.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFContentStream.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -316,7 +316,7 @@
}
if (xObject == null) {
getLogger().error("Don't know how to process graphic:" + MSG_EOL
- + image.getURL());
+ + image.getUrl());
return;
}
closeTextObject();
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormEps.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormEps.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormEps.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -67,7 +67,7 @@
* {@inheritDoc}
*/
protected byte[] getPdfContent() throws GraphicException {
- final File file = new File(getGraphic().getURL().getFile());
+ final File file = new File(getGraphic().getUrl().getFile());
PSInputFile psInput = null;
try {
psInput = new PSInputFile(file);
@@ -93,7 +93,7 @@
public float getHorizontalScaling(
final Rectangle2D.Float contentRectangle) {
final EpsGraphic eps = this.getGraphic();
- final float graphicWidth = FOrayBoundingBox.width(eps.getBBox());
+ final float graphicWidth = FOrayBoundingBox.width(eps.getBoundingBox());
return contentRectangle.width / graphicWidth;
}
@@ -102,7 +102,8 @@
*/
public float getVerticalScaling(final Rectangle2D.Float contentRectangle) {
final EpsGraphic eps = this.getGraphic();
- final float graphicHeight = FOrayBoundingBox.height(eps.getBBox());
+ final float graphicHeight = FOrayBoundingBox.height(
+ eps.getBoundingBox());
return contentRectangle.height / graphicHeight;
}
@@ -117,7 +118,7 @@
* {@inheritDoc}
*/
protected float[] getBoundingBox() {
- return this.graphic.getBBox();
+ return this.graphic.getBoundingBox();
}
/**
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXObject.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXObject.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXObject.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -77,7 +77,7 @@
if (graphic == null) {
throw new NullPointerException("Graphic must not be null.");
}
- this.xNumber = doc.registerXObjectResource(this, graphic.getURL());
+ this.xNumber = doc.registerXObjectResource(this, graphic.getUrl());
}
/**
@@ -95,7 +95,7 @@
final Graphic img, final FontConsumer fontConsumer,
final boolean strokeText) throws GraphicException {
/* If it has already been created, reuse it ... */
- PDFXObject xObject = pdfDoc.findXObject(img.getURL());
+ PDFXObject xObject = pdfDoc.findXObject(img.getUrl());
if (xObject != null) {
return xObject;
}
@@ -187,7 +187,7 @@
return filter;
default:
throw new GraphicException("Error while loading image "
- + graphic.getURL() + " : "
+ + graphic.getUrl() + " : "
+ this.getClass() + " - "
+ "unsupported compression value "
+ imageCompression);
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -519,7 +519,7 @@
Renderer.convertMillipointRectangle(contentRect), null);
} else {
- final String urlString = img.getURL().toString();
+ final String urlString = img.getUrl().toString();
try {
final URL url = URLFactory.createURL(urlString);
Modified: trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -556,7 +556,7 @@
+ " translate");
this.write(sx * at.getScaleX() + " " + sy * at.getScaleY()
+ " scale");
- svgGraphic.drawPS(this.getOutputStream(), area.getFontConsumer(), false,
+ svgGraphic.drawPs(this.getOutputStream(), area.getFontConsumer(), false,
this.enableComments);
this.write("grestore");
this.comment("% --- SVG Area end");
@@ -660,7 +660,7 @@
*/
public byte[] epsToPostScript(final EpsGraphic image, final int x,
final int y, final int w, final int h) throws GraphicException {
- final float[] bbox = image.getBBox();
+ final float[] bbox = image.getBoundingBox();
final float bboxw = FOrayBoundingBox.width(bbox);
final float bboxh = FOrayBoundingBox.height(bbox);
Modified: trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -578,7 +578,7 @@
final float y) {
Document doc = null;
try {
- doc = svgGraphic.getSVGDocument();
+ doc = svgGraphic.getSvgDocument();
} catch (final GraphicException e) {
this.getLogger().error("Error getting SVGDocument in "
+ this.getClass().getName());
Modified: trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -459,7 +459,7 @@
final int namew = (int) (w * this.xFactor);
if (namew > MINIMUM_GRAPHIC_WIDTH) {
- final String iname = img.getURL().toString();
+ final String iname = img.getUrl().toString();
if (iname.length() >= namew) {
addStr((int) ((this.pageHeight
- (y / MILLIPOINTS_PER_DECIPOINT))
Modified: trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2007-07-02 17:19:54 UTC (rev 9905)
+++ trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2007-07-02 17:30:45 UTC (rev 9906)
@@ -367,7 +367,7 @@
outputGeneratedBy(area, attributes);
outputDimension(area, attributes);
outputAttribute(attributes, "url",
- area.getGraphic().getURL().toExternalForm());
+ area.getGraphic().getUrl().toExternalForm());
writeStartTag(area, attributes);
outputAllRectangles(area);
writeEndTag(area);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|