Thread: [FOray-commit] SF.net SVN: foray: [10240] trunk/foray (Page 22)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-10-04 19:42:54
|
Revision: 10240
http://foray.svn.sourceforge.net/foray/?rev=10240&view=rev
Author: victormote
Date: 2007-10-04 12:42:55 -0700 (Thu, 04 Oct 2007)
Log Message:
-----------
Include word-spacing in the computation of line lengths for line-breaking purposes.
Modified Paths:
--------------
trunk/foray/doc/web/app/features/graphics.html
trunk/foray/foray-app/src/javatest/org/foray/app/area/TestBlock.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java
trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java
Modified: trunk/foray/doc/web/app/features/graphics.html
===================================================================
--- trunk/foray/doc/web/app/features/graphics.html 2007-10-03 23:30:47 UTC (rev 10239)
+++ trunk/foray/doc/web/app/features/graphics.html 2007-10-04 19:42:55 UTC (rev 10240)
@@ -83,6 +83,11 @@
<a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
<td colspan="1" rowspan="1">vector (with embedded bitmaps)</td>
</tr>
+ <tr>
+ <td colspan="1" rowspan="1">
+ <a href="#mathml">MathML</a> (Mathematical Markup Language)</td>
+ <td colspan="1" rowspan="1">descriptive</td>
+ </tr>
</table>
<h2><a name="bmp">BMP</a></h2>
@@ -115,8 +120,8 @@
<p>FOray provides support for two output targets:</p>
<ul>
<li>PostScript (full support).</li>
- <li>PDF (partial support). Starting with releases after 0.2, and including
- current repository code, FOray now includes a partially-implemented
+ <li>PDF (partial support).
+ Starting with release 0.3, FOray includes a partially-implemented
built-in PostScript interpreter and support for converting supported
PostScript input to PDF output. The current implementation covers enough
of the PostScript operators to support many simple graphics. FOray logs
@@ -221,6 +226,10 @@
is opaque. </li>
</ul>
+ <h2><a name="mathml">MathML (Mathematical Markup Language)</a></h2>
+ <p>FOray supports MathML documents in fo:external-graphic, using
+ <a rel="external" href="http://jeuclid.sourceforge.net/">JEuclid</a>. We
+ hope to add support for fo:instream-foreign-object in a future release.</p>
<hr/>
<h2><a name="resolution">Resolution</a></h2>
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/area/TestBlock.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/area/TestBlock.java 2007-10-03 23:30:47 UTC (rev 10239)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/area/TestBlock.java 2007-10-04 19:42:55 UTC (rev 10240)
@@ -332,22 +332,21 @@
* + space(278)
* + W(944) + o(556) + r(333) + d(556)
* + space(278)
- * + S(556) + p(556) + a(556) + c(500) + i(222) + n(556) + g(556)
- * = 12,616.
+ * + S(667) + p(556) + a(556) + c(500) + i(222) + n(556) + g(556)
+ * = 12,727.
* If these are scaled to 12 points, the millipoints used are 12,616
- * * 12 = 151,392.
+ * * 12 = 152,724.
* The extra word spacing is .3em = .3 * 12000 * 3 occurrences = 10,800.
- * Total ipd of text-area = 151,392 + 10,800 = */
+ * Total ipd of text-area = 152,724 + 10,800 = 163,524. */
+ assertEquals(163524, textArea.crIpd());
- /* TODO: Turn these tests back on after the code has been fixed. */
-// assertEquals(162192, textArea.crIpd());
-
/* The x value of the text area content rectangle should be at the x
* location of the parent line area + 1/2 of the unused area in the
* line. Total line area ipd = 468,000. Unused line area ipd =
- * 468,000 - 92,040 = 375,960. One half of the unused line area ipd =
- * 187,980. x = 72,000 + 187,980 = 259,980. */
-// assertEquals(259980, textArea.crOriginX());
+ * 468,000 - 163,524 = 304,476. One half of the unused line area ipd =
+ * 152,238.
+ * x = 72,000 + 152,238 = 224,238. */
+ assertEquals(224238, textArea.crOriginX());
/* The y value of the text area content rectangle should be the same as
* the parent line area. */
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java 2007-10-03 23:30:47 UTC (rev 10239)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOLineText.java 2007-10-04 19:42:55 UTC (rev 10240)
@@ -131,6 +131,20 @@
/**
* {@inheritDoc}
*/
+ public int inlineWordSpacingOptimum() {
+ return this.realLineText.inlineWordSpacingOptimum(this.context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineWordSpacingOptimum(final FoContext context) {
+ return this.realLineText.inlineWordSpacingOptimum(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public boolean inlineWrapOption() {
return this.realLineText.inlineWrapOption(this.context);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2007-10-03 23:30:47 UTC (rev 10239)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Character.java 2007-10-04 19:42:55 UTC (rev 10240)
@@ -272,6 +272,21 @@
/**
* {@inheritDoc}
*/
+ public int inlineWordSpacingOptimum() {
+ return this.inlineWordSpacingOptimum(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineWordSpacingOptimum(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.traitWordSpacingOpt(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public boolean inlineWrapOption() {
return this.inlineWrapOption(null);
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2007-10-03 23:30:47 UTC (rev 10239)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/CharacterSequence4a.java 2007-10-04 19:42:55 UTC (rev 10240)
@@ -613,6 +613,21 @@
/**
* {@inheritDoc}
*/
+ public int inlineWordSpacingOptimum() {
+ return this.inlineWordSpacingOptimum(null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int inlineWordSpacingOptimum(final FoContext context) {
+ final FObj effectiveParent = effectiveParent(context);
+ return effectiveParent.traitWordSpacingOpt(context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public boolean inlineWrapOption() {
return this.inlineWrapOption(null);
}
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2007-10-03 23:30:47 UTC (rev 10239)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2007-10-04 19:42:55 UTC (rev 10240)
@@ -246,15 +246,18 @@
if (isZeroWidthSpace(codePoint)) {
return getCharWidth(lineText, codePoint);
}
+ int charWidth = 0;
if (isWhitespace(codePoint)) {
if ((codePoint == '\n')
|| (codePoint == '\r')
|| (codePoint == '\t')) {
- return whitespaceWidth;
+ charWidth = whitespaceWidth;
+ } else {
+ charWidth = getCharWidth(lineText, codePoint);
}
- return getCharWidth(lineText, codePoint);
+ return charWidth;
}
- int charWidth = getCharWidth(lineText, codePoint);
+ charWidth = getCharWidth(lineText, codePoint);
if (charWidth <= 0) {
charWidth = whitespaceWidth;
}
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2007-10-03 23:30:47 UTC (rev 10239)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2007-10-04 19:42:55 UTC (rev 10240)
@@ -128,7 +128,8 @@
} else {
this.canEatLeadingSpaces = true;
}
- final int whitespaceWidth = getCharWidth(lineText, ' ');
+ int whitespaceWidth = getCharWidth(lineText, ' ');
+ whitespaceWidth += lineText.inlineWordSpacingOptimum();
// Bound start and end by the limits of the array.
int startIndex = start;
@@ -342,6 +343,7 @@
}
if (! this.canEatLeadingSpaces) {
this.spaceWidth += getCharWidth(lineText, codePoint);
+ this.spaceWidth += lineText.inlineWordSpacingOptimum();
}
this.previousCharacter = SolitaryLineBreaker.CONNECTOR;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-05 17:24:53
|
Revision: 10242
http://foray.svn.sourceforge.net/foray/?rev=10242&view=rev
Author: victormote
Date: 2007-10-05 10:24:57 -0700 (Fri, 05 Oct 2007)
Log Message:
-----------
Conform to axsl method name changes and additional exceptions thrown.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.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
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 16:18:09 UTC (rev 10241)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 17:24:57 UTC (rev 10242)
@@ -240,7 +240,7 @@
/**
* {@inheritDoc}
*/
- public void awtPaint(final Graphics2D graphics,
+ public void drawGraphics2D(final Graphics2D graphics,
final Rectangle2D.Float contentRectangle,
final Rectangle2D.Float clipRectangle, final int pageHeight) {
SVGDocument svgDocument;
@@ -372,7 +372,7 @@
/**
* {@inheritDoc}
*/
- public void drawPdfStreamContent(final OutputStream output,
+ public void drawPdf(final OutputStream output,
final GraphicPdfContext pdfContext,
final FontConsumer fontConsumer, final boolean strokeText)
throws GraphicException {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.java 2007-10-05 16:18:09 UTC (rev 10241)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.java 2007-10-05 17:24:57 UTC (rev 10242)
@@ -77,7 +77,7 @@
*/
protected byte[] getPdfContent() throws GraphicException {
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- this.graphic.drawPdfStreamContent(outputStream, this.getPDFDocument(),
+ this.graphic.drawPdf(outputStream, this.getPDFDocument(),
this.fontConsumer, this.strokeText);
return outputStream.toByteArray();
}
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-10-05 16:18:09 UTC (rev 10241)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-10-05 17:24:57 UTC (rev 10242)
@@ -57,6 +57,7 @@
import org.axsl.galley.Page;
import org.axsl.galley.TextArea;
import org.axsl.graphic.Graphic;
+import org.axsl.graphic.GraphicException;
import org.axsl.graphic.SvgGraphic;
import org.axsl.output.OutputException;
@@ -742,8 +743,12 @@
protected void renderSVGDocument(final SvgGraphic graphic,
final Rectangle2D.Float contentRectangle,
final Rectangle2D.Float clipRectangle) {
- graphic.awtPaint(this.graphics, contentRectangle, clipRectangle,
- this.pageHeight);
+ try {
+ graphic.drawGraphics2D(this.graphics, contentRectangle,
+ clipRectangle, this.pageHeight);
+ } catch (final GraphicException e) {
+ /* TODO: Consider logging/displaying a warning. */
+ }
}
/**
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-10-05 16:18:09 UTC (rev 10241)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2007-10-05 17:24:57 UTC (rev 10242)
@@ -552,8 +552,12 @@
+ " translate");
this.write(sx * at.getScaleX() + " " + sy * at.getScaleY()
+ " scale");
- svgGraphic.drawPs(this.getOutputStream(), this.getFontConsumer(), false,
- this.enableComments);
+ try {
+ svgGraphic.drawPs(this.getOutputStream(), this.getFontConsumer(),
+ false, this.enableComments);
+ } catch (final GraphicException e) {
+ /* TODO: Consider logging a warning. */
+ }
this.write("grestore");
this.comment("% --- SVG Area end");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-05 17:43:15
|
Revision: 10243
http://foray.svn.sourceforge.net/foray/?rev=10243&view=rev
Author: victormote
Date: 2007-10-05 10:43:14 -0700 (Fri, 05 Oct 2007)
Log Message:
-----------
1. Conform to axsl changes removing method that converts an SVG to a PDF document.
2. Remove the Batik PDF Transcoder from the lib. It is no longer needed.
Modified Paths:
--------------
trunk/foray/foray-graphic/.classpath
trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
Removed Paths:
-------------
trunk/foray/lib/batik-1.6-pdf-transcoder.jar
Modified: trunk/foray/foray-graphic/.classpath
===================================================================
--- trunk/foray/foray-graphic/.classpath 2007-10-05 17:24:57 UTC (rev 10242)
+++ trunk/foray/foray-graphic/.classpath 2007-10-05 17:43:14 UTC (rev 10243)
@@ -24,7 +24,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/FOrayPDF"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-awt-util.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-ext.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
- <classpathentry kind="lib" path="/FOray Lib/batik-1.6-pdf-transcoder.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-pdf-transcoder-src.zip"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslPs"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-svggen.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
<classpathentry kind="lib" path="/FOray Lib/jeuclid-core-3.0.1.jar" sourcepath="/FOray Lib-Build/jeuclid/jeuclid-3.0.1-source.zip"/>
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 17:24:57 UTC (rev 10242)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 17:43:14 UTC (rev 10243)
@@ -30,7 +30,6 @@
import org.foray.common.CharacterOutputStream;
import org.foray.common.Environment;
-import org.foray.common.url.URLFactory;
import org.foray.graphic.batik.BatikUaAwt;
import org.foray.graphic.batik.BatikUaDocument;
import org.foray.graphic.batik.PDFAElementBridge;
@@ -53,10 +52,6 @@
import org.apache.batik.gvt.GraphicsNode;
import org.apache.batik.gvt.TextPainter;
import org.apache.batik.gvt.renderer.StrokingTextPainter;
-import org.apache.batik.transcoder.TranscoderException;
-import org.apache.batik.transcoder.TranscoderInput;
-import org.apache.batik.transcoder.TranscoderOutput;
-import org.apache.fop.svg.PDFTranscoder;
import org.apache.xmlgraphics.java2d.GraphicContext;
import org.w3c.dom.Element;
@@ -68,10 +63,7 @@
import java.awt.geom.NoninvertibleTransformException;
import java.awt.geom.Rectangle2D;
import java.io.BufferedInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
@@ -81,9 +73,6 @@
public class SVGGraphic extends Graphic4a
implements org.axsl.graphic.SvgGraphic {
- /** Constant for the number of command-line arguments needed. */
- private static final int QTY_CL_ARGS = 3;
-
/** The encapsulated SVG document. */
private SVGDocument doc;
@@ -451,89 +440,6 @@
/**
* {@inheritDoc}
*/
- public void drawPdfDocument(final OutputStream output)
- throws GraphicException {
- /* Make sure the document has been parsed. */
- this.getSvgDocument();
-
- /* This uses the FOP/Batik PDF Transcoder to convert the SVG to PDF. */
- final PDFTranscoder pdfTranscoder = new PDFTranscoder();
- final TranscoderInput tcInput = new TranscoderInput(this.doc);
- final TranscoderOutput tcOutput = new TranscoderOutput(output);
- try {
- pdfTranscoder.transcode(tcInput, tcOutput);
- } catch (final TranscoderException e) {
- throw new GraphicException(e);
- }
- try {
- output.flush();
- output.close();
- } catch (final IOException e) {
- throw new GraphicException(e);
- }
- }
-
- /**
- * Command-line interface for converting an SVG document to a PDF document.
- * @param args The command-line arguments. There should be exactly three.
- * <ol>
- * <li>The URL to the SVG document to be converted.
- * <li>The output format. Currently only "pdf" is supported.
- * <li>The File where the PDF should be written.
- * </ol>
- */
- public static void main(final String[] args) {
- if (args.length != SVGGraphic.QTY_CL_ARGS) {
- System.err.println("There must be exactly three arguments.");
- System.exit(1);
- }
- final String inputString = args[0];
- final String outputFormat = args[1];
- final String outputString = args[2];
-
- /* Get the SVG instance for input. */
- final GraphicServer4a server = new GraphicServer4a(null);
- URL input = null;
- InputStream inputStream = null;
- try {
- input = URLFactory.createURL(inputString);
- inputStream = input.openStream();
- } catch (final IOException e) {
- System.err.println("Error opening input: " + inputString
- + "\n" + e.getMessage());
- System.exit(1);
- }
- final BufferedInputStream bis = new BufferedInputStream(inputStream);
- final SVGGraphic svg = new SVGGraphic(server, input, bis);
-
- /* Get the file for output. */
- FileOutputStream fos = null;
- try {
- fos = new FileOutputStream(outputString);
- } catch (final FileNotFoundException e) {
- System.out.println("Error opening output: " + outputString
- + "\n" + e.getMessage());
- System.exit(1);
- }
-
- /* Do the conversion. */
- if (outputFormat.equals("pdf")) {
- try {
- svg.drawPdfDocument(fos);
- } catch (final GraphicException e) {
- System.err.println("Error in conversion:\n" + e.getMessage());
- System.exit(1);
- }
- } else {
- System.err.println("Unsupported output format: " + outputFormat);
- System.exit(1);
- }
- System.exit(0);
- }
-
- /**
- * {@inheritDoc}
- */
public int absoluteWidthReal() throws GraphicException {
return -1;
}
Deleted: trunk/foray/lib/batik-1.6-pdf-transcoder.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-05 18:26:48
|
Revision: 10245
http://foray.svn.sourceforge.net/foray/?rev=10245&view=rev
Author: victormote
Date: 2007-10-05 11:26:52 -0700 (Fri, 05 Oct 2007)
Log Message:
-----------
Conform to axsl changes removing unnecessary parameter.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 18:17:19 UTC (rev 10244)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 18:26:52 UTC (rev 10245)
@@ -230,8 +230,7 @@
* {@inheritDoc}
*/
public void drawGraphics2D(final Graphics2D graphics,
- final Rectangle2D.Float contentRectangle,
- final Rectangle2D.Float clipRectangle, final int pageHeight) {
+ final Rectangle2D.Float contentRectangle, final int pageHeight) {
SVGDocument svgDocument;
try {
svgDocument = this.getSvgDocument();
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-10-05 18:17:19 UTC (rev 10244)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-10-05 18:26:52 UTC (rev 10245)
@@ -745,7 +745,7 @@
final Rectangle2D.Float clipRectangle) {
try {
graphic.drawGraphics2D(this.graphics, contentRectangle,
- clipRectangle, this.pageHeight);
+ this.pageHeight);
} catch (final GraphicException e) {
/* TODO: Consider logging/displaying a warning. */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-05 20:15:32
|
Revision: 10246
http://foray.svn.sourceforge.net/foray/?rev=10246&view=rev
Author: victormote
Date: 2007-10-05 13:15:33 -0700 (Fri, 05 Oct 2007)
Log Message:
-----------
Conform to axsl changes removing unnecessary parameter.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
Added Paths:
-----------
trunk/foray/foray-common/src/java/org/foray/common/Java2dUtil.java
Added: trunk/foray/foray-common/src/java/org/foray/common/Java2dUtil.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/Java2dUtil.java (rev 0)
+++ trunk/foray/foray-common/src/java/org/foray/common/Java2dUtil.java 2007-10-05 20:15:33 UTC (rev 10246)
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common;
+
+import java.awt.geom.Rectangle2D;
+
+/**
+ * Utilities for Java2D.
+ */
+public final class Java2dUtil {
+
+ /**
+ * Private Constructor. This class is a utility class, and should never be
+ * instantiated.
+ */
+ private Java2dUtil() { }
+
+ /**
+ * Converts a rectangle from the FOray area tree coordinate system to the
+ * Java2D user space coordinate system.
+ * The FOray coordinate system maps 0,0 to the lower left corner of the
+ * page.
+ * The Java2D coordinate system maps 0,0 to the upper left corner of the
+ * page.
+ * @param inputRectangle The rectangle expressed in FOray area tree
+ * coordinates.
+ * @param pageHeight The height of the page on which the rectangle will be
+ * placed.
+ * @return A new Rectangle2D instance with the coordinates expressed in
+ * Java2D user space.
+ */
+ public static Rectangle2D.Float areaToJava2dCoordinates(
+ final Rectangle2D.Float inputRectangle, final float pageHeight) {
+ final Rectangle2D.Float outputRectangle = new Rectangle2D.Float();
+ outputRectangle.setRect(inputRectangle.x, pageHeight - inputRectangle.y,
+ inputRectangle.width, inputRectangle.height);
+ return outputRectangle;
+ }
+
+}
Property changes on: trunk/foray/foray-common/src/java/org/foray/common/Java2dUtil.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 18:26:52 UTC (rev 10245)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 20:15:33 UTC (rev 10246)
@@ -230,15 +230,9 @@
* {@inheritDoc}
*/
public void drawGraphics2D(final Graphics2D graphics,
- final Rectangle2D.Float contentRectangle, final int pageHeight) {
+ final Rectangle2D.Float contentRectangle) throws GraphicException {
SVGDocument svgDocument;
- try {
- svgDocument = this.getSvgDocument();
- } catch (final GraphicException e) {
- /* For some reason the SVGDocument is not usable. There is nothing
- * to do. */
- return;
- }
+ svgDocument = this.getSvgDocument();
final float x = contentRectangle.x;
final float y = contentRectangle.y;
final float w = contentRectangle.width;
@@ -248,7 +242,7 @@
return;
}
- graphics.translate(x, pageHeight - y);
+ graphics.translate(x, y);
final SVGSVGElement svg = svgDocument.getRootElement();
final AffineTransform at = ViewBox.getPreserveAspectRatioTransform(svg,
@@ -271,7 +265,7 @@
if (inverse != null && !inverse.isIdentity()) {
graphics.transform(inverse);
}
- graphics.translate(- x, y - pageHeight);
+ graphics.translate(-x, -y);
}
/**
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-10-05 18:26:52 UTC (rev 10245)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-10-05 20:15:33 UTC (rev 10246)
@@ -744,8 +744,7 @@
final Rectangle2D.Float contentRectangle,
final Rectangle2D.Float clipRectangle) {
try {
- graphic.drawGraphics2D(this.graphics, contentRectangle,
- this.pageHeight);
+ graphic.drawGraphics2D(this.graphics, contentRectangle);
} catch (final GraphicException e) {
/* TODO: Consider logging/displaying a warning. */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-05 22:18:02
|
Revision: 10247
http://foray.svn.sourceforge.net/foray/?rev=10247&view=rev
Author: victormote
Date: 2007-10-05 15:18:06 -0700 (Fri, 05 Oct 2007)
Log Message:
-----------
Conform to axsl changes adding system for handling arbitrary output formats.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPDFFactory.java
trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPSFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java
Added Paths:
-----------
trunk/foray/foray-common/src/java/org/foray/common/Mime.java
Added: trunk/foray/foray-common/src/java/org/foray/common/Mime.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/Mime.java (rev 0)
+++ trunk/foray/foray-common/src/java/org/foray/common/Mime.java 2007-10-05 22:18:06 UTC (rev 10247)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.common;
+
+/**
+ * An enumeration of some mime-types.
+ */
+public enum Mime {
+
+ /** The MIME type for PDF. */
+ PDF("application/pdf"),
+
+ /** The MIME type for PostScript. */
+ POSTSCRIPT("application/postscript");
+
+ /** The string used to designate this mime type. */
+ private String mimeString;
+
+ /**
+ * Private Constructor.
+ * @param mimeString The string used to designate this mime type.
+ */
+ private Mime(final String mimeString) {
+ this.mimeString = mimeString;
+ }
+
+ /**
+ * Returns the string used to designate this mime type.
+ * @return The string used to designate this mime type.
+ */
+ public String getMimeString() {
+ return this.mimeString;
+ }
+
+}
Property changes on: trunk/foray/foray-common/src/java/org/foray/common/Mime.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-10-05 20:15:33 UTC (rev 10246)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-10-05 22:18:06 UTC (rev 10247)
@@ -974,16 +974,17 @@
/**
* {@inheritDoc}
*/
- public void registerFontOutputFactory(final FontOutputFactory factory)
- throws FontException {
+ public void registerFontOutputFactory(final FontOutputFactory factory) {
/* */
if (factory == null) {
- throw new FontException("Cannot register a null FontOutputFactory");
+ throw new NullPointerException("Cannot register a null "
+ + "FontOutputFactory");
}
final String mimeType = factory.getMimeType();
if (mimeType == null
|| mimeType.equals("")) {
- throw new FontException("Mime type invalid: " + mimeType);
+ throw new IllegalArgumentException("Mime type invalid: "
+ + mimeType);
}
this.fontOutputFactories.put(mimeType, factory);
}
@@ -991,7 +992,7 @@
/**
* Returns the output factory for a given mime type.
* @param mimeType The mime type for which an output factory is desired.
- * @return The appropriate output factor, or null if none is registered
+ * @return The appropriate output factory, or null if none is registered
* for the mime type.
*/
public FontOutputFactory getOutputFactory(final String mimeType) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPDFFactory.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPDFFactory.java 2007-10-05 20:15:33 UTC (rev 10246)
+++ trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPDFFactory.java 2007-10-05 22:18:06 UTC (rev 10247)
@@ -28,6 +28,7 @@
package org.foray.font.output;
+import org.foray.common.Mime;
import org.foray.font.FOrayFontUse;
import org.axsl.font.FontException;
@@ -58,7 +59,7 @@
* {@inheritDoc}
*/
public String getMimeType() {
- return FontOutput.MIME_PDF;
+ return Mime.PDF.getMimeString();
}
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPSFactory.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPSFactory.java 2007-10-05 20:15:33 UTC (rev 10246)
+++ trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPSFactory.java 2007-10-05 22:18:06 UTC (rev 10247)
@@ -28,6 +28,7 @@
package org.foray.font.output;
+import org.foray.common.Mime;
import org.foray.font.FOrayFontUse;
import org.axsl.font.FontException;
@@ -58,7 +59,7 @@
* {@inheritDoc}
*/
public String getMimeType() {
- return FontOutput.MIME_POSTSCRIPT;
+ return Mime.POSTSCRIPT.getMimeString();
}
}
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java 2007-10-05 20:15:33 UTC (rev 10246)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java 2007-10-05 22:18:06 UTC (rev 10247)
@@ -32,6 +32,8 @@
import org.foray.graphic.factory.GraphicFactory;
import org.axsl.graphic.GraphicException;
+import org.axsl.graphic.output.GraphicOutput;
+import org.axsl.graphic.output.GraphicOutputFactory;
import org.apache.commons.logging.Log;
@@ -583,4 +585,20 @@
this.links = links;
}
+ /**
+ * {@inheritDoc}
+ */
+ public GraphicOutput getGraphicOutput(final String mimeType) {
+ final GraphicOutputFactory factory = getServer().getOutputFactory(
+ mimeType);
+ GraphicOutput output = null;
+ try {
+ output = factory.createGraphicOutput(this);
+ } catch (final GraphicException e) {
+ getLogger().error("Error creating Graphic output for: " + mimeType
+ + "\n" + e.getMessage());
+ }
+ return output;
+ }
+
}
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2007-10-05 20:15:33 UTC (rev 10246)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2007-10-05 22:18:06 UTC (rev 10247)
@@ -43,8 +43,10 @@
import org.foray.graphic.factory.SVGFactory;
import org.foray.graphic.factory.TIFFFactory;
+import org.axsl.font.output.FontOutputFactory;
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.GraphicServer;
+import org.axsl.graphic.output.GraphicOutputFactory;
import org.apache.batik.dom.svg.SVGDOMImplementation;
import org.apache.batik.transcoder.TranscoderException;
@@ -107,6 +109,12 @@
= new HashMap<String, Graphic4a>();
/**
+ * Map of registered {@link FontOutputFactory} instances.
+ */
+ private Map<String, GraphicOutputFactory> graphicOutputFactories
+ = new HashMap<String, GraphicOutputFactory>();
+
+ /**
* Constructor.
* @param logger The logger.
*/
@@ -367,4 +375,41 @@
return document;
}
+ /**
+ * {@inheritDoc}
+ */
+ public void registerGraphicOutputFactory(
+ final GraphicOutputFactory factory) {
+ if (factory == null) {
+ throw new NullPointerException("Cannot register a null "
+ + "GraphicOutputFactory");
+ }
+ final String mimeType = factory.getMimeType();
+ if (mimeType == null
+ || mimeType.equals("")) {
+ throw new IllegalArgumentException("Mime type invalid: "
+ + mimeType);
+ }
+ this.graphicOutputFactories.put(mimeType, factory);
+
+ }
+
+ /**
+ * Returns the output factory for a given mime type.
+ * @param mimeType The mime type for which an output factory is desired.
+ * @return The appropriate output factory, or null if none is registered
+ * for the mime type.
+ */
+ public GraphicOutputFactory getOutputFactory(final String mimeType) {
+ return this.graphicOutputFactories.get(mimeType);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean graphicOutputFactoryAvailable(final String mimeType) {
+ final GraphicOutputFactory factory = getOutputFactory(mimeType);
+ return factory != null;
+ }
+
}
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java 2007-10-05 20:15:33 UTC (rev 10246)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java 2007-10-05 22:18:06 UTC (rev 10247)
@@ -33,6 +33,7 @@
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.GraphicLink;
+import org.axsl.graphic.output.GraphicOutput;
import java.awt.Color;
import java.awt.color.ColorSpace;
@@ -214,4 +215,11 @@
return TempImage.EMPTY_LINKS;
}
+ /**
+ * {@inheritDoc}
+ */
+ public GraphicOutput getGraphicOutput(final String mimeType) {
+ return null;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-05 23:58:22
|
Revision: 10248
http://foray.svn.sourceforge.net/foray/?rev=10248&view=rev
Author: victormote
Date: 2007-10-05 16:58:26 -0700 (Fri, 05 Oct 2007)
Log Message:
-----------
Conform to axsl changes moving svg-to-pdf output to the helper class for that purpose.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphics2D.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.java
Added Paths:
-----------
trunk/foray/foray-graphic/src/java/org/foray/graphic/output/
trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutput4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutputFactory4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicPdf4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicPdfFactory4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/output/SvgPdf.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/output/package.html
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2007-10-05 22:18:06 UTC (rev 10247)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2007-10-05 23:58:26 UTC (rev 10248)
@@ -42,6 +42,7 @@
import org.foray.graphic.factory.PNGFactory;
import org.foray.graphic.factory.SVGFactory;
import org.foray.graphic.factory.TIFFFactory;
+import org.foray.graphic.output.GraphicPdfFactory4a;
import org.axsl.font.output.FontOutputFactory;
import org.axsl.graphic.GraphicException;
@@ -125,6 +126,7 @@
}
this.svgParserClassName = SaxParser.getParserClassName();
registerStandardFactories();
+ registerStandardOutputFactories();
}
/**
@@ -155,6 +157,13 @@
}
/**
+ * Registers each of the standard output factories.
+ */
+ private void registerStandardOutputFactories() {
+ this.registerGraphicOutputFactory(new GraphicPdfFactory4a());
+ }
+
+ /**
* {@inheritDoc}
*/
public synchronized Graphic4a makeGraphic(final String href,
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 22:18:06 UTC (rev 10247)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 23:58:26 UTC (rev 10248)
@@ -29,18 +29,13 @@
package org.foray.graphic;
import org.foray.common.CharacterOutputStream;
-import org.foray.common.Environment;
import org.foray.graphic.batik.BatikUaAwt;
import org.foray.graphic.batik.BatikUaDocument;
-import org.foray.graphic.batik.PDFAElementBridge;
-import org.foray.graphic.batik.PDFGraphics2D;
-import org.foray.graphic.batik.PDFTextPainter;
import org.foray.graphic.batik.PSGraphics2D;
import org.axsl.font.FontConsumer;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
-import org.axsl.graphic.GraphicPdfContext;
import org.apache.batik.bridge.BridgeContext;
import org.apache.batik.bridge.GVTBuilder;
@@ -50,8 +45,6 @@
import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
import org.apache.batik.dom.svg.SVGOMDocument;
import org.apache.batik.gvt.GraphicsNode;
-import org.apache.batik.gvt.TextPainter;
-import org.apache.batik.gvt.renderer.StrokingTextPainter;
import org.apache.xmlgraphics.java2d.GraphicContext;
import org.w3c.dom.Element;
@@ -354,85 +347,6 @@
/**
* {@inheritDoc}
*/
- public void drawPdf(final OutputStream output,
- final GraphicPdfContext pdfContext,
- final FontConsumer fontConsumer, final boolean strokeText)
- throws GraphicException {
- SVGDocument doc = null;
- try {
- doc = this.getSvgDocument();
- } catch (final GraphicException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- return;
- }
- final PDFGraphics2D graphics = getPDFContent4SVG(fontConsumer, doc,
- strokeText, pdfContext, output);
- graphics.dispose();
- if (graphics == null) {
- throw new GraphicException("Unable to convert to PDF: "
- + this.getUrl().toExternalForm());
- }
- if (graphics.ioErrorFound()) {
- throw new GraphicException("I/O error(s) while converting to PDF: "
- + this.getUrl().toExternalForm());
- }
- }
-
- /**
- * Convert an SVG document to a PDFGraphics2D.
- * @param fontConsumer The font consumer.
- * @param svgDocument The SVG document.
- * @param strokeSVGText Indicates whether text should be stroked.
- * @param pdfContext The PDF context in which this content is being written.
- * @return The PDFGraphics2D instance for the SVG.
- * @param outputStream The output stream to which this processor writes its
- * PDF output.
- */
- public PDFGraphics2D getPDFContent4SVG(final FontConsumer fontConsumer,
- final SVGDocument svgDocument,
- final boolean strokeSVGText, final GraphicPdfContext pdfContext,
- final OutputStream outputStream) {
- /* If not running in a graphical environment, log an error message
- * and skip the SVG. */
- if (! Environment.isGraphicalEnvironment()) {
- getLogger().error("Unable to get Graphical Environment required "
- + "to process SVG. Skipping.");
- return null;
- }
- final BatikUaDocument userAgent = new BatikUaDocument(
- new AffineTransform());
- userAgent.setLogger(getLogger());
- BridgeContext ctx = new BridgeContext(userAgent);
- GVTBuilder builder = new GVTBuilder();
- TextPainter textPainter = null;
- if (strokeSVGText) {
- textPainter = new StrokingTextPainter();
- } else {
- textPainter = new PDFTextPainter(fontConsumer);
- }
- ctx.setTextPainter(textPainter);
-
- final PDFAElementBridge aBridge = new PDFAElementBridge();
- ctx.putBridge(aBridge);
-
- GraphicsNode root;
- root = builder.build(ctx, svgDocument);
- ctx = null;
- builder = null;
-
- final PDFGraphics2D graphics = new PDFGraphics2D(true, svgDocument,
- fontConsumer, this.getLogger(), pdfContext, outputStream);
- graphics.setGraphicContext(
- new org.apache.batik.ext.awt.g2d.GraphicContext());
-
- root.paint(graphics);
- return graphics;
- }
-
- /**
- * {@inheritDoc}
- */
public int absoluteWidthReal() throws GraphicException {
return -1;
}
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 2007-10-05 22:18:06 UTC (rev 10247)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/batik/PDFGraphics2D.java 2007-10-05 23:58:26 UTC (rev 10248)
@@ -49,7 +49,7 @@
import org.axsl.font.FontConsumer;
import org.axsl.font.FontException;
import org.axsl.font.FontUtility;
-import org.axsl.graphic.GraphicPdfContext;
+import org.axsl.graphic.output.GraphicOutputContext;
import org.apache.commons.logging.Log;
@@ -142,7 +142,7 @@
private Log logger;
/** The PDF context. */
- private GraphicPdfContext pdfContext;
+ private GraphicOutputContext pdfContext;
/** The graphics state stack. The top item on the stack is always the
* current graphics state. The next one down is what will be current after
@@ -169,7 +169,7 @@
public PDFGraphics2D(final boolean textAsShapes,
final SVGDocument svgDocument,
final FontConsumer fontConsumer, final Log logger,
- final GraphicPdfContext pdfContext,
+ final GraphicOutputContext pdfContext,
final OutputStream outputStream) {
super(textAsShapes);
/* TODO: Only write the comments if running in debug mode?? */
Added: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutput4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutput4a.java (rev 0)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutput4a.java 2007-10-05 23:58:26 UTC (rev 10248)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2006 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.graphic.output;
+
+import org.axsl.graphic.output.GraphicOutput;
+
+/**
+ * Abstract superclass for all FOray Graphic output helper classes.
+ */
+public abstract class GraphicOutput4a implements GraphicOutput {
+
+ /**
+ * Constructor.
+ */
+ public GraphicOutput4a() {
+ }
+
+}
Property changes on: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutput4a.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutputFactory4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutputFactory4a.java (rev 0)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutputFactory4a.java 2007-10-05 23:58:26 UTC (rev 10248)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.graphic.output;
+
+import org.foray.graphic.Graphic4a;
+
+import org.axsl.graphic.Graphic;
+import org.axsl.graphic.GraphicException;
+import org.axsl.graphic.output.GraphicOutputFactory;
+
+/**
+ * Abstract superclass for the FOray GraphicOutputFactory implementations.
+ */
+public abstract class GraphicOutputFactory4a implements GraphicOutputFactory {
+
+ /**
+ * Constructor.
+ */
+ public GraphicOutputFactory4a() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public abstract String getMimeType();
+
+ /**
+ * Returns the {@link Graphic} instance, cast as a {@link Graphic4a}.
+ * @param graphic The {@link Graphic} instance to be recast.
+ * @return The <code>graphic</code> recast.
+ * @throws GraphicException If <code>graphic</code> is not an instanceof
+ * {@link Graphic4a}.
+ */
+ public Graphic4a getGraphic4a(final Graphic graphic)
+ throws GraphicException {
+ if (! (graphic instanceof Graphic4a)) {
+ throw new GraphicException("Unknown Graphic implementation.");
+ }
+ return (Graphic4a) graphic;
+ }
+
+}
Property changes on: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutputFactory4a.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicPdf4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicPdf4a.java (rev 0)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicPdf4a.java 2007-10-05 23:58:26 UTC (rev 10248)
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2006 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.graphic.output;
+
+import org.axsl.graphic.output.GraphicPdf;
+
+/**
+ * Abstract superclass for all helper classes used to embed graphics in PDF
+ * output.
+ */
+public abstract class GraphicPdf4a extends GraphicOutput4a
+ implements GraphicPdf {
+
+ /**
+ * Constructor.
+ */
+ public GraphicPdf4a() {
+ super();
+ }
+
+}
Property changes on: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicPdf4a.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicPdfFactory4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicPdfFactory4a.java (rev 0)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicPdfFactory4a.java 2007-10-05 23:58:26 UTC (rev 10248)
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.graphic.output;
+
+import org.foray.common.Mime;
+import org.foray.graphic.Graphic4a;
+import org.foray.graphic.SVGGraphic;
+
+import org.axsl.graphic.Graphic;
+import org.axsl.graphic.GraphicException;
+
+/**
+ * Factory for creating instances of GraphicOutput for PDF output.
+ */
+public class GraphicPdfFactory4a extends GraphicOutputFactory4a {
+
+ /**
+ * Constructor.
+ */
+ public GraphicPdfFactory4a() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public GraphicPdf4a createGraphicOutput(final Graphic graphic)
+ throws GraphicException {
+ final Graphic4a graphic4a = super.getGraphic4a(graphic);
+ if (graphic4a instanceof SVGGraphic) {
+ final SVGGraphic svgGraphic = (SVGGraphic) graphic4a;
+ return new SvgPdf(svgGraphic);
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getMimeType() {
+ return Mime.PDF.getMimeString();
+ }
+
+}
Property changes on: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicPdfFactory4a.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/SvgPdf.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/output/SvgPdf.java (rev 0)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/output/SvgPdf.java 2007-10-05 23:58:26 UTC (rev 10248)
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.graphic.output;
+
+import org.foray.common.Environment;
+import org.foray.graphic.SVGGraphic;
+import org.foray.graphic.batik.BatikUaDocument;
+import org.foray.graphic.batik.PDFAElementBridge;
+import org.foray.graphic.batik.PDFGraphics2D;
+import org.foray.graphic.batik.PDFTextPainter;
+
+import org.axsl.font.FontConsumer;
+import org.axsl.graphic.GraphicException;
+import org.axsl.graphic.output.GraphicOutputContext;
+
+import org.apache.batik.bridge.BridgeContext;
+import org.apache.batik.bridge.GVTBuilder;
+import org.apache.batik.gvt.GraphicsNode;
+import org.apache.batik.gvt.TextPainter;
+import org.apache.batik.gvt.renderer.StrokingTextPainter;
+
+import org.w3c.dom.svg.SVGDocument;
+
+import java.awt.geom.AffineTransform;
+import java.io.OutputStream;
+
+/**
+ * Helper class for applications using or embedding SVG in PDF output.
+ */
+public class SvgPdf extends GraphicPdf4a {
+
+ /** The encapsulated SVG graphic. */
+ private SVGGraphic svg;
+
+ /**
+ * Constructor.
+ * @param svg The encapsulated SVG graphic.
+ */
+ SvgPdf(final SVGGraphic svg) {
+ this.svg = svg;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SVGGraphic getGraphic() {
+ return this.svg;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void drawVectorContent(final OutputStream output,
+ final GraphicOutputContext outputContext,
+ final FontConsumer fontConsumer, final boolean strokeText)
+ throws GraphicException {
+ SVGDocument doc = null;
+ try {
+ doc = this.svg.getSvgDocument();
+ } catch (final GraphicException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ return;
+ }
+ final PDFGraphics2D graphics = getPDFContent4SVG(fontConsumer, doc,
+ strokeText, outputContext, output);
+ graphics.dispose();
+ if (graphics == null) {
+ throw new GraphicException("Unable to convert to PDF: "
+ + this.svg.getUrl().toExternalForm());
+ }
+ if (graphics.ioErrorFound()) {
+ throw new GraphicException("I/O error(s) while converting to PDF: "
+ + this.svg.getUrl().toExternalForm());
+ }
+ }
+
+ /**
+ * Convert an SVG document to a PDFGraphics2D.
+ * @param fontConsumer The font consumer.
+ * @param svgDocument The SVG document.
+ * @param strokeSVGText Indicates whether text should be stroked.
+ * @param pdfContext The PDF context in which this content is being written.
+ * @return The PDFGraphics2D instance for the SVG.
+ * @param outputStream The output stream to which this processor writes its
+ * PDF output.
+ */
+ public PDFGraphics2D getPDFContent4SVG(final FontConsumer fontConsumer,
+ final SVGDocument svgDocument,
+ final boolean strokeSVGText, final GraphicOutputContext pdfContext,
+ final OutputStream outputStream) {
+ /* If not running in a graphical environment, log an error message
+ * and skip the SVG. */
+ if (! Environment.isGraphicalEnvironment()) {
+ this.svg.getLogger().error("Unable to get Graphical Environment "
+ + "required to process SVG. Skipping.");
+ return null;
+ }
+ final BatikUaDocument userAgent = new BatikUaDocument(
+ new AffineTransform());
+ userAgent.setLogger(this.svg.getLogger());
+ BridgeContext ctx = new BridgeContext(userAgent);
+ GVTBuilder builder = new GVTBuilder();
+ TextPainter textPainter = null;
+ if (strokeSVGText) {
+ textPainter = new StrokingTextPainter();
+ } else {
+ textPainter = new PDFTextPainter(fontConsumer);
+ }
+ ctx.setTextPainter(textPainter);
+
+ final PDFAElementBridge aBridge = new PDFAElementBridge();
+ ctx.putBridge(aBridge);
+
+ GraphicsNode root;
+ root = builder.build(ctx, svgDocument);
+ ctx = null;
+ builder = null;
+
+ final PDFGraphics2D graphics = new PDFGraphics2D(true, svgDocument,
+ fontConsumer, this.svg.getLogger(), pdfContext, outputStream);
+ graphics.setGraphicContext(
+ new org.apache.batik.ext.awt.g2d.GraphicContext());
+
+ root.paint(graphics);
+ return graphics;
+ }
+
+}
Property changes on: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/SvgPdf.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/package.html
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/output/package.html (rev 0)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/output/package.html 2007-10-05 23:58:26 UTC (rev 10248)
@@ -0,0 +1,10 @@
+<html>
+<title>org.foray.graphic.output Package</title>
+
+<body>
+
+<p>Helper classes useful for embedding graphics or obtaining graphic information
+that is specific to an output format (like PDF or PostScript).</p>
+
+</body>
+</html>
Property changes on: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/package.html
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2007-10-05 22:18:06 UTC (rev 10247)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2007-10-05 23:58:26 UTC (rev 10248)
@@ -71,7 +71,7 @@
* also keeps direct track of the /Root, /Info and /Resources objects.
*/
public class PDFDocument implements org.axsl.pdf.PdfDocument,
- org.axsl.graphic.GraphicPdfContext {
+ org.axsl.graphic.output.GraphicOutputContext {
/** Name of the CharSet that should be used when converting Strings to
* bytes. */
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.java 2007-10-05 22:18:06 UTC (rev 10247)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.java 2007-10-05 23:58:26 UTC (rev 10248)
@@ -28,11 +28,14 @@
package org.foray.pdf.object;
+import org.foray.common.Mime;
import org.foray.ps.FOrayBoundingBox;
import org.axsl.font.FontConsumer;
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.SvgGraphic;
+import org.axsl.graphic.output.GraphicOutput;
+import org.axsl.graphic.output.GraphicPdf;
import org.axsl.ps.BoundingBox;
import java.awt.geom.AffineTransform;
@@ -77,7 +80,14 @@
*/
protected byte[] getPdfContent() throws GraphicException {
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- this.graphic.drawPdf(outputStream, this.getPDFDocument(),
+ final GraphicOutput graphicOutput = this.graphic.getGraphicOutput(
+ Mime.PDF.getMimeString());
+ if (! (graphicOutput instanceof GraphicPdf)) {
+ throw new GraphicException("Unable to get PDF output helper for "
+ + this.graphic.getUrl());
+ }
+ final GraphicPdf graphicPdf = (GraphicPdf) graphicOutput;
+ graphicPdf.drawVectorContent(outputStream, this.getPDFDocument(),
this.fontConsumer, this.strokeText);
return outputStream.toByteArray();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-06 16:48:07
|
Revision: 10250
http://foray.svn.sourceforge.net/foray/?rev=10250&view=rev
Author: victormote
Date: 2007-10-06 09:48:11 -0700 (Sat, 06 Oct 2007)
Log Message:
-----------
Conform to axsl changes removing the FontOutputFactory interface.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java
trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutputFactory.java
trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPDFFactory.java
trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPSFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-10-06 16:24:36 UTC (rev 10249)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2007-10-06 16:48:11 UTC (rev 10250)
@@ -31,13 +31,14 @@
import org.foray.common.Environment;
import org.foray.font.format.FontFileReader;
import org.foray.font.format.MetricsFileReader;
+import org.foray.font.output.FOrayFontOutputFactory;
import org.foray.font.output.FOrayFontPDFFactory;
import org.foray.ps.encode.EncodingVector;
import org.axsl.font.FontConsumer;
import org.axsl.font.FontException;
import org.axsl.font.FontServer;
-import org.axsl.font.output.FontOutputFactory;
+import org.axsl.font.output.FontOutput;
import org.axsl.ps.Encoding;
import org.apache.commons.logging.Log;
@@ -136,10 +137,10 @@
private EntityResolver entityResolver = null;
/**
- * Map of registered {@link FontOutputFactory} instances.
+ * Map of registered {@link FOrayFontOutputFactory} instances.
*/
- private Map<String, FontOutputFactory> fontOutputFactories
- = new HashMap<String, FontOutputFactory>();
+ private Map<String, FOrayFontOutputFactory> fontOutputFactories
+ = new HashMap<String, FOrayFontOutputFactory>();
/**
* Map whose key is a String containing a font ID, and whose value is the
@@ -972,9 +973,19 @@
}
/**
- * {@inheritDoc}
+ * Registers a {@link FOrayFontOutputFactory} for use by this server.
+ * This method can be used both to support custom {@link FontOutput}
+ * types and to override standard types.
+ * Note that if a factory was previously registered for the mime-type
+ * of the factory now being registered, the new registration overrides the
+ * previous registration.
+ * If this behavior is not desired, check the return value of
+ * {@link #fontOutputFactoryAvailable(String)} before registering the new
+ * factory.
+ * @param factory The factory which should be registered.
*/
- public void registerFontOutputFactory(final FontOutputFactory factory) {
+ public void registerFontOutputFactory(
+ final FOrayFontOutputFactory factory) {
/* */
if (factory == null) {
throw new NullPointerException("Cannot register a null "
@@ -995,15 +1006,19 @@
* @return The appropriate output factory, or null if none is registered
* for the mime type.
*/
- public FontOutputFactory getOutputFactory(final String mimeType) {
+ public FOrayFontOutputFactory getOutputFactory(final String mimeType) {
return this.fontOutputFactories.get(mimeType);
}
/**
- * {@inheritDoc}
+ * Reports on the availability of {@link FOrayFontOutputFactory} instances
+ * by mime-type.
+ * @param mimeType The mime-type for which a factory is sought.
+ * @return True iff a factory has already been registered for the given
+ * mime-type.
*/
public boolean fontOutputFactoryAvailable(final String mimeType) {
- final FontOutputFactory factory = getOutputFactory(mimeType);
+ final FOrayFontOutputFactory factory = getOutputFactory(mimeType);
return factory != null;
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java 2007-10-06 16:24:36 UTC (rev 10249)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java 2007-10-06 16:48:11 UTC (rev 10250)
@@ -30,12 +30,12 @@
import org.foray.common.UnicodeChar;
import org.foray.common.WKConstants;
+import org.foray.font.output.FOrayFontOutputFactory;
import org.axsl.font.Font;
import org.axsl.font.FontConsumer;
import org.axsl.font.FontException;
import org.axsl.font.output.FontOutput;
-import org.axsl.font.output.FontOutputFactory;
import org.axsl.ps.Encoding;
import org.apache.commons.logging.Log;
@@ -441,8 +441,8 @@
if (output != null) {
return output;
}
- final FontOutputFactory factory = getFOrayFontServer().getOutputFactory(
- mimeType);
+ final FOrayFontOutputFactory factory =
+ getFOrayFontServer().getOutputFactory(mimeType);
try {
output = factory.createFontOutput(this);
} catch (final FontException e) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutputFactory.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutputFactory.java 2007-10-06 16:24:36 UTC (rev 10249)
+++ trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutputFactory.java 2007-10-06 16:48:11 UTC (rev 10250)
@@ -32,12 +32,12 @@
import org.axsl.font.FontException;
import org.axsl.font.FontUse;
-import org.axsl.font.output.FontOutputFactory;
+import org.axsl.font.output.FontOutput;
/**
* Abstract superclass for the FOray FontOutputFactory implementations.
*/
-public abstract class FOrayFontOutputFactory implements FontOutputFactory {
+public abstract class FOrayFontOutputFactory {
/**
* Constructor.
@@ -46,23 +46,32 @@
}
/**
- * {@inheritDoc}
+ * Returns the mime-type for this factory.
+ * @return The mime type for which this factory generates GraphicOutput
+ * instances.
+ * For example, a GraphicOutputFactory returning GraphicOutput instances for
+ * use with PDF (Portable Document Format) should return "application/pdf".
+ * @see <a href="http://www.iana.org/assignments/media-types/">Internet
+ * Assigned Numbers Authority MIME Media Types</a>
*/
public abstract String getMimeType();
/**
- * Returns the {@link FontUse} instance, cast as a {@link FOrayFontUse}.
- * @param fontUse The {@link FontUse} instance to be recast.
- * @return The <code>fontUse</code> recast.
- * @throws FontException If <code>fontUse</code> is not an instanceof
- * {@link FOrayFontUse}.
+ * Create a GraphicOutput implementation.
+ * This method is not intended for use by client applications.
+ * It is to be used only by Graphic implementations if they do not already
+ * have a GraphicOutput for the desired mime type.
+ * Client applications that need a GraphicOutput instance should instead use
+ * {@link FontUse#getFontOutput(String)}.
+ * @param fontUse The Graphic implementation for whom the GraphicOutput
+ * instance should be created.
+ * @return A GraphicOutput implementation suitable for this factory's
+ * mime type.
+ * @throws FontException For errors during creation of the GraphicOutput
+ * instance.
+ * @see FontUse#getFontOutput(String)
*/
- public FOrayFontUse getFOrayFontUse(final FontUse fontUse)
- throws FontException {
- if (! (fontUse instanceof FOrayFontUse)) {
- throw new FontException("Unknown FontUse implementation.");
- }
- return (FOrayFontUse) fontUse;
- }
+ public abstract FontOutput createFontOutput(FOrayFontUse fontUse)
+ throws FontException;
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPDFFactory.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPDFFactory.java 2007-10-06 16:24:36 UTC (rev 10249)
+++ trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPDFFactory.java 2007-10-06 16:48:11 UTC (rev 10250)
@@ -32,7 +32,6 @@
import org.foray.font.FOrayFontUse;
import org.axsl.font.FontException;
-import org.axsl.font.FontUse;
import org.axsl.font.output.FontOutput;
/**
@@ -49,10 +48,9 @@
/**
* {@inheritDoc}
*/
- public FontOutput createFontOutput(final FontUse fontUse)
+ public FontOutput createFontOutput(final FOrayFontUse fontUse)
throws FontException {
- final FOrayFontUse forayFontUse = super.getFOrayFontUse(fontUse);
- return new FOrayFontPDF(forayFontUse);
+ return new FOrayFontPDF(fontUse);
}
/**
Modified: trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPSFactory.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPSFactory.java 2007-10-06 16:24:36 UTC (rev 10249)
+++ trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontPSFactory.java 2007-10-06 16:48:11 UTC (rev 10250)
@@ -32,7 +32,6 @@
import org.foray.font.FOrayFontUse;
import org.axsl.font.FontException;
-import org.axsl.font.FontUse;
import org.axsl.font.output.FontOutput;
/**
@@ -49,10 +48,9 @@
/**
* {@inheritDoc}
*/
- public FontOutput createFontOutput(final FontUse fontUse)
+ public FontOutput createFontOutput(final FOrayFontUse fontUse)
throws FontException {
- final FOrayFontUse forayFontUse = super.getFOrayFontUse(fontUse);
- return new FOrayFontPS(forayFontUse);
+ return new FOrayFontPS(fontUse);
}
/**
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2007-10-06 16:24:36 UTC (rev 10249)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2007-10-06 16:48:11 UTC (rev 10250)
@@ -44,7 +44,6 @@
import org.foray.graphic.factory.TIFFFactory;
import org.foray.graphic.output.GraphicPdfFactory4a;
-import org.axsl.font.output.FontOutputFactory;
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.GraphicServer;
import org.axsl.graphic.output.GraphicOutputFactory;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-06 17:18:18
|
Revision: 10251
http://foray.svn.sourceforge.net/foray/?rev=10251&view=rev
Author: victormote
Date: 2007-10-06 10:18:16 -0700 (Sat, 06 Oct 2007)
Log Message:
-----------
Conform to axsl changes removing the GraphicOutputFactory interface.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutputFactory.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutputFactory4a.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutputFactory.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutputFactory.java 2007-10-06 16:48:11 UTC (rev 10250)
+++ trunk/foray/foray-font/src/java/org/foray/font/output/FOrayFontOutputFactory.java 2007-10-06 17:18:16 UTC (rev 10251)
@@ -49,7 +49,7 @@
* Returns the mime-type for this factory.
* @return The mime type for which this factory generates GraphicOutput
* instances.
- * For example, a GraphicOutputFactory returning GraphicOutput instances for
+ * For example, a factory returning {@link FontOutput} instances for
* use with PDF (Portable Document Format) should return "application/pdf".
* @see <a href="http://www.iana.org/assignments/media-types/">Internet
* Assigned Numbers Authority MIME Media Types</a>
@@ -57,17 +57,17 @@
public abstract String getMimeType();
/**
- * Create a GraphicOutput implementation.
+ * Create a FontOutput implementation.
* This method is not intended for use by client applications.
- * It is to be used only by Graphic implementations if they do not already
- * have a GraphicOutput for the desired mime type.
- * Client applications that need a GraphicOutput instance should instead use
+ * It is to be used only by FontUse implementations if they do not already
+ * have a FontOutput for the desired mime type.
+ * Client applications that need a FontOutput instance should instead use
* {@link FontUse#getFontOutput(String)}.
- * @param fontUse The Graphic implementation for whom the GraphicOutput
+ * @param fontUse The FontUse implementation for which the FontOutput
* instance should be created.
- * @return A GraphicOutput implementation suitable for this factory's
+ * @return A FontOutput implementation suitable for this factory's
* mime type.
- * @throws FontException For errors during creation of the GraphicOutput
+ * @throws FontException For errors during creation of the FontOutput
* instance.
* @see FontUse#getFontOutput(String)
*/
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java 2007-10-06 16:48:11 UTC (rev 10250)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java 2007-10-06 17:18:16 UTC (rev 10251)
@@ -30,10 +30,10 @@
import org.foray.common.WKConstants;
import org.foray.graphic.factory.GraphicFactory;
+import org.foray.graphic.output.GraphicOutputFactory4a;
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.output.GraphicOutput;
-import org.axsl.graphic.output.GraphicOutputFactory;
import org.apache.commons.logging.Log;
@@ -589,7 +589,7 @@
* {@inheritDoc}
*/
public GraphicOutput getGraphicOutput(final String mimeType) {
- final GraphicOutputFactory factory = getServer().getOutputFactory(
+ final GraphicOutputFactory4a factory = getServer().getOutputFactory(
mimeType);
GraphicOutput output = null;
try {
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2007-10-06 16:48:11 UTC (rev 10250)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2007-10-06 17:18:16 UTC (rev 10251)
@@ -42,11 +42,12 @@
import org.foray.graphic.factory.PNGFactory;
import org.foray.graphic.factory.SVGFactory;
import org.foray.graphic.factory.TIFFFactory;
+import org.foray.graphic.output.GraphicOutputFactory4a;
import org.foray.graphic.output.GraphicPdfFactory4a;
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.GraphicServer;
-import org.axsl.graphic.output.GraphicOutputFactory;
+import org.axsl.graphic.output.GraphicOutput;
import org.apache.batik.dom.svg.SVGDOMImplementation;
import org.apache.batik.transcoder.TranscoderException;
@@ -111,8 +112,8 @@
/**
* Map of registered {@link FontOutputFactory} instances.
*/
- private Map<String, GraphicOutputFactory> graphicOutputFactories
- = new HashMap<String, GraphicOutputFactory>();
+ private Map<String, GraphicOutputFactory4a> graphicOutputFactories
+ = new HashMap<String, GraphicOutputFactory4a>();
/**
* Constructor.
@@ -384,10 +385,19 @@
}
/**
- * {@inheritDoc}
+ * Registers a {@link GraphicOutputFactory4a} for use by this server.
+ * This method can be used both to support custom {@link GraphicOutput}
+ * types and to override standard types.
+ * Note that if a factory was previously registered for the mime-type
+ * of the factory now being registered, the new registration overrides the
+ * previous registration.
+ * If this behavior is not desired, check the return value of
+ * {@link #graphicOutputFactoryAvailable(String)} before registering the new
+ * factory.
+ * @param factory The factory which should be registered.
*/
public void registerGraphicOutputFactory(
- final GraphicOutputFactory factory) {
+ final GraphicOutputFactory4a factory) {
if (factory == null) {
throw new NullPointerException("Cannot register a null "
+ "GraphicOutputFactory");
@@ -408,15 +418,19 @@
* @return The appropriate output factory, or null if none is registered
* for the mime type.
*/
- public GraphicOutputFactory getOutputFactory(final String mimeType) {
+ public GraphicOutputFactory4a getOutputFactory(final String mimeType) {
return this.graphicOutputFactories.get(mimeType);
}
/**
- * {@inheritDoc}
+ * Reports on the availability of {@link GraphicOutputFactory4a} instances
+ * by mime-type.
+ * @param mimeType The mime-type for which a factory is sought.
+ * @return True iff a factory has already been registered for the given
+ * mime-type.
*/
public boolean graphicOutputFactoryAvailable(final String mimeType) {
- final GraphicOutputFactory factory = getOutputFactory(mimeType);
+ final GraphicOutputFactory4a factory = getOutputFactory(mimeType);
return factory != null;
}
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutputFactory4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutputFactory4a.java 2007-10-06 16:48:11 UTC (rev 10250)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicOutputFactory4a.java 2007-10-06 17:18:16 UTC (rev 10251)
@@ -30,14 +30,15 @@
import org.foray.graphic.Graphic4a;
+import org.axsl.font.FontUse;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
-import org.axsl.graphic.output.GraphicOutputFactory;
+import org.axsl.graphic.output.GraphicOutput;
/**
* Abstract superclass for the FOray GraphicOutputFactory implementations.
*/
-public abstract class GraphicOutputFactory4a implements GraphicOutputFactory {
+public abstract class GraphicOutputFactory4a {
/**
* Constructor.
@@ -46,11 +47,35 @@
}
/**
- * {@inheritDoc}
+ * Returns the mime-type for this factory.
+ * @return The mime type for which this factory generates GraphicOutput
+ * instances.
+ * For example, a factory returning {@link GraphicOutput} instances for
+ * use with PDF (Portable Document Format) should return "application/pdf".
+ * @see <a href="http://www.iana.org/assignments/media-types/">Internet
+ * Assigned Numbers Authority MIME Media Types</a>
*/
public abstract String getMimeType();
/**
+ * Create a GraphicOutput implementation.
+ * This method is not intended for use by client applications.
+ * It is to be used only by Graphic implementations if they do not already
+ * have a GraphicOutput for the desired mime type.
+ * Client applications that need a GraphicOutput instance should instead use
+ * {@link Graphic#getGraphicOutput(String)}.
+ * @param graphic The Graphic instance for which the GraphicOutput
+ * instance should be created.
+ * @return A GraphicOutput implementation suitable for this factory's
+ * mime type.
+ * @throws GraphicException For errors during creation of the GraphicOutput
+ * instance.
+ * @see FontUse#getFontOutput(String)
+ */
+ public abstract GraphicOutput createGraphicOutput(final Graphic graphic)
+ throws GraphicException;
+
+ /**
* Returns the {@link Graphic} instance, cast as a {@link Graphic4a}.
* @param graphic The {@link Graphic} instance to be recast.
* @return The <code>graphic</code> recast.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-06 17:35:47
|
Revision: 10252
http://foray.svn.sourceforge.net/foray/?rev=10252&view=rev
Author: victormote
Date: 2007-10-06 10:35:50 -0700 (Sat, 06 Oct 2007)
Log Message:
-----------
Conform to axsl changes that require an UnsupportedOperationException to be thrown instead of returning null.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java 2007-10-06 17:18:16 UTC (rev 10251)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java 2007-10-06 17:35:50 UTC (rev 10252)
@@ -443,6 +443,10 @@
}
final FOrayFontOutputFactory factory =
getFOrayFontServer().getOutputFactory(mimeType);
+ if (factory == null) {
+ throw new UnsupportedOperationException("Unable to create "
+ + "FontOutput instance for: " + mimeType);
+ }
try {
output = factory.createFontOutput(this);
} catch (final FontException e) {
@@ -469,4 +473,16 @@
return this.registeredFontDesc;
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canMakeFontOutput(final String mimeType) {
+ final FOrayFontOutputFactory factory =
+ getFOrayFontServer().getOutputFactory(mimeType);
+ if (factory == null) {
+ return false;
+ }
+ return true;
+ }
+
}
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java 2007-10-06 17:18:16 UTC (rev 10251)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/Graphic4a.java 2007-10-06 17:35:50 UTC (rev 10252)
@@ -591,6 +591,10 @@
public GraphicOutput getGraphicOutput(final String mimeType) {
final GraphicOutputFactory4a factory = getServer().getOutputFactory(
mimeType);
+ if (factory == null) {
+ throw new UnsupportedOperationException("Unable to create "
+ + "GraphicOutput instance for: " + mimeType);
+ }
GraphicOutput output = null;
try {
output = factory.createGraphicOutput(this);
@@ -601,4 +605,16 @@
return output;
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canMakeGraphicOutput(final String mimeType) {
+ final GraphicOutputFactory4a factory = getServer().getOutputFactory(
+ mimeType);
+ if (factory == null) {
+ return false;
+ }
+ return true;
+ }
+
}
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java 2007-10-06 17:18:16 UTC (rev 10251)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/TempImage.java 2007-10-06 17:35:50 UTC (rev 10252)
@@ -222,4 +222,11 @@
return null;
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canMakeGraphicOutput(final String mimeType) {
+ return false;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-08 16:14:04
|
Revision: 10254
http://foray.svn.sourceforge.net/foray/?rev=10254&view=rev
Author: victormote
Date: 2007-10-08 09:14:03 -0700 (Mon, 08 Oct 2007)
Log Message:
-----------
Conform to axsl changes moving the Graphic2D graphic handling to a separate output helper.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/Mime.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
Added Paths:
-----------
trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicJava2d4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/output/SvgJava2d.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/Mime.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/Mime.java 2007-10-07 16:33:05 UTC (rev 10253)
+++ trunk/foray/foray-common/src/java/org/foray/common/Mime.java 2007-10-08 16:14:03 UTC (rev 10254)
@@ -37,8 +37,11 @@
PDF("application/pdf"),
/** The MIME type for PostScript. */
- POSTSCRIPT("application/postscript");
+ POSTSCRIPT("application/postscript"),
+ /** The (pseudo) MIME type for Java 2D output. */
+ JAVA2D("java/java2d");
+
/** The string used to designate this mime type. */
private String mimeString;
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-07 16:33:05 UTC (rev 10253)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-08 16:14:03 UTC (rev 10254)
@@ -34,22 +34,15 @@
import org.axsl.graphic.GraphicException;
import org.apache.batik.bridge.BridgeContext;
-import org.apache.batik.bridge.GVTBuilder;
import org.apache.batik.bridge.UnitProcessor;
import org.apache.batik.bridge.UserAgent;
-import org.apache.batik.bridge.ViewBox;
import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
import org.apache.batik.dom.svg.SVGOMDocument;
-import org.apache.batik.gvt.GraphicsNode;
import org.w3c.dom.Element;
import org.w3c.dom.svg.SVGDocument;
-import org.w3c.dom.svg.SVGSVGElement;
-import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
-import java.awt.geom.NoninvertibleTransformException;
-import java.awt.geom.Rectangle2D;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.net.URL;
@@ -216,77 +209,6 @@
/**
* {@inheritDoc}
*/
- public void drawGraphics2D(final Graphics2D graphics,
- final Rectangle2D.Float contentRectangle) throws GraphicException {
- SVGDocument svgDocument;
- svgDocument = this.getSvgDocument();
- final float x = contentRectangle.x;
- final float y = contentRectangle.y;
- final float w = contentRectangle.width;
- final float h = contentRectangle.height;
- final GraphicsNode root = getGraphicsNode(svgDocument);
- if (root == null) {
- return;
- }
-
- graphics.translate(x, y);
-
- final SVGSVGElement svg = svgDocument.getRootElement();
- final AffineTransform at = ViewBox.getPreserveAspectRatioTransform(svg,
- w, h);
- AffineTransform inverse = null;
- try {
- inverse = at.createInverse();
- } catch (final NoninvertibleTransformException e) {
- }
- if (! at.isIdentity()) {
- graphics.transform(at);
- }
-
- try {
- root.paint(graphics);
- } catch (final Exception e) {
- e.printStackTrace();
- }
-
- if (inverse != null && !inverse.isIdentity()) {
- graphics.transform(inverse);
- }
- graphics.translate(-x, -y);
- }
-
- /**
- * Returns the Batik GraphicsNode to be used.
- * @param doc The SVG document.
- * @return The Batik GraphicsNode.
- */
- protected GraphicsNode getGraphicsNode(final SVGDocument doc) {
- final BridgeContext ctx = makeBridgeContextAWT();
- final GVTBuilder builder = new GVTBuilder();
- try {
- return builder.build(ctx, doc);
- } catch (final Exception e) {
- getLogger().error("svg graphic could not be built: "
- + e.getMessage());
- getLogger().error(e.getMessage());
- return null;
- }
- }
-
- /**
- * Creates a BridgeContext instance suitable for use by Batik when rendering
- * an SVG graphic in an AWT environment.
- * @return A Batik BridgeContext instance.
- */
- public BridgeContext makeBridgeContextAWT() {
- final BatikUaAwt userAgent = new BatikUaAwt(new AffineTransform());
- userAgent.setLogger(getLogger());
- return new BridgeContext(userAgent);
- }
-
- /**
- * {@inheritDoc}
- */
public int absoluteWidthReal() throws GraphicException {
return -1;
}
Added: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicJava2d4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicJava2d4a.java (rev 0)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicJava2d4a.java 2007-10-08 16:14:03 UTC (rev 10254)
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2006 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.graphic.output;
+
+import org.axsl.graphic.output.GraphicJava2d;
+
+/**
+ * Abstract superclass for all helper classes used to embed graphics in
+ * PostScript output.
+ */
+public abstract class GraphicJava2d4a extends GraphicOutput4a
+ implements GraphicJava2d {
+
+ /**
+ * Constructor.
+ */
+ public GraphicJava2d4a() {
+ super();
+ }
+
+}
Property changes on: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/GraphicJava2d4a.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/SvgJava2d.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/output/SvgJava2d.java (rev 0)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/output/SvgJava2d.java 2007-10-08 16:14:03 UTC (rev 10254)
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.graphic.output;
+
+import org.foray.graphic.SVGGraphic;
+import org.foray.graphic.batik.BatikUaAwt;
+
+import org.axsl.graphic.GraphicException;
+
+import org.apache.batik.bridge.BridgeContext;
+import org.apache.batik.bridge.GVTBuilder;
+import org.apache.batik.bridge.ViewBox;
+import org.apache.batik.gvt.GraphicsNode;
+import org.apache.commons.logging.Log;
+
+import org.w3c.dom.svg.SVGDocument;
+import org.w3c.dom.svg.SVGSVGElement;
+
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.NoninvertibleTransformException;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * Helper class for applications using SVG in Java2d output.
+ */
+public class SvgJava2d extends GraphicJava2d4a {
+
+ /** The encapsulated SVG graphic. */
+ private SVGGraphic svg;
+
+ /**
+ * Constructor.
+ * @param svg The encapsulated SVG graphic.
+ */
+ SvgJava2d(final SVGGraphic svg) {
+ this.svg = svg;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SVGGraphic getGraphic() {
+ return this.svg;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void drawGraphic(final Graphics2D graphics,
+ final Rectangle2D.Float contentRectangle) throws GraphicException {
+ SVGDocument svgDocument;
+ svgDocument = this.svg.getSvgDocument();
+ final float x = contentRectangle.x;
+ final float y = contentRectangle.y;
+ final float w = contentRectangle.width;
+ final float h = contentRectangle.height;
+ final GraphicsNode root = getGraphicsNode(svgDocument);
+ if (root == null) {
+ return;
+ }
+
+ graphics.translate(x, y);
+
+ final SVGSVGElement svg = svgDocument.getRootElement();
+ final AffineTransform at = ViewBox.getPreserveAspectRatioTransform(svg,
+ w, h);
+ AffineTransform inverse = null;
+ try {
+ inverse = at.createInverse();
+ } catch (final NoninvertibleTransformException e) {
+ }
+ if (! at.isIdentity()) {
+ graphics.transform(at);
+ }
+
+ try {
+ root.paint(graphics);
+ } catch (final Exception e) {
+ e.printStackTrace();
+ }
+
+ if (inverse != null && !inverse.isIdentity()) {
+ graphics.transform(inverse);
+ }
+ graphics.translate(-x, -y);
+ }
+
+ /**
+ * Returns the Batik GraphicsNode to be used.
+ * @param doc The SVG document.
+ * @return The Batik GraphicsNode.
+ */
+ protected GraphicsNode getGraphicsNode(final SVGDocument doc) {
+ final BridgeContext ctx = makeBridgeContextAWT();
+ final GVTBuilder builder = new GVTBuilder();
+ try {
+ return builder.build(ctx, doc);
+ } catch (final Exception e) {
+ getLogger().error("svg graphic could not be built: "
+ + e.getMessage());
+ getLogger().error(e.getMessage());
+ return null;
+ }
+ }
+
+ /**
+ * Creates a BridgeContext instance suitable for use by Batik when rendering
+ * an SVG graphic in an AWT environment.
+ * @return A Batik BridgeContext instance.
+ */
+ public BridgeContext makeBridgeContextAWT() {
+ final BatikUaAwt userAgent = new BatikUaAwt(new AffineTransform());
+ userAgent.setLogger(getLogger());
+ return new BridgeContext(userAgent);
+ }
+
+ /**
+ * Returns the logger.
+ * @return The logger.
+ */
+ public Log getLogger() {
+ return this.svg.getLogger();
+ }
+
+}
Property changes on: trunk/foray/foray-graphic/src/java/org/foray/graphic/output/SvgJava2d.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
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-10-07 16:33:05 UTC (rev 10253)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-10-08 16:14:03 UTC (rev 10254)
@@ -39,6 +39,7 @@
package org.foray.render.awt;
+import org.foray.common.Mime;
import org.foray.common.WKConstants;
import org.foray.common.url.URLFactory;
import org.foray.output.OutputConfig;
@@ -59,6 +60,7 @@
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.SvgGraphic;
+import org.axsl.graphic.output.GraphicJava2d;
import org.axsl.output.OutputException;
import org.apache.commons.logging.Log;
@@ -743,8 +745,14 @@
protected void renderSVGDocument(final SvgGraphic graphic,
final Rectangle2D.Float contentRectangle,
final Rectangle2D.Float clipRectangle) {
+ if (! graphic.canMakeGraphicOutput(Mime.JAVA2D.getMimeString())) {
+ /* TODO: Consider logging/displaying a warning. */
+ return;
+ }
+ final GraphicJava2d output = (GraphicJava2d) graphic.getGraphicOutput(
+ Mime.JAVA2D.getMimeString());
try {
- graphic.drawGraphics2D(this.graphics, contentRectangle);
+ output.drawGraphic(this.graphics, contentRectangle);
} catch (final GraphicException e) {
/* TODO: Consider logging/displaying a warning. */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-09 13:14:55
|
Revision: 10256
http://foray.svn.sourceforge.net/foray/?rev=10256&view=rev
Author: victormote
Date: 2007-10-09 06:14:59 -0700 (Tue, 09 Oct 2007)
Log Message:
-----------
Stub-in support for MathML as a first-class document type.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/Mime.java
trunk/foray/foray-graphic/.classpath
trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
Added Paths:
-----------
trunk/foray/foray-graphic/src/java/org/foray/graphic/MathGraphic4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/math/
trunk/foray/foray-graphic/src/java/org/foray/graphic/math/MathMLDocument4a.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/math/package.html
trunk/foray/lib/mathml-2.0-readme.txt
trunk/foray/lib/mathml-2.0.jar
trunk/foray/lib-build/mathml/
trunk/foray/lib-build/mathml/mathml-2.0-src.zip
Modified: trunk/foray/foray-common/src/java/org/foray/common/Mime.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/Mime.java 2007-10-08 16:22:44 UTC (rev 10255)
+++ trunk/foray/foray-common/src/java/org/foray/common/Mime.java 2007-10-09 13:14:59 UTC (rev 10256)
@@ -40,8 +40,14 @@
POSTSCRIPT("application/postscript"),
/** The (pseudo) MIME type for Java 2D output. */
- JAVA2D("java/java2d");
+ JAVA2D("java/java2d"),
+ /** The MIME type for SVG. */
+ SVG("image/svg+xml"),
+
+ /** The (assumed) MIME type for MathML documents. */
+ MATHML("text/mathml");
+
/** The string used to designate this mime type. */
private String mimeString;
Modified: trunk/foray/foray-graphic/.classpath
===================================================================
--- trunk/foray/foray-graphic/.classpath 2007-10-08 16:22:44 UTC (rev 10255)
+++ trunk/foray/foray-graphic/.classpath 2007-10-09 13:14:59 UTC (rev 10256)
@@ -10,6 +10,7 @@
<classpathentry kind="lib" path="/FOray Lib/commons-io-1.2.jar" sourcepath="/FOray Lib-Build/commons-io/commons-io-1.2-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/svg-1.1.jar" sourcepath="/FOray Lib-Build/svg/svg-1.1-src.zip"/>
+ <classpathentry exported="true" kind="lib" path="/FOray Lib/mathml-2.0.jar" sourcepath="/FOray Lib-Build/mathml/mathml-2.0-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-bridge.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-gvt.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
<classpathentry kind="lib" path="/FOray Lib/batik-1.6-parser.jar" sourcepath="/FOray Lib-Build/batik/batik-1.6-sources.zip"/>
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2007-10-08 16:22:44 UTC (rev 10255)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/GraphicServer4a.java 2007-10-09 13:14:59 UTC (rev 10256)
@@ -42,6 +42,7 @@
import org.foray.graphic.factory.PNGFactory;
import org.foray.graphic.factory.SVGFactory;
import org.foray.graphic.factory.TIFFFactory;
+import org.foray.graphic.math.MathMLDocument4a;
import org.foray.graphic.output.GraphicJava2dFactory;
import org.foray.graphic.output.GraphicOutputFactory;
import org.foray.graphic.output.GraphicPdfFactory;
@@ -49,6 +50,7 @@
import org.axsl.graphic.GraphicException;
import org.axsl.graphic.GraphicServer;
+import org.axsl.graphic.MathGraphic;
import org.axsl.graphic.output.GraphicOutput;
import org.apache.batik.dom.svg.SVGDOMImplementation;
@@ -65,6 +67,7 @@
import org.w3c.dom.ls.DOMImplementationLS;
import org.w3c.dom.ls.LSException;
import org.w3c.dom.ls.LSParser;
+import org.w3c.dom.mathml.MathMLDocument;
import org.w3c.dom.svg.SVGDocument;
import java.io.BufferedInputStream;
@@ -438,4 +441,20 @@
return factory != null;
}
+ /**
+ * {@inheritDoc}
+ */
+ public MathMLDocument makeMathDocument() throws GraphicException {
+ return new MathMLDocument4a();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public MathGraphic makeMathGraphic(final MathMLDocument mathDocument)
+ throws GraphicException {
+ /* TODO: Implement this. */
+ return null;
+ }
+
}
Added: trunk/foray/foray-graphic/src/java/org/foray/graphic/MathGraphic4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/MathGraphic4a.java (rev 0)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/MathGraphic4a.java 2007-10-09 13:14:59 UTC (rev 10256)
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.graphic;
+
+import org.foray.common.Mime;
+
+import org.axsl.graphic.Graphic;
+import org.axsl.graphic.GraphicException;
+
+import org.w3c.dom.mathml.MathMLDocument;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.net.URL;
+
+/**
+ * A MathML Graphic. The current approach to handling MathML is that it is
+ * treated internally as SVG.
+ */
+public class MathGraphic4a extends Graphic4a
+ implements org.axsl.graphic.MathGraphic {
+
+ /** The encapsulated MathML document. */
+ private MathMLDocument doc;
+
+ /** The wrapped SVGGraphic. */
+ private SVGGraphic svgGraphic;
+
+ /**
+ * Constructor for the case of an unparsed URL.
+ * @param server The parent graphic server.
+ * @param url The URL which contains the graphic content.
+ * @param bis The reusable input stream containing the bytes from
+ * <code>url</code>.
+ */
+ public MathGraphic4a(final GraphicServer4a server, final URL url,
+ final BufferedInputStream bis) {
+ super(server, url, bis);
+ }
+
+ /**
+ * Constructor for the case of a parsed {@link MathMLDocument}.
+ * @param server The parent graphic server.
+ * @param mathDocument The parsed MathMLDocument. This must not be null.
+ */
+ public MathGraphic4a(final GraphicServer4a server,
+ final MathMLDocument mathDocument) {
+ super(server, null, null);
+ if (mathDocument == null) {
+ throw new NullPointerException("Null MathMLDocument");
+ }
+ this.doc = mathDocument;
+ try {
+ this.parseBasics();
+ } catch (final IOException e) {
+ /* The section that generates this exception is bypassed for this
+ * case, so we can safely ignore this. */
+ }
+ this.setBasicsParsed(true);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void loadImage() throws GraphicException {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public MathMLDocument getMathDocument() throws GraphicException {
+ if (this.doc == null) {
+ this.loadImage();
+ }
+ return this.doc;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Graphic.Type getGraphicType() {
+ return Graphic.Type.MATHML;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Graphic.Compression getCompressionType() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getMimeType() {
+ return Mime.MATHML.getMimeString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void parseBasics() throws IOException {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getName() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public byte[] getRawSamples() throws GraphicException {
+ /* MathML is not a raster format. */
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int absoluteWidthReal() throws GraphicException {
+ return this.svgGraphic.absoluteWidthReal();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int absoluteHeightReal() throws GraphicException {
+ return this.svgGraphic.absoluteHeightReal();
+ }
+
+}
Property changes on: trunk/foray/foray-graphic/src/java/org/foray/graphic/MathGraphic4a.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-08 16:22:44 UTC (rev 10255)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-09 13:14:59 UTC (rev 10256)
@@ -28,6 +28,7 @@
package org.foray.graphic;
+import org.foray.common.Mime;
import org.foray.graphic.batik.BatikUaAwt;
import org.axsl.graphic.Graphic;
@@ -131,7 +132,7 @@
* {@inheritDoc}
*/
public String getMimeType() {
- return "image/svg+xml";
+ return Mime.SVG.getMimeString();
}
/**
Added: trunk/foray/foray-graphic/src/java/org/foray/graphic/math/MathMLDocument4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/math/MathMLDocument4a.java (rev 0)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/math/MathMLDocument4a.java 2007-10-09 13:14:59 UTC (rev 10256)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.graphic.math;
+
+import net.sourceforge.jeuclid.dom.AbstractPartialDocumentImpl;
+
+import org.foray.common.WKConstants;
+
+import org.w3c.dom.mathml.MathMLDocument;
+
+/**
+ * An implementation of the DOM MathMLDocument interface.
+ */
+public class MathMLDocument4a extends AbstractPartialDocumentImpl
+ implements MathMLDocument {
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getReferrer() {
+ return WKConstants.EMPTY_STRING;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getDomain() {
+ return WKConstants.EMPTY_STRING;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getURI() {
+ return WKConstants.EMPTY_STRING;
+ }
+
+}
Property changes on: trunk/foray/foray-graphic/src/java/org/foray/graphic/math/MathMLDocument4a.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/foray-graphic/src/java/org/foray/graphic/math/package.html
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/math/package.html (rev 0)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/math/package.html 2007-10-09 13:14:59 UTC (rev 10256)
@@ -0,0 +1,6 @@
+<html>
+<title>org.foray.graphic.math Package</title>
+<body>
+<p>Classes used to handle MathML integration.</p>
+</body>
+</html>
Property changes on: trunk/foray/foray-graphic/src/java/org/foray/graphic/math/package.html
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/lib/mathml-2.0-readme.txt
===================================================================
--- trunk/foray/lib/mathml-2.0-readme.txt (rev 0)
+++ trunk/foray/lib/mathml-2.0-readme.txt 2007-10-09 13:14:59 UTC (rev 10256)
@@ -0,0 +1,16 @@
+Notes for mathml-2.0.jar
+=====================
+There does not seem to be a standard jar file containing the MathML
+bindings for java.
+
+The MathML jar file distributed with aXSL was built using the
+"mathml-lib" target of the aXSL Ant build script.
+See the script for documentation of the sources of the build.
+Essentially the build downloads the java bindings from www.w3c.org and
+compiles them.
+The standard Java bindings contain four java errors.
+Ant <replace> elements have been added to fix these errors.
+
+Victor Mote
+
+# Last Line of Memo. #
Property changes on: trunk/foray/lib/mathml-2.0-readme.txt
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/lib/mathml-2.0.jar
===================================================================
(Binary files differ)
Property changes on: trunk/foray/lib/mathml-2.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/foray/lib-build/mathml/mathml-2.0-src.zip
===================================================================
(Binary files differ)
Property changes on: trunk/foray/lib-build/mathml/mathml-2.0-src.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-09 13:41:18
|
Revision: 10257
http://foray.svn.sourceforge.net/foray/?rev=10257&view=rev
Author: victormote
Date: 2007-10-09 06:41:21 -0700 (Tue, 09 Oct 2007)
Log Message:
-----------
Remove no-longer-needed jar files from the distribution.
Modified Paths:
--------------
trunk/foray/doc/web/00-release/notes-unreleased.html
trunk/foray/foray-app/.classpath
trunk/foray/foray-core/.classpath
trunk/foray/foray-pretty/.classpath
trunk/foray/lib/readme.txt
Removed Paths:
-------------
trunk/foray/lib/xml-apis-1.3.02.jar
trunk/foray/lib/xml-apis.LICENSE-SAX.html
trunk/foray/lib/xml-apis.LICENSE.DOM-documentation.html
trunk/foray/lib/xml-apis.LICENSE.DOM-software.html
trunk/foray/lib/xml-apis.LICENSE.txt
trunk/foray/lib/xml-apis.NOTICE.txt
Modified: trunk/foray/doc/web/00-release/notes-unreleased.html
===================================================================
--- trunk/foray/doc/web/00-release/notes-unreleased.html 2007-10-09 13:14:59 UTC (rev 10256)
+++ trunk/foray/doc/web/00-release/notes-unreleased.html 2007-10-09 13:41:21 UTC (rev 10257)
@@ -38,6 +38,8 @@
<a href="http://www.axsl.org/00-release/notes-unreleased.html"
rel="external">unreleased changes to aXSL</a>.
FOray maintains its API to conform to aXSL's, even between releases.</li>
+ <li>Removed the "xml-apis" jar files from the distribution, as these are now
+included in standard java.</li>
</ul>
<!--#include virtual="/00-rsrc/include/leftmenu-end.html" -->
Modified: trunk/foray/foray-app/.classpath
===================================================================
--- trunk/foray/foray-app/.classpath 2007-10-09 13:14:59 UTC (rev 10256)
+++ trunk/foray/foray-app/.classpath 2007-10-09 13:41:21 UTC (rev 10257)
@@ -34,7 +34,6 @@
<classpathentry kind="lib" path="/FOray Lib/servlet-2.2.jar"/>
<classpathentry kind="lib" path="/FOray Lib/xalan-2.4.1.jar"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar"/>
- <classpathentry kind="lib" path="/FOray Lib/xml-apis-1.3.02.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslSpeech"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOraySpeech"/>
Modified: trunk/foray/foray-core/.classpath
===================================================================
--- trunk/foray/foray-core/.classpath 2007-10-09 13:14:59 UTC (rev 10256)
+++ trunk/foray/foray-core/.classpath 2007-10-09 13:41:21 UTC (rev 10257)
@@ -14,7 +14,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/axslCommon"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslHyphen"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar"/>
- <classpathentry kind="lib" path="/FOray Lib/xml-apis-1.3.02.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslSpeech"/>
<classpathentry kind="output" path="build/eclipse"/>
Modified: trunk/foray/foray-pretty/.classpath
===================================================================
--- trunk/foray/foray-pretty/.classpath 2007-10-09 13:14:59 UTC (rev 10256)
+++ trunk/foray/foray-pretty/.classpath 2007-10-09 13:41:21 UTC (rev 10257)
@@ -6,7 +6,6 @@
<classpathentry kind="lib" path="/FOray Lib/resolver.jar"/>
<classpathentry kind="lib" path="/FOray Lib/stax-api-1.0.1.jar" sourcepath="/FOray Lib-Build/stax/stax-src-1.2.0.zip"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar"/>
- <classpathentry kind="lib" path="/FOray Lib/xml-apis-1.3.02.jar"/>
<classpathentry kind="lib" path="/FOray Lib/stax-1.2.0.jar" sourcepath="/FOray Lib-Build/stax/stax-src-1.2.0.zip"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/lib/readme.txt
===================================================================
--- trunk/foray/lib/readme.txt 2007-10-09 13:14:59 UTC (rev 10256)
+++ trunk/foray/lib/readme.txt 2007-10-09 13:41:21 UTC (rev 10257)
@@ -51,11 +51,4 @@
XML parser from xml.apache.org
Last download: http://www.apache.org/dist/xml/xerces-j/
-
-xml-apis-*.jar
---------------
-General XML APIs for DOM, SAX, etc.
-Last download: http://www.apache.org/dist/java-repository/xml-apis/jars/
-
-
# Last Line of Memo #
Deleted: trunk/foray/lib/xml-apis-1.3.02.jar
===================================================================
(Binary files differ)
Deleted: trunk/foray/lib/xml-apis.LICENSE-SAX.html
===================================================================
--- trunk/foray/lib/xml-apis.LICENSE-SAX.html 2007-10-09 13:14:59 UTC (rev 10256)
+++ trunk/foray/lib/xml-apis.LICENSE-SAX.html 2007-10-09 13:41:21 UTC (rev 10257)
@@ -1,17 +0,0 @@
- <html>
- <head>SAX LICENSE</head>
- <body>
- <p>This license applies to all interfaces and classes in the
- org/xml/sax hierarchy.
- </p>
- <p>
- <blockquote>
- <em>This module, both source code and documentation, is in the
- Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
- for further information.
- </blockquote>
- </p>
-</body>
-</html>
-
Deleted: trunk/foray/lib/xml-apis.LICENSE.DOM-documentation.html
===================================================================
--- trunk/foray/lib/xml-apis.LICENSE.DOM-documentation.html 2007-10-09 13:14:59 UTC (rev 10256)
+++ trunk/foray/lib/xml-apis.LICENSE.DOM-documentation.html 2007-10-09 13:41:21 UTC (rev 10257)
@@ -1,74 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<?xml version="1.0" encoding="iso-8859-1"?><HTML
-xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>W3C Document License</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-
-<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
-<BODY text=#000000 bgColor=#ffffff>
-<H1>W3C<SUP>\xAE</SUP> DOCUMENT LICENSE</H1>
-<H3 id=version><A
-href="http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231</A></H3>
-<P>Public documents on the W3C site are provided by the copyright holders under
-the following license. By using and/or copying this document, or the W3C
-document from which this statement is linked, you (the licensee) agree that you
-have read, understood, and will comply with the following terms and
-conditions:</P>
-<P>Permission to copy, and distribute the contents of this document, or the W3C
-document from which this statement is linked, in any medium for any purpose and
-without fee or royalty is hereby granted, provided that you include the
-following on <I>ALL</I> copies of the document, or portions thereof, that you
-use:</P>
-<OL>
- <LI>A link or URL to the original W3C document.
- <LI>The pre-existing copyright notice of the original author, or if it doesn't
- exist, a notice (hypertext is preferred, but a textual representation is
- permitted) of the form: "Copyright \xA9 [$date-of-document] <A
- href="http://www.w3.org/">World Wide Web Consortium</A>, (<A
- href="http://www.lcs.mit.edu/">Massachusetts Institute of Technology</A>, <A
- href="http://www.ercim.org/">European Research Consortium for Informatics and
- Mathematics</A>, <A href="http://www.keio.ac.jp/">Keio University</A>). All
- Rights Reserved. <A
- href="http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231</A>"
-
- <LI><EM>If it exists</EM>, the STATUS of the W3C document. </LI></OL>
-<P>When space permits, inclusion of the full text of this <B>NOTICE</B> should
-be provided. We request that authorship attribution be provided in any software,
-documents, or other items or products that you create pursuant to the
-implementation of the contents of this document, or any portion thereof.</P>
-<P>No right to create modifications or derivatives of W3C documents is granted
-pursuant to this license. However, if additional requirements (documented in the
-<A href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A>) are
-satisfied, the right to create modifications or derivatives is sometimes
-granted by the W3C to individuals complying with those requirements.</P>
-<P>THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED
-TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
-NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR
-ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY
-THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</P>
-<P>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE
-OR IMPLEMENTATION OF THE CONTENTS THEREOF.</P>
-<P>The name and trademarks of copyright holders may NOT be used in advertising
-or publicity pertaining to this document or its contents without specific,
-written prior permission. Title to copyright in this document will at all times
-remain with copyright holders.</P>
-<P></P>
-<P>----------------------------------------------------------------------------</P>
-<P>This formulation of W3C's notice and license became active on December 31
-2002. This version removes the copyright ownership notice such that this license
-can be used with materials other than those owned by the W3C, moves information
-on style sheets, DTDs, and schemas to the <A
-href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A>, reflects
-that ERCIM is now a host of the W3C, includes references to this specific dated
-version of the license, and removes the ambiguous grant of "use". See the <A
-href="http://www.w3.org/Consortium/Legal/copyright-documents-19990405">older
-formulation</A> for the policy prior to this date. Please see our <A
-href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A> for common
-questions about using materials from our site, such as the translating or
-annotating specifications. Other questions about this notice can be directed to
-<A href="mailto:sit...@w3...">sit...@w3...</A>.</P>
-<P></P>
-<ADDRESS>Joseph Reagle <<A
-href="mailto:sit...@w3...">mailto:sit...@w3...</A> </ADDRESS>
-<P>Last revised by Reagle $Date$</P></BODY></HTML>
Deleted: trunk/foray/lib/xml-apis.LICENSE.DOM-software.html
===================================================================
--- trunk/foray/lib/xml-apis.LICENSE.DOM-software.html 2007-10-09 13:14:59 UTC (rev 10256)
+++ trunk/foray/lib/xml-apis.LICENSE.DOM-software.html 2007-10-09 13:41:21 UTC (rev 10257)
@@ -1,66 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<?xml version="1.0" encoding="iso-8859-1"?><HTML
-xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>W3C Software License</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-
-<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
-<BODY text=#000000 bgColor=#ffffff>
-<H1>W3C<SUP>\xAE</SUP> SOFTWARE NOTICE AND LICENSE</H1>
-<H3 id=version><A
-href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231</A></H3>
-<P>This work (and included software, documentation such as READMEs, or other
-related items) is being provided by the copyright holders under the following
-license. By obtaining, using and/or copying this work, you (the licensee) agree
-that you have read, understood, and will comply with the following terms and
-conditions.</P>
-<P>Permission to copy, modify, and distribute this software and its
-documentation, with or without modification, for any purpose and without
-fee or royalty is hereby granted, provided that you include the following on ALL
-copies of the software and documentation or portions thereof, including
-modifications:</P>
-<OL>
- <LI>The full text of this NOTICE in a location viewable to users of the
- redistributed or derivative work.
- <LI>Any pre-existing intellectual property disclaimers, notices, or terms and
- conditions. If none exist, the <A
- href="http://www.w3.org/Consortium/Legal/2002/copyright-software-short-notice-20021231.html">W3C
- Software Short Notice</A> should be included (hypertext is preferred, text is
- permitted) within the body of any redistributed or derivative code.
- <LI>Notice of any changes or modifications to the files, including the date
- changes were made. (We recommend you provide URIs to the location from which
- the code is derived.) </LI></OL>
-<P>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE
-OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD
-PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</P>
-<P>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-DOCUMENTATION.</P>
-<P>The name and trademarks of copyright holders may NOT be used in advertising
-or publicity pertaining to the software without specific, written prior
-permission. Title to copyright in this software and any associated documentation
-will at all times remain with copyright holders.</P>
-<P></P>
-<P>____________________________________</P>
-<P>This formulation of W3C's notice and license became active on December 31
-2002. This version removes the copyright ownership notice such that this license
-can be used with materials other than those owned by the W3C, reflects that
-ERCIM is now a host of the W3C, includes references to this specific dated
-version of the license, and removes the ambiguous grant of "use". Otherwise,
-this version is the same as the <A
-href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">previous
-version</A> and is written so as to preserve the <A
-href="http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses">Free
-Software Foundation's assessment of GPL compatibility</A> and <A
-href="http://www.opensource.org/licenses/W3C.php">OSI's certification</A> under
-the <A href="http://www.opensource.org/docs/definition.php">Open Source
-Definition</A>. Please see our <A
-href="http://www.w3.org/Consortium/Legal/IPR-FAQ">Copyright FAQ</A> for common
-questions about using materials from our site, including specific terms and
-conditions for packages like libwww, Amaya, and Jigsaw. Other questions about
-this notice can be directed to <A
-href="mailto:sit...@w3...">sit...@w3...</A>.<BR> </P>
-<ADDRESS>Joseph Reagle <<A
-href="mailto:sit...@w3...">mailto:sit...@w3...</A> </ADDRESS>
-<P>Last revised by Reagle $Date$</P></BODY></HTML>
Deleted: trunk/foray/lib/xml-apis.LICENSE.txt
===================================================================
--- trunk/foray/lib/xml-apis.LICENSE.txt 2007-10-09 13:14:59 UTC (rev 10256)
+++ trunk/foray/lib/xml-apis.LICENSE.txt 2007-10-09 13:41:21 UTC (rev 10257)
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
- See the License for the specific language governing permissions and
- limitations under the License.
Deleted: trunk/foray/lib/xml-apis.NOTICE.txt
===================================================================
--- trunk/foray/lib/xml-apis.NOTICE.txt 2007-10-09 13:14:59 UTC (rev 10256)
+++ trunk/foray/lib/xml-apis.NOTICE.txt 2007-10-09 13:41:21 UTC (rev 10257)
@@ -1,13 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to section 4(d) of the Apache License, ==
- == Version 2.0, in this case for the Apache xml-commons xml-apis ==
- == distribution. ==
- =========================================================================
-
- This product includes software developed by The Apache Software Foundation
- (http://www.apache.org/).
-
- Portions of this software were originally based on the following:
- - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
- - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
- - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-27 16:26:08
|
Revision: 10259
http://foray.svn.sourceforge.net/foray/?rev=10259&view=rev
Author: victormote
Date: 2007-10-27 09:26:09 -0700 (Sat, 27 Oct 2007)
Log Message:
-----------
Conform to axsl changes renaming package.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
trunk/foray/foray-areatree/src/java/org/foray/area/SVGArea.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-10-27 16:19:41 UTC (rev 10258)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/ForeignObjectArea.java 2007-10-27 16:26:09 UTC (rev 10259)
@@ -32,7 +32,7 @@
import org.axsl.fo.FoForeignXml;
import org.axsl.fo.fo.GraftingPoint;
import org.axsl.fo.fo.InstreamForeignObject;
-import org.axsl.fo.svg.SvgElement;
+import org.axsl.fo.foreign.SvgElement;
import org.axsl.galley.ForeignContent;
import org.axsl.galley.RenderVisitor;
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/SVGArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/SVGArea.java 2007-10-27 16:19:41 UTC (rev 10258)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/SVGArea.java 2007-10-27 16:26:09 UTC (rev 10259)
@@ -29,7 +29,7 @@
package org.foray.area;
import org.axsl.fo.fo.GraftingPoint;
-import org.axsl.fo.svg.SvgElement;
+import org.axsl.fo.foreign.SvgElement;
import org.axsl.graphic.SvgGraphic;
/**
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java 2007-10-27 16:19:41 UTC (rev 10258)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java 2007-10-27 16:26:09 UTC (rev 10259)
@@ -46,7 +46,7 @@
* The content of an inline SVG document.
*/
public class SVGElement extends ForeignXML
- implements org.axsl.fo.svg.SvgElement {
+ implements org.axsl.fo.foreign.SvgElement {
/** The SVG Graphic instance for this inline SVG. */
private SvgGraphic svg;
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-10-27 16:19:41 UTC (rev 10258)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-10-27 16:26:09 UTC (rev 10259)
@@ -94,7 +94,7 @@
import org.axsl.fo.fo.Title;
import org.axsl.fo.fo.Wrapper;
import org.axsl.fo.fo.prop.BreakBeforePa;
-import org.axsl.fo.svg.SvgElement;
+import org.axsl.fo.foreign.SvgElement;
import org.axsl.text.line.EagerLineBreaker;
import org.apache.commons.logging.Log;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-10-27 18:55:44
|
Revision: 10264
http://foray.svn.sourceforge.net/foray/?rev=10264&view=rev
Author: victormote
Date: 2007-10-27 11:55:44 -0700 (Sat, 27 Oct 2007)
Log Message:
-----------
Rename class for consistency and clarity.
Modified Paths:
--------------
trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestGraphic.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/math/MathObjectMaker.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java
Added Paths:
-----------
trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/InstreamSvgElement.java
Removed Paths:
-------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestGraphic.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestGraphic.java 2007-10-27 18:51:36 UTC (rev 10263)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/fo/TestGraphic.java 2007-10-27 18:55:44 UTC (rev 10264)
@@ -34,7 +34,7 @@
import org.foray.fotree.fo.obj.Block;
import org.foray.fotree.fo.obj.Flow;
import org.foray.fotree.fo.obj.InstreamForeignObject;
-import org.foray.fotree.svg.obj.SVGElement;
+import org.foray.fotree.svg.obj.InstreamSvgElement;
/**
* Tests of various graphic capabilities at the FO Tree level.
@@ -64,8 +64,8 @@
/* ... which contains an SVGElement ... */
node = ifo.getChildAt(0);
- assertTrue(node instanceof SVGElement);
- final SVGElement svgElement = (SVGElement) node;
+ assertTrue(node instanceof InstreamSvgElement);
+ final InstreamSvgElement svgElement = (InstreamSvgElement) node;
/* ... for which we can find the width and height. */
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/math/MathObjectMaker.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/math/MathObjectMaker.java 2007-10-27 18:51:36 UTC (rev 10263)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/math/MathObjectMaker.java 2007-10-27 18:55:44 UTC (rev 10264)
@@ -32,7 +32,7 @@
import org.foray.fotree.PropertyList;
import org.foray.fotree.PropertyListUnparsed;
import org.foray.fotree.fo.obj.InstreamForeignObject;
-import org.foray.fotree.svg.obj.SVGElement;
+import org.foray.fotree.svg.obj.InstreamSvgElement;
import org.axsl.fo.FoTreeException;
@@ -71,7 +71,7 @@
if (parent instanceof InstreamForeignObject) {
final InstreamForeignObject ifo =
(InstreamForeignObject) parent;
- return new SVGElement(ifo, propertyListUnparsed);
+ return new InstreamSvgElement(ifo, propertyListUnparsed);
} else {
parent.throwException("Instream MathML content must be inside "
+ "an fo:instream-foreign-object.");
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java 2007-10-27 18:51:36 UTC (rev 10263)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java 2007-10-27 18:55:44 UTC (rev 10264)
@@ -32,7 +32,7 @@
import org.foray.fotree.PropertyList;
import org.foray.fotree.PropertyListUnparsed;
import org.foray.fotree.fo.obj.InstreamForeignObject;
-import org.foray.fotree.svg.obj.SVGElement;
+import org.foray.fotree.svg.obj.InstreamSvgElement;
import org.axsl.fo.FoTreeException;
@@ -71,7 +71,7 @@
if (parent instanceof InstreamForeignObject) {
final InstreamForeignObject ifo =
(InstreamForeignObject) parent;
- return new SVGElement(ifo, propertyListUnparsed);
+ return new InstreamSvgElement(ifo, propertyListUnparsed);
} else {
parent.throwException("Instream SVG content must be inside "
+ "an fo:instream-foreign-object.");
Copied: trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/InstreamSvgElement.java (from rev 10263, trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java)
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/InstreamSvgElement.java (rev 0)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/InstreamSvgElement.java 2007-10-27 18:55:44 UTC (rev 10264)
@@ -0,0 +1,154 @@
+/*
+ * Copyright 2004 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.fotree.svg.obj;
+
+import org.foray.common.FOrayConstants;
+import org.foray.fotree.ForeignXML;
+import org.foray.fotree.Namespace;
+import org.foray.fotree.PropertyListUnparsed;
+import org.foray.fotree.fo.obj.InstreamForeignObject;
+
+import org.axsl.fo.FoTreeException;
+import org.axsl.fo.ProxyFactory;
+import org.axsl.graphic.GraphicException;
+import org.axsl.graphic.SvgGraphic;
+
+import org.w3c.dom.svg.SVGDocument;
+
+/**
+ * The content of an inline SVG document.
+ */
+public class InstreamSvgElement extends ForeignXML
+ implements org.axsl.fo.foreign.SvgElement {
+
+ /** The SVG Graphic instance for this inline SVG. */
+ private SvgGraphic svgGraphic;
+
+ /**
+ * Constructor.
+ * @param parent The parent FObj.
+ * @param propertyList The property list for this FObj.
+ * @throws FoTreeException For errors during construction.
+ */
+ public InstreamSvgElement(final InstreamForeignObject parent,
+ final PropertyListUnparsed propertyList) throws FoTreeException {
+ super(parent, propertyList);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected SVGDocument createDOMDocument() throws FoTreeException {
+ try {
+ return this.getGraphicServer().makeSvgDocument();
+ } catch (final GraphicException e) {
+ throw new FoTreeException(e);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void end() throws FoTreeException {
+ final SVGDocument svgDocument = this.getSVGDocument();
+ try {
+ this.svgGraphic = this.getGraphicServer().makeSvgGraphic(
+ svgDocument);
+ } catch (final GraphicException e) {
+ this.throwException("Unable to create SvgGraphic instance.");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Namespace getNamespace() {
+ return this.getFoTree().getSVGNamespace();
+ }
+
+ /**
+ * Returns the SVGDocument.
+ * @return The SVGDocument.
+ */
+ private SVGDocument getSVGDocument() {
+ return (SVGDocument) this.getDocument();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public SvgGraphic getSvgGraphic() {
+ return this.svgGraphic;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int intrinsicContentWidth() {
+ try {
+ return this.getSvgGraphic().absoluteWidth(
+ FOrayConstants.DEFAULT_SCREEN_RESOLUTION);
+ } catch (final GraphicException e) {
+ final String message = "Error getting SVG width: "
+ + e.getMessage();
+ this.getLogger().error(this.getMessageWithContext(message));
+ }
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int intrinsicContentHeight() {
+ try {
+ return this.getSvgGraphic().absoluteHeight(
+ FOrayConstants.DEFAULT_SCREEN_RESOLUTION);
+ } catch (final GraphicException e) {
+ final String message = "Error getting SVG height: "
+ + e.getMessage();
+ this.getLogger().error(this.getMessageWithContext(message));
+ }
+ return -1;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object acceptProxyFactory(final ProxyFactory factory) {
+ return factory.makeProxy(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isValid() {
+ return this.svgGraphic != null;
+ }
+
+}
Deleted: trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java 2007-10-27 18:51:36 UTC (rev 10263)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/obj/SVGElement.java 2007-10-27 18:55:44 UTC (rev 10264)
@@ -1,154 +0,0 @@
-/*
- * Copyright 2004 The FOray Project.
- * http://www.foray.org
- *
- * Licensed 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * This work is in part derived from the following work(s), used with the
- * permission of the licensor:
- * Apache FOP, licensed by the Apache Software Foundation
- *
- */
-
-/*
- * $LastChangedRevision$
- * $LastChangedDate$
- * $LastChangedBy$
- */
-
-package org.foray.fotree.svg.obj;
-
-import org.foray.common.FOrayConstants;
-import org.foray.fotree.ForeignXML;
-import org.foray.fotree.Namespace;
-import org.foray.fotree.PropertyListUnparsed;
-import org.foray.fotree.fo.obj.InstreamForeignObject;
-
-import org.axsl.fo.FoTreeException;
-import org.axsl.fo.ProxyFactory;
-import org.axsl.graphic.GraphicException;
-import org.axsl.graphic.SvgGraphic;
-
-import org.w3c.dom.svg.SVGDocument;
-
-/**
- * The content of an inline SVG document.
- */
-public class SVGElement extends ForeignXML
- implements org.axsl.fo.foreign.SvgElement {
-
- /** The SVG Graphic instance for this inline SVG. */
- private SvgGraphic svgGraphic;
-
- /**
- * Constructor.
- * @param parent The parent FObj.
- * @param propertyList The property list for this FObj.
- * @throws FoTreeException For errors during construction.
- */
- public SVGElement(final InstreamForeignObject parent,
- final PropertyListUnparsed propertyList) throws FoTreeException {
- super(parent, propertyList);
- }
-
- /**
- * {@inheritDoc}
- */
- protected SVGDocument createDOMDocument() throws FoTreeException {
- try {
- return this.getGraphicServer().makeSvgDocument();
- } catch (final GraphicException e) {
- throw new FoTreeException(e);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected void end() throws FoTreeException {
- final SVGDocument svgDocument = this.getSVGDocument();
- try {
- this.svgGraphic = this.getGraphicServer().makeSvgGraphic(
- svgDocument);
- } catch (final GraphicException e) {
- this.throwException("Unable to create SvgGraphic instance.");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Namespace getNamespace() {
- return this.getFoTree().getSVGNamespace();
- }
-
- /**
- * Returns the SVGDocument.
- * @return The SVGDocument.
- */
- private SVGDocument getSVGDocument() {
- return (SVGDocument) this.getDocument();
- }
-
- /**
- * {@inheritDoc}
- */
- public SvgGraphic getSvgGraphic() {
- return this.svgGraphic;
- }
-
- /**
- * {@inheritDoc}
- */
- public int intrinsicContentWidth() {
- try {
- return this.getSvgGraphic().absoluteWidth(
- FOrayConstants.DEFAULT_SCREEN_RESOLUTION);
- } catch (final GraphicException e) {
- final String message = "Error getting SVG width: "
- + e.getMessage();
- this.getLogger().error(this.getMessageWithContext(message));
- }
- return -1;
- }
-
- /**
- * {@inheritDoc}
- */
- public int intrinsicContentHeight() {
- try {
- return this.getSvgGraphic().absoluteHeight(
- FOrayConstants.DEFAULT_SCREEN_RESOLUTION);
- } catch (final GraphicException e) {
- final String message = "Error getting SVG height: "
- + e.getMessage();
- this.getLogger().error(this.getMessageWithContext(message));
- }
- return -1;
- }
-
- /**
- * {@inheritDoc}
- */
- public Object acceptProxyFactory(final ProxyFactory factory) {
- return factory.makeProxy(this);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isValid() {
- return this.svgGraphic != null;
- }
-
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-11-10 01:19:13
|
Revision: 10274
http://foray.svn.sourceforge.net/foray/?rev=10274&view=rev
Author: victormote
Date: 2007-11-09 17:19:14 -0800 (Fri, 09 Nov 2007)
Log Message:
-----------
Improvements to MathML processing.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/java/org/foray/graphic/MathGraphic4a.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXObject.java
Added Paths:
-----------
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PdfXFormMath.java
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/MathGraphic4a.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/MathGraphic4a.java 2007-11-09 19:11:22 UTC (rev 10273)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/MathGraphic4a.java 2007-11-10 01:19:14 UTC (rev 10274)
@@ -36,6 +36,7 @@
import org.w3c.dom.mathml.MathMLDocument;
import org.w3c.dom.svg.SVGDocument;
+import java.awt.color.ColorSpace;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.net.URL;
@@ -164,4 +165,13 @@
return this.svgGraphic.absoluteHeightReal();
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ColorSpace getColorSpace() throws GraphicException {
+ this.loadImageWrapper();
+ return this.svgGraphic.getColorSpace();
+ }
+
}
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-11-09 19:11:22 UTC (rev 10273)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXObject.java 2007-11-10 01:19:14 UTC (rev 10274)
@@ -42,6 +42,7 @@
import org.axsl.graphic.EpsGraphic;
import org.axsl.graphic.Graphic;
import org.axsl.graphic.GraphicException;
+import org.axsl.graphic.MathGraphic;
import org.axsl.graphic.SvgGraphic;
import org.axsl.pdf.PdfException;
@@ -108,6 +109,10 @@
final SvgGraphic svgGraphic = (SvgGraphic) img;
xObject = new PDFXFormSvg(pdfDoc, svgGraphic, fontConsumer,
strokeText);
+ } else if (img instanceof MathGraphic) {
+ final MathGraphic mathGraphic = (MathGraphic) img;
+ xObject = new PdfXFormMath(pdfDoc, mathGraphic, fontConsumer,
+ strokeText);
} else if (img.getGraphicType() == Graphic.Type.PDF) {
xObject = new PDFXReference(pdfDoc, img);
} else {
Added: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PdfXFormMath.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PdfXFormMath.java (rev 0)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PdfXFormMath.java 2007-11-10 01:19:14 UTC (rev 10274)
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy: victormote $
+ */
+
+package org.foray.pdf.object;
+
+import org.foray.common.Mime;
+import org.foray.ps.FOrayBoundingBox;
+
+import org.axsl.font.FontConsumer;
+import org.axsl.graphic.GraphicException;
+import org.axsl.graphic.MathGraphic;
+import org.axsl.graphic.output.GraphicOutput;
+import org.axsl.graphic.output.GraphicPdf;
+import org.axsl.ps.BoundingBox;
+
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
+import java.io.ByteArrayOutputStream;
+
+/**
+ * A PDF "Form" XObject containing a MathML document.
+ */
+public class PdfXFormMath extends PDFXForm {
+
+ /** The Graphic instance associated with this XObject. */
+ private MathGraphic graphic;
+
+ /** The FontConsumer to use for resolving fonts in the MathML document. */
+ private FontConsumer fontConsumer;
+
+ /** True if text should be stroked, false if it should use a font. */
+ private boolean strokeText;
+
+ /**
+ * Constructor.
+ * @param doc The parent PDF document.
+ * @param graphic The form to be encapsulated.
+ * @param fontConsumer The font consumer to use for resolving fonts in the
+ * SVG.
+ * @param strokeText Set to true if text should be stroked, false if it
+ * should be drawn with a font.
+ * @throws GraphicException For errors getting the appropriate filter.
+ */
+ public PdfXFormMath(final PDFDocument doc, final MathGraphic graphic,
+ final FontConsumer fontConsumer, final boolean strokeText)
+ throws GraphicException {
+ super(doc, graphic);
+ this.graphic = graphic;
+ this.fontConsumer = fontConsumer;
+ this.strokeText = strokeText;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected byte[] getPdfContent() throws GraphicException {
+ final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ final GraphicOutput graphicOutput = this.graphic.getGraphicOutput(
+ Mime.PDF.getMimeString());
+ if (! (graphicOutput instanceof GraphicPdf)) {
+ throw new GraphicException("Unable to get PDF output helper for "
+ + this.graphic.getUrl());
+ }
+ final GraphicPdf graphicPdf = (GraphicPdf) graphicOutput;
+ graphicPdf.drawVectorContent(outputStream, this.getPDFDocument(),
+ this.fontConsumer, this.strokeText, false);
+ return outputStream.toByteArray();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public float getHorizontalScaling(
+ final Rectangle2D.Float contentRectangle) {
+ final float graphicWidth = FOrayBoundingBox.width(getBoundingBox());
+ return contentRectangle.width / graphicWidth;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public float getVerticalScaling(final Rectangle2D.Float contentRectangle) {
+ final float graphicHeight = FOrayBoundingBox.height(getBoundingBox());
+ return contentRectangle.height / graphicHeight;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public MathGraphic getGraphic() {
+ return this.graphic;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected float[] getBoundingBox() {
+ final float[] box = new float[BoundingBox.BBOX_ENTRIES];
+ box[BoundingBox.BBOX_LOWER_LEFT_X_INDEX] = 0;
+ box[BoundingBox.BBOX_LOWER_LEFT_Y_INDEX] = 0;
+ try {
+ box[BoundingBox.BBOX_UPPER_RIGHT_X_INDEX] =
+ this.getGraphic().pixelWidth();
+ box[BoundingBox.BBOX_UPPER_RIGHT_Y_INDEX] =
+ this.getGraphic().pixelHeight();
+ } catch (final GraphicException e) {
+ this.getLogger().error("Error getting SVG dimensions in "
+ + this.getClass().getName());
+ }
+ return box;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected String specialXFormDict() {
+ return "";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected AffineTransform getUserSpaceTransform() {
+ /* The -1 for "sy" inverts the image. SVG (at least Batik) and PDF
+ * are upside-down from each other. */
+ final AffineTransform transform = AffineTransform.getScaleInstance(1,
+ -1);
+
+ /* Because SVG and PDF are upside-down, the graphic thinks it is at the
+ * top of the image when it is actually at the bottom. Therefore, we
+ * need a translate to move it up the page by the height of the
+ * graphic. */
+ try {
+ transform.translate(0, this.getGraphic().pixelHeight() * -1);
+ } catch (final GraphicException e) {
+ this.getLogger().error("Error getting SVG dimensions.");
+ }
+
+ return transform;
+ }
+
+}
Property changes on: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PdfXFormMath.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-11-10 01:37:26
|
Revision: 10275
http://foray.svn.sourceforge.net/foray/?rev=10275&view=rev
Author: victormote
Date: 2007-11-09 17:37:30 -0800 (Fri, 09 Nov 2007)
Log Message:
-----------
Fix some issues reported by Checkstyle, related to ternary conditionals and the use of implementations instead of interfaces.
Modified Paths:
--------------
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/TernaryTree.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/util/WordList.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifBookComponent.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifPgf.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifPgfLine.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifTbl.java
trunk/foray/foray-mif/src/java/org/foray/mif/MifTextFlow.java
trunk/foray/foray-pretty/src/java/org/foray/pretty/dtd/DTDTokenizer.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java
trunk/foray/foray-ps/src/java/org/foray/ps/PSSystemDict.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/TernaryTree.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/TernaryTree.java 2007-11-10 01:19:14 UTC (rev 10274)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/TernaryTree.java 2007-11-10 01:37:30 UTC (rev 10275)
@@ -400,7 +400,12 @@
* @param newsize The new number of nodes in the tree.
*/
private void redimNodeArrays(final int newsize) {
- final int len = newsize < this.lo.length ? newsize : this.lo.length;
+ int len = 0;
+ if (newsize < this.lo.length) {
+ len = newsize;
+ } else {
+ len = this.lo.length;
+ }
char[] na = new char[newsize];
System.arraycopy(this.lo, 0, na, 0, len);
this.lo = na;
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/util/WordList.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/util/WordList.java 2007-11-10 01:19:14 UTC (rev 10274)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/util/WordList.java 2007-11-10 01:37:30 UTC (rev 10275)
@@ -43,6 +43,7 @@
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.List;
import java.util.StringTokenizer;
/**
@@ -100,7 +101,7 @@
}
/* Tokenize the input. */
- final ArrayList<String> tokens = new ArrayList<String>(
+ final List<String> tokens = new ArrayList<String>(
WordList.INITIAL_LIST_SIZE);
final InputStreamReader reader = new InputStreamReader(this.input,
this.inputEncoding);
@@ -222,7 +223,7 @@
* Removes the non-word characters from the list of tokens.
* @param tokens The list of tokens to be adjusted.
*/
- private void removeNonWordChars(final ArrayList<String> tokens) {
+ private void removeNonWordChars(final List<String> tokens) {
if (! this.removeNonWordChars) {
return;
}
Modified: trunk/foray/foray-mif/src/java/org/foray/mif/MifBookComponent.java
===================================================================
--- trunk/foray/foray-mif/src/java/org/foray/mif/MifBookComponent.java 2007-11-10 01:19:14 UTC (rev 10274)
+++ trunk/foray/foray-mif/src/java/org/foray/mif/MifBookComponent.java 2007-11-10 01:37:30 UTC (rev 10275)
@@ -29,6 +29,7 @@
package org.foray.mif;
import java.util.ArrayList;
+import java.util.List;
/**
* A MIF Book Component.
@@ -54,16 +55,16 @@
private MifTblCatalog tblCatalog;
/** The frames in this component. */
- private ArrayList<MifFrame> aFrames = new ArrayList<MifFrame>();
+ private List<MifFrame> aFrames = new ArrayList<MifFrame>();
/** The table in this component. */
- private ArrayList<MifTbl> tables = new ArrayList<MifTbl>();
+ private List<MifTbl> tables = new ArrayList<MifTbl>();
/** The pages in this component. */
- private ArrayList<MifPage> pages = new ArrayList<MifPage>();
+ private List<MifPage> pages = new ArrayList<MifPage>();
/** The text flows in this component. */
- private ArrayList<MifFlow> textFlows = new ArrayList<MifFlow>();
+ private List<MifFlow> textFlows = new ArrayList<MifFlow>();
/**
* Constructor.
@@ -194,7 +195,7 @@
* Returns the pages for this component.
* @return The pages for this component.
*/
- public ArrayList<MifPage> getPages() {
+ public List<MifPage> getPages() {
return this.pages;
}
@@ -212,7 +213,7 @@
* Returns the text flows for this component.
* @return The textFlows.
*/
- public ArrayList<MifFlow> getTextFlows() {
+ public List<MifFlow> getTextFlows() {
return this.textFlows;
}
Modified: trunk/foray/foray-mif/src/java/org/foray/mif/MifPgf.java
===================================================================
--- trunk/foray/foray-mif/src/java/org/foray/mif/MifPgf.java 2007-11-10 01:19:14 UTC (rev 10274)
+++ trunk/foray/foray-mif/src/java/org/foray/mif/MifPgf.java 2007-11-10 01:37:30 UTC (rev 10275)
@@ -31,6 +31,7 @@
import org.foray.common.WKConstants;
import java.util.ArrayList;
+import java.util.List;
/**
* A MIF Paragraph.
@@ -38,7 +39,7 @@
public class MifPgf extends MifToken {
/** The lines in this paragraph. */
- private ArrayList<MifPgfLine> paraLines;
+ private List<MifPgfLine> paraLines;
/** Same as TextRectID. */
private int id;
Modified: trunk/foray/foray-mif/src/java/org/foray/mif/MifPgfLine.java
===================================================================
--- trunk/foray/foray-mif/src/java/org/foray/mif/MifPgfLine.java 2007-11-10 01:19:14 UTC (rev 10274)
+++ trunk/foray/foray-mif/src/java/org/foray/mif/MifPgfLine.java 2007-11-10 01:37:30 UTC (rev 10275)
@@ -29,6 +29,7 @@
package org.foray.mif;
import java.util.ArrayList;
+import java.util.List;
/**
* A MIF Paragraph Line.
@@ -36,7 +37,7 @@
public class MifPgfLine extends MifToken {
/** The content of this line. */
- private ArrayList<Object> content;
+ private List<Object> content;
/** The id of the parent text rectangle for this line. */
private int textRectID;
Modified: trunk/foray/foray-mif/src/java/org/foray/mif/MifTbl.java
===================================================================
--- trunk/foray/foray-mif/src/java/org/foray/mif/MifTbl.java 2007-11-10 01:19:14 UTC (rev 10274)
+++ trunk/foray/foray-mif/src/java/org/foray/mif/MifTbl.java 2007-11-10 01:37:30 UTC (rev 10275)
@@ -29,6 +29,7 @@
package org.foray.mif;
import java.util.ArrayList;
+import java.util.List;
/**
* A MIF Table.
@@ -39,20 +40,20 @@
private int id;
/** The columns in this table. */
- private ArrayList<TblColumn> tblColumns = new ArrayList<TblColumn>();
+ private List<TblColumn> tblColumns = new ArrayList<TblColumn>();
/** The rows in this table's body. */
- private ArrayList<Row> tblBody;
+ private List<Row> tblBody;
/** The rows in this table's header. */
- private ArrayList<Row> tblHead;
+ private List<Row> tblHead;
/** The rows in this table's footer. */
- private ArrayList<Row> tblFoot;
+ private List<Row> tblFoot;
/** The current portion of the table being processed, one of
* {@link #tblHead}, {@link #tblBody}, or {@link #tblFoot}. */
- private ArrayList<Row> current;
+ private List<Row> current;
/**
* Constructor.
@@ -98,7 +99,7 @@
class Row extends MifToken {
/** The cells in this row. */
- private ArrayList<Cell> cells;
+ private List<Cell> cells;
/**
* Constructor.
@@ -113,7 +114,7 @@
class Cell extends MifToken {
/** The paragraphs in this cell. */
- private ArrayList<MifPgf> paras;
+ private List<MifPgf> paras;
/**
* Constructor.
@@ -234,7 +235,7 @@
*/
public MifPgf curPara() {
final Row curRow = this.current.get(this.current.size() - 1);
- final ArrayList<MifPgf> paras = curRow.curCell().paras;
+ final List<MifPgf> paras = curRow.curCell().paras;
return paras.get(paras.size() - 1);
}
Modified: trunk/foray/foray-mif/src/java/org/foray/mif/MifTextFlow.java
===================================================================
--- trunk/foray/foray-mif/src/java/org/foray/mif/MifTextFlow.java 2007-11-10 01:19:14 UTC (rev 10274)
+++ trunk/foray/foray-mif/src/java/org/foray/mif/MifTextFlow.java 2007-11-10 01:37:30 UTC (rev 10275)
@@ -29,6 +29,7 @@
package org.foray.mif;
import java.util.ArrayList;
+import java.util.List;
/**
* A MIF Text Flow.
@@ -36,7 +37,7 @@
public class MifTextFlow extends MifFlow {
/** The paragraphs in this text flow. */
- private ArrayList<MifPgf> paras;
+ private List<MifPgf> paras;
/** This ID is used within ParaLine. However it is logical to keep it unique
* to a textflow. */
Modified: trunk/foray/foray-pretty/src/java/org/foray/pretty/dtd/DTDTokenizer.java
===================================================================
--- trunk/foray/foray-pretty/src/java/org/foray/pretty/dtd/DTDTokenizer.java 2007-11-10 01:19:14 UTC (rev 10274)
+++ trunk/foray/foray-pretty/src/java/org/foray/pretty/dtd/DTDTokenizer.java 2007-11-10 01:37:30 UTC (rev 10275)
@@ -29,6 +29,7 @@
package org.foray.pretty.dtd;
import java.util.ArrayList;
+import java.util.List;
/**
* Utility class for tokenizing a DTD.
@@ -51,7 +52,7 @@
* @return An array of String tokens.
*/
public static String[] tokenizeElementContent(final String content) {
- final ArrayList<String> tokens = new ArrayList<String>();
+ final List<String> tokens = new ArrayList<String>();
int startIndex = 0;
int currentIndex = 0;
while (true) {
@@ -186,8 +187,7 @@
* @param arrayList The raw list.
* @return A String array with arrayList's contents.
*/
- public static String[] arrayListToStrings(
- final ArrayList<String> arrayList) {
+ public static String[] arrayListToStrings(final List<String> arrayList) {
final String[] strings = new String[arrayList.size()];
for (int i = 0; i < arrayList.size(); i++) {
strings[i] = arrayList.get(i);
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java 2007-11-10 01:19:14 UTC (rev 10274)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSInterpreter.java 2007-11-10 01:37:30 UTC (rev 10275)
@@ -197,8 +197,8 @@
* being built is in procedureBeingBuilt, which is pushed onto this stack
* if a nested procedure is started.
*/
- private List<ArrayList<PSObject>> procedureStack
- = new ArrayList<ArrayList<PSObject>>();
+ private List<List<PSObject>> procedureStack
+ = new ArrayList<List<PSObject>>();
/**
* This is the procedure that is currently being built. If a nested
@@ -206,7 +206,7 @@
* procedureStack, and a new procedureBeingBuilt is started. It must always
* be null when no procedure is being built.
*/
- private ArrayList<PSObject> procedureBeingBuilt = null;
+ private List<PSObject> procedureBeingBuilt = null;
/** Indicates whether the parser is currently inside a string. */
private boolean inString = false;
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PSSystemDict.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PSSystemDict.java 2007-11-10 01:19:14 UTC (rev 10274)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PSSystemDict.java 2007-11-10 01:37:30 UTC (rev 10275)
@@ -40,6 +40,7 @@
import java.awt.geom.Point2D;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.List;
import java.util.Map;
/**
@@ -2031,9 +2032,9 @@
PSOperator.OPER_BIND);
}
// Create a stack of items whose contents are to be bound
- final ArrayList<PSArray> stack = new ArrayList<PSArray>(5);
+ final List<PSArray> stack = new ArrayList<PSArray>(5);
// Create a collection to keep track of where we are in each one.
- final ArrayList<Integer> stackCounter = new ArrayList<Integer>(5);
+ final List<Integer> stackCounter = new ArrayList<Integer>(5);
stack.add(psarray);
stackCounter.add(new Integer(0));
while (stack.size() > 0) {
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-11-10 01:19:14 UTC (rev 10274)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-11-10 01:37:30 UTC (rev 10275)
@@ -85,6 +85,7 @@
import java.awt.print.PrinterException;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.List;
import java.util.Vector;
import javax.swing.ImageIcon;
@@ -108,7 +109,7 @@
private int pageNumber = 0;
/** The list of pages processed. */
- private Vector<Page> pageList = new Vector<Page>();
+ private List<Page> pageList = new Vector<Page>();
/** A color cached during processing. This could conceivably become a
* local variable, but is an instance variable in the hope of reducing
@@ -386,7 +387,7 @@
* @param page The index to the page to be removed.
*/
public void removePage(final int page) {
- this.pageList.removeElementAt(page);
+ this.pageList.remove(page);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-11-10 03:20:17
|
Revision: 10277
http://foray.svn.sourceforge.net/foray/?rev=10277&view=rev
Author: victormote
Date: 2007-11-09 19:20:22 -0800 (Fri, 09 Nov 2007)
Log Message:
-----------
Fix some issues reported by Checkstyle, related to ternary conditionals and the use of implementations instead of interfaces.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java
trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java
trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java 2007-11-10 03:19:53 UTC (rev 10276)
+++ trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java 2007-11-10 03:20:22 UTC (rev 10277)
@@ -219,7 +219,7 @@
final String dest, final String compDir) {
final String converter = "org.apache.fop.tools.TestConverter";
- HashMap<?, ?> diff = null;
+ Map<?, ?> diff = null;
try {
final Class<?> cla = Class.forName(converter, true, loader);
final Object tc = cla.newInstance();
Modified: trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2007-11-10 03:19:53 UTC (rev 10276)
+++ trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2007-11-10 03:20:22 UTC (rev 10277)
@@ -325,9 +325,15 @@
outname = outname.substring(0,
outname.length() - ".xml".length());
}
+ String extension;
+ if (this.outputPDF) {
+ extension = ".pdf";
+ } else {
+ extension = ".at.xml";
+ }
final BufferedOutputStream bos = new BufferedOutputStream(
new FileOutputStream(new File(this.destdir,
- outname + (this.outputPDF ? ".pdf" : ".at.xml"))));
+ outname + extension)));
OutputTargetType rendererType = null;
if (this.outputPDF) {
rendererType = OutputTargetType.PDF;
Modified: trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java 2007-11-10 03:19:53 UTC (rev 10276)
+++ trunk/foray/foray-common/src/java/org/foray/common/url/classpath/Handler.java 2007-11-10 03:20:22 UTC (rev 10277)
@@ -67,8 +67,12 @@
public InputStream getInputStream() throws IOException {
final String path = url.getPath();
- final String resourcePath =
- (path.charAt(0) == '/') ? path.substring(1) : path;
+ String resourcePath;
+ if (path.charAt(0) == '/') {
+ resourcePath = path.substring(1);
+ } else {
+ resourcePath = path;
+ }
final InputStream inputStream = getClass().getClassLoader().
getResourceAsStream(resourcePath);
if (inputStream == null) {
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java 2007-11-10 03:19:53 UTC (rev 10276)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontUse.java 2007-11-10 03:20:22 UTC (rev 10277)
@@ -41,6 +41,7 @@
import org.apache.commons.logging.Log;
import java.util.HashMap;
+import java.util.Map;
/**
* <p>An implementation of the aXSL {@link FOrayFontUse} interface.</p>
@@ -73,7 +74,7 @@
/** Map whose key is String containing a mime type, and whose value is a
* {@link FontOutput} instance to be used for that mime type. */
- private HashMap<String, FontOutput> fontOutputs
+ private Map<String, FontOutput> fontOutputs
= new HashMap<String, FontOutput>();
/**
Modified: trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java 2007-11-10 03:19:53 UTC (rev 10276)
+++ trunk/foray/foray-font/src/java/org/foray/font/FontConfig.java 2007-11-10 03:20:22 UTC (rev 10277)
@@ -55,6 +55,7 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.List;
import javax.xml.parsers.ParserConfigurationException;
@@ -106,7 +107,7 @@
private int successCount = 0;
/** List of the font files to be tested. */
- private ArrayList<FontConfigFontFile> fontFiles
+ private List<FontConfigFontFile> fontFiles
= new ArrayList<FontConfigFontFile>();
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-11-10 15:20:32
|
Revision: 10278
http://foray.svn.sourceforge.net/foray/?rev=10278&view=rev
Author: victormote
Date: 2007-11-10 07:20:35 -0800 (Sat, 10 Nov 2007)
Log Message:
-----------
Suppress checkstyle for the cases where a specific implementation must be used.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
trunk/foray/foray-graphic/src/java/org/foray/graphic/ImageConsumerImpl.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-11-10 03:20:22 UTC (rev 10277)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/AreaTree.java 2007-11-10 15:20:35 UTC (rev 10278)
@@ -78,11 +78,14 @@
/** The list of markers in this document. */
private List<Marker> documentMarkers = new ArrayList<Marker>();
+ /* Checkstyle-IllegalType-Off: This class depends on certain
+ * capabilities of ArrayList that are not part of the List interface. */
/** The list of FOLinkage items for the nodes in the FOTree.
* Each {@link FONode} in the {@link FOTree} has a unique index, which
* indexes into this linkage map. */
private ArrayList<FOLinkage> linkageMap = new ArrayList<FOLinkage>(
AreaTree.INITIAL_LINKAGE_MAP_SIZE);
+ /* Checkstyle-IllegalType-On. */
/**
* An ordered list of all of the PageCollection objects that have been
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/ImageConsumerImpl.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/ImageConsumerImpl.java 2007-11-10 03:20:22 UTC (rev 10277)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/ImageConsumerImpl.java 2007-11-10 15:20:35 UTC (rev 10278)
@@ -58,8 +58,11 @@
/** The hints for the image. */
private int hints = 0;
+ /* Checkstyle-IllegalType-Off: The Hashtable implementation is required
+ * by the superclass. */
/** The properties. */
private Hashtable<?, ?> properties;
+ /* Checkstyle-IllegalType-On. */
/** The AWT color-model instance. */
private ColorModel cm;
@@ -127,6 +130,7 @@
this.width = width;
this.height = height;
}
+
/**
* {@inheritDoc}
*/
@@ -134,6 +138,9 @@
// MessageHandler.errorln("setHints: " + hintflags);
this.hints = hintflags;
}
+
+ /* Checkstyle-IllegalType-Off: The Hashtable implementation is required
+ * by the superclass. */
/**
* {@inheritDoc}
*/
@@ -141,6 +148,7 @@
// MessageHandler.errorln("setProperties: " + props);
this.properties = props;
}
+ /* Checkstyle-IllegalType-On. */
/**
* {@inheritDoc}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-11-10 03:20:22 UTC (rev 10277)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2007-11-10 15:20:35 UTC (rev 10278)
@@ -128,11 +128,14 @@
/** The initial size at which the linkage map should be created. */
private static final short INITIAL_PROXY_MAP_SIZE = 200;
+ /* Checkstyle-IllegalType-Off: This class depends on certain
+ * capabilities of ArrayList that are not part of the List interface. */
/** The list of FONodePL items for the nodes in the FOTree.
* Each {@link FoNode} in the {@link FOTree} has a unique index, which
* indexes into this proxy map. */
private ArrayList<FONodePL> proxyMap = new ArrayList<FONodePL>(
PioneerLS.INITIAL_PROXY_MAP_SIZE);
+ /* Checkstyle-IllegalType-On. */
/** The line-breaker to be used by this layout system. */
private EagerLineBreaker currentLineBreaker;
Modified: trunk/foray/scripts/checkstyle-config.xml
===================================================================
--- trunk/foray/scripts/checkstyle-config.xml 2007-11-10 03:20:22 UTC (rev 10277)
+++ trunk/foray/scripts/checkstyle-config.xml 2007-11-10 15:20:35 UTC (rev 10278)
@@ -16,8 +16,19 @@
<property name="file" value="${foray.sandbox}/scripts/checkstyle-suppressions.xml"/>
</module>
+ <!-- Allow otherwise Illegal Types to be used in certain circumstances. -->
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="Checkstyle-IllegalType-Off"/>
+ <property name="onCommentFormat" value="Checkstyle-IllegalType-On"/>
+ <property name="checkFormat" value="IllegalType"/>
+ </module>
+
<module name="TreeWalker">
+ <!-- Activate FileContentsHolder so that comments are visible to Checkstyle
+ and can be used to suppress warnings in allowed cases. -->
+ <module name="FileContentsHolder"/>
+
<!-- Skip this one. -->
<!--<module name="AbstractClassName"/>-->
<module name="ConstantName"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2007-11-10 15:30:39
|
Revision: 10279
http://foray.svn.sourceforge.net/foray/?rev=10279&view=rev
Author: victormote
Date: 2007-11-10 07:30:43 -0800 (Sat, 10 Nov 2007)
Log Message:
-----------
Return the list itself instead of an enumeration of it. The iterator will be created automatically.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/ClassService.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/ClassService.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ClassService.java 2007-11-10 15:20:35 UTC (rev 10278)
+++ trunk/foray/foray-common/src/java/org/foray/common/ClassService.java 2007-11-10 15:30:43 UTC (rev 10279)
@@ -35,6 +35,7 @@
import java.net.URL;
import java.util.Enumeration;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Vector;
@@ -47,8 +48,8 @@
public final class ClassService {
/** Map of the services. */
- private static Map<String, Vector<String>> providerMap
- = new HashMap<String, Vector<String>>();
+ private static Map<String, List<String>> providerMap
+ = new HashMap<String, List<String>>();
/**
* Private Constructor. This is a utility class and should never be
@@ -60,20 +61,20 @@
* Provides an enumeration of the services in the class path.
* @param cls The class whose class loader should be used to find the
* services, or null if the system class loader should be used.
- * @return An enumeration of the services in the class path.
+ * @return A List of the services in the class path.
*/
- public static synchronized Enumeration<?> providers(final Class<?> cls) {
+ public static synchronized List<String> providers(final Class<?> cls) {
ClassLoader cl = cls.getClassLoader();
// null if loaded by bootstrap class loader
if (cl == null) {
- cl = ClassLoader.getSystemClassLoader();
+ cl = ClassLoader.getSystemClassLoader();
}
final String serviceFile = "META-INF/services/" + cls.getName();
- Vector<String> v = ClassService.providerMap.get(serviceFile);
+ List<String> v = ClassService.providerMap.get(serviceFile);
if (v != null) {
- return v.elements();
+ return v;
}
v = new Vector<String>();
@@ -83,7 +84,7 @@
try {
e = cl.getResources(serviceFile);
} catch (final IOException ioe) {
- return v.elements();
+ return v;
}
while (e.hasMoreElements()) {
@@ -127,6 +128,7 @@
}
}
- return v.elements();
+ return v;
}
+
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2007-11-10 15:20:35 UTC (rev 10278)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2007-11-10 15:30:43 UTC (rev 10279)
@@ -44,8 +44,8 @@
import org.apache.commons.logging.Log;
import java.net.URL;
-import java.util.Enumeration;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
@@ -148,16 +148,14 @@
this.namespaceAxsl = namespaceAxsl;
// Register custom embedded Namespaces from available services
- final Enumeration<?> providers =
- ClassService.providers(org.foray.fotree.Namespace.class);
+ final List<String> providers = ClassService.providers(
+ org.foray.fotree.Namespace.class);
if (providers != null) {
- while (providers.hasMoreElements()) {
- final String str = (String) providers.nextElement();
+ for (String str : providers) {
try {
final Namespace ns = createNonstandardNamespace(str);
registerNamespace(ns);
} catch (final IllegalArgumentException e) { }
-
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2008-02-02 18:22:21
|
Revision: 10329
http://foray.svn.sourceforge.net/foray/?rev=10329&view=rev
Author: victormote
Date: 2008-02-02 10:22:25 -0800 (Sat, 02 Feb 2008)
Log Message:
-----------
Conform to axsl changes removing a dependency in Font on Common.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java
trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2008-02-02 17:16:43 UTC (rev 10328)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2008-02-02 18:22:25 UTC (rev 10329)
@@ -43,6 +43,7 @@
import org.axsl.fo.fo.Block;
import org.axsl.fo.fo.prop.IdPa;
import org.axsl.fo.fo.prop.WritingModePa;
+import org.axsl.font.Font;
import org.axsl.galley.BackgroundArea;
import java.awt.geom.Rectangle2D;
@@ -1038,4 +1039,16 @@
*/
public abstract int traitPaddingAfter();
+ /**
+ * Returns the {@link Font.WritingMode} associated with this Area.
+ * @return The writing mode (vertical or horizontal) that is associated with this Area.
+ */
+ public Font.WritingMode getFontWritingMode() {
+ final AbsoluteAxis axis = this.getWritingMode().getIpAxis();
+ if (axis == AbsoluteAxis.VERTICAL) {
+ return Font.WritingMode.VERTICAL;
+ }
+ return Font.WritingMode.HORIZONTAL;
+ }
+
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2008-02-02 17:16:43 UTC (rev 10328)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2008-02-02 18:22:25 UTC (rev 10329)
@@ -31,7 +31,6 @@
import org.foray.common.OrderedTreeNode;
import org.axsl.area.AreaTreeException;
-import org.axsl.common.value.AbsoluteAxis;
import org.axsl.common.value.Baseline;
import org.axsl.common.value.Conditionality;
import org.axsl.common.value.LineStackingStrategy;
@@ -727,8 +726,7 @@
* alignment-point.
*/
public int alignmentPointOffset() {
- final AbsoluteAxis axis = this.getWritingMode().getAbsoluteAxis(
- RelativeAxis.INLINE_PROGRESSION);
+ final Font.WritingMode axis = this.getFontWritingMode();
/* TODO: The following line is commented out because it relied on logic
* that is no longer valid, that is, the idea that dominant-baseline
* could be set on a line or any other block or reference area. This
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2008-02-02 17:16:43 UTC (rev 10328)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2008-02-02 18:22:25 UTC (rev 10329)
@@ -30,7 +30,6 @@
import org.foray.font.charset.CharSet;
import org.foray.font.format.Kerning;
-import org.axsl.common.value.AbsoluteAxis;
import org.axsl.common.value.Baseline;
import org.axsl.common.value.Iso15924;
import org.axsl.font.Font;
@@ -375,7 +374,7 @@
/**
* {@inheritDoc}
*/
- public int baselineOffset(final AbsoluteAxis writingMode,
+ public int baselineOffset(final Font.WritingMode writingMode,
final Baseline baselineType, final int fontSize) {
final int baseline = extractBaseline(writingMode, baselineType,
fontSize);
@@ -388,30 +387,30 @@
/**
* Returns the font's explicit definition of the baseline, if possible.
* @param writingMode Same as for
- * {@link #baselineOffset(AbsoluteAxis, Baseline, int)}.
+ * {@link #baselineOffset(Font.WritingMode, Baseline, int)}.
* @param baselineType Same as for
- * {@link #baselineOffset(AbsoluteAxis, Baseline, int)}.
+ * {@link #baselineOffset(Font.WritingMode, Baseline, int)}.
* @param fontSize Same as for
- * {@link #baselineOffset(AbsoluteAxis, Baseline, int)}.
+ * {@link #baselineOffset(Font.WritingMode, Baseline, int)}.
* @return The extracted Baseline, as described for
- * {@link #baselineOffset(AbsoluteAxis, Baseline, int)}, if it exists.
+ * {@link #baselineOffset(Font.WritingMode, Baseline, int)}, if it exists.
* Otherwise, returns {@link Integer#MIN_VALUE}.
*/
- public abstract int extractBaseline(AbsoluteAxis writingMode,
+ public abstract int extractBaseline(Font.WritingMode writingMode,
Baseline baselineType, int fontSize);
/**
* Provides reasonable estimates of the various baseline values for the
* font, based on other font metrics.
* @param writingMode Same as for
- * {@link #baselineOffset(AbsoluteAxis, Baseline, int)}.
+ * {@link #baselineOffset(Font.WritingMode, Baseline, int)}.
* @param baselineType Same as for
- * {@link #baselineOffset(AbsoluteAxis, Baseline, int)}.
+ * {@link #baselineOffset(Font.WritingMode, Baseline, int)}.
* @param fontSize Same as for
- * {@link #baselineOffset(AbsoluteAxis, Baseline, int)}.
+ * {@link #baselineOffset(Font.WritingMode, Baseline, int)}.
* @return The estimated value of the baseline.
*/
- public int estimateBaseline(final AbsoluteAxis writingMode,
+ public int estimateBaseline(final Font.WritingMode writingMode,
final Baseline baselineType, final int fontSize) {
if (baselineType == Baseline.ALPHABETIC) {
return fontSize + this.getDescender(fontSize);
Modified: trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java 2008-02-02 17:16:43 UTC (rev 10328)
+++ trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java 2008-02-02 18:22:25 UTC (rev 10329)
@@ -35,7 +35,6 @@
import org.foray.font.format.Panose;
import org.foray.ps.encode.Encoding;
-import org.axsl.common.value.AbsoluteAxis;
import org.axsl.common.value.Baseline;
import org.axsl.font.Font;
@@ -396,7 +395,7 @@
/**
* {@inheritDoc}
*/
- public int extractBaseline(final AbsoluteAxis writingMode,
+ public int extractBaseline(final Font.WritingMode writingMode,
final Baseline baselineType, final int fontSize) {
return Integer.MIN_VALUE;
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2008-02-02 17:16:43 UTC (rev 10328)
+++ trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2008-02-02 18:22:25 UTC (rev 10329)
@@ -34,7 +34,6 @@
import org.foray.font.format.FontFileReader;
import org.foray.font.format.Kerning;
-import org.axsl.common.value.AbsoluteAxis;
import org.axsl.common.value.Baseline;
import org.axsl.font.FontException;
@@ -531,7 +530,7 @@
/**
* {@inheritDoc}
*/
- public int extractBaseline(final AbsoluteAxis writingMode,
+ public int extractBaseline(final org.axsl.font.Font.WritingMode writingMode,
final Baseline baselineType, final int fontSize) {
return Integer.MIN_VALUE;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2008-02-02 21:25:21
|
Revision: 10330
http://foray.svn.sourceforge.net/foray/?rev=10330&view=rev
Author: victormote
Date: 2008-02-02 13:25:24 -0800 (Sat, 02 Feb 2008)
Log Message:
-----------
Conform to axsl changes creating a font-oriented enumeration of baseline types.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java
trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2008-02-02 18:22:25 UTC (rev 10329)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2008-02-02 21:25:24 UTC (rev 10330)
@@ -31,7 +31,6 @@
import org.foray.common.OrderedTreeNode;
import org.axsl.area.AreaTreeException;
-import org.axsl.common.value.Baseline;
import org.axsl.common.value.Conditionality;
import org.axsl.common.value.LineStackingStrategy;
import org.axsl.common.value.RelativeAxis;
@@ -732,7 +731,7 @@
* could be set on a line or any other block or reference area. This
* whole issue needs to be revisited. */
// final Baseline baseline = this.traitDominantBaseline();
- final Baseline baseline = Baseline.ALPHABETIC;
+ final Font.Baseline baseline = Font.Baseline.ALPHABETIC;
final Font font = this.getPrimaryFont().getFont();
return font.baselineOffset(axis, baseline, this.traitFontSize());
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2008-02-02 18:22:25 UTC (rev 10329)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2008-02-02 21:25:24 UTC (rev 10330)
@@ -30,7 +30,6 @@
import org.foray.font.charset.CharSet;
import org.foray.font.format.Kerning;
-import org.axsl.common.value.Baseline;
import org.axsl.common.value.Iso15924;
import org.axsl.font.Font;
@@ -411,41 +410,36 @@
* @return The estimated value of the baseline.
*/
public int estimateBaseline(final Font.WritingMode writingMode,
- final Baseline baselineType, final int fontSize) {
- if (baselineType == Baseline.ALPHABETIC) {
+ final Font.Baseline baselineType, final int fontSize) {
+ switch(baselineType) {
+ case ALPHABETIC: {
return fontSize + this.getDescender(fontSize);
}
- if (baselineType == Baseline.IDEOGRAPHIC) {
- return fontSize;
+ case MATH: {
+ /* For now, estimate this as the middle. */
+ return fontSize / 2;
}
- if (baselineType == Baseline.HANGING) {
+ case HANGING: {
return Math.round(fontSize
* FOrayFont.DEFAULT_HANGING_BASELINE_POSITION);
}
- if (baselineType == Baseline.MATHEMATICAL) {
- /* For now, this is the same as Alphabetic. */
- return fontSize + this.getDescender(fontSize);
+ case IDEO_BOTTOM_LEFT: {
+ /* TODO: This needs to comply with the Note under "text-after-edge"
+ * at Section 7.14 of XSL-FO 1.1. */
+ return fontSize;
}
- if (baselineType == Baseline.CENTRAL) {
- return fontSize / 2;
- }
- if (baselineType == Baseline.MIDDLE) {
- /* First get the Alphabetic baseline. */
- int baseline = baselineOffset(writingMode,
- Baseline.ALPHABETIC, fontSize);
- baseline -= this.getXHeight(fontSize) / 2;
- return baseline;
- }
- if (baselineType == Baseline.TEXT_BEFORE_EDGE) {
+ case IDEO_TOP_RIGHT: {
/* TODO: This needs to comply with the Note under "text-before-edge"
- * at Section 7.13 of XSL-FO 1.0. */
+ * at Section 7.14 of XSL-FO 1.1. */
return 0;
}
- if (baselineType == Baseline.TEXT_AFTER_EDGE) {
- /* TODO: This needs to comply with the Note under "text-after-edge"
- * at Section 7.13 of XSL-FO 1.0. */
+ case ICF_BOTTOM_LEFT: {
return fontSize;
}
+ case ICF_TOP_RIGHT: {
+ return - this.getAscender(fontSize);
+ }
+ }
return 0;
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java 2008-02-02 18:22:25 UTC (rev 10329)
+++ trunk/foray/foray-font/src/java/org/foray/font/FreeStandingFont.java 2008-02-02 21:25:24 UTC (rev 10330)
@@ -35,7 +35,6 @@
import org.foray.font.format.Panose;
import org.foray.ps.encode.Encoding;
-import org.axsl.common.value.Baseline;
import org.axsl.font.Font;
import java.io.IOException;
Modified: trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2008-02-02 18:22:25 UTC (rev 10329)
+++ trunk/foray/foray-font/src/java/org/foray/font/SystemFont.java 2008-02-02 21:25:24 UTC (rev 10330)
@@ -34,7 +34,6 @@
import org.foray.font.format.FontFileReader;
import org.foray.font.format.Kerning;
-import org.axsl.common.value.Baseline;
import org.axsl.font.FontException;
import java.awt.Font;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2008-02-02 18:22:25 UTC (rev 10329)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2008-02-02 21:25:24 UTC (rev 10330)
@@ -2640,7 +2640,19 @@
}
final Font font = fontUse.getFont();
final Iso15924 script = this.traitScript(context);
- return font.baseline(script);
+ final Font.Baseline fontBaseline = font.baseline(script);
+ switch (fontBaseline) {
+ case ALPHABETIC: return Baseline.ALPHABETIC;
+ case MATH: return Baseline.MATHEMATICAL;
+ case HANGING: return Baseline.HANGING;
+ case IDEO_BOTTOM_LEFT: return Baseline.TEXT_AFTER_EDGE;
+ case IDEO_TOP_RIGHT: return Baseline.TEXT_BEFORE_EDGE;
+ case ICF_BOTTOM_LEFT: return Baseline.IDEOGRAPHIC;
+ /* TODO: There does not seem to be a good match between the font baselines provided and the
+ * XSL-FO baseline for ICF_TOP_RIGHT. */
+ case ICF_TOP_RIGHT: return Baseline.TEXT_BEFORE_EDGE;
+ }
+ return Baseline.ALPHABETIC;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2008-02-03 21:33:21
|
Revision: 10331
http://foray.svn.sourceforge.net/foray/?rev=10331&view=rev
Author: victormote
Date: 2008-02-03 13:32:56 -0800 (Sun, 03 Feb 2008)
Log Message:
-----------
Conform to axsl change of the parameter from an ISO script to an OpenType script.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
Added Paths:
-----------
trunk/foray/foray-common/src/java/org/foray/common/FontUtil.java
Added: trunk/foray/foray-common/src/java/org/foray/common/FontUtil.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/FontUtil.java (rev 0)
+++ trunk/foray/foray-common/src/java/org/foray/common/FontUtil.java 2008-02-03 21:32:56 UTC (rev 10331)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2008 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.common;
+
+import org.axsl.common.value.Iso15924;
+
+/**
+ * Utility methods related to fonts.
+ */
+public final class FontUtil {
+
+ /**
+ * Private constructor. This is a utility class and should never be instantiated.
+ */
+ private FontUtil() { }
+
+ /**
+ * Converts an {@link Iso15924} script instance into its OpenType script equivalent.
+ * @param script The ISO 15924 script for which the OpenType equivalent is needed.
+ * @return The OpenType equivalent.
+ */
+ public static String getOpenTypeScript(final Iso15924 script) {
+ /* TODO: This is probably not correct. */
+ return script.getAlphaCode().toLowerCase();
+ }
+
+}
Property changes on: trunk/foray/foray-common/src/java/org/foray/common/FontUtil.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2008-02-02 21:25:24 UTC (rev 10330)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFont.java 2008-02-03 21:32:56 UTC (rev 10331)
@@ -30,7 +30,6 @@
import org.foray.font.charset.CharSet;
import org.foray.font.format.Kerning;
-import org.axsl.common.value.Iso15924;
import org.axsl.font.Font;
import org.apache.commons.logging.Log;
@@ -446,7 +445,7 @@
/**
* {@inheritDoc}
*/
- public Baseline baseline(final Iso15924 script) {
+ public Baseline baseline(final String script) {
/* TODO: Fix this. */
return Baseline.ALPHABETIC;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2008-02-02 21:25:24 UTC (rev 10330)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2008-02-03 21:32:56 UTC (rev 10331)
@@ -29,6 +29,7 @@
package org.foray.fotree;
import org.foray.common.AbstractOrderedTreeNode;
+import org.foray.common.FontUtil;
import org.foray.common.OrderedTreeNode;
import org.foray.common.UnicodeChar;
import org.foray.common.WKConstants;
@@ -2640,7 +2641,8 @@
}
final Font font = fontUse.getFont();
final Iso15924 script = this.traitScript(context);
- final Font.Baseline fontBaseline = font.baseline(script);
+ final String opentypeScript = FontUtil.getOpenTypeScript(script);
+ final Font.Baseline fontBaseline = font.baseline(opentypeScript);
switch (fontBaseline) {
case ALPHABETIC: return Baseline.ALPHABETIC;
case MATH: return Baseline.MATHEMATICAL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2008-02-23 16:03:52
|
Revision: 10338
http://foray.svn.sourceforge.net/foray/?rev=10338&view=rev
Author: victormote
Date: 2008-02-23 08:03:45 -0800 (Sat, 23 Feb 2008)
Log Message:
-----------
Stub in a test for vertical-align and related.
Modified Paths:
--------------
trunk/foray/foray-app/src/javatest/org/foray/app/area/AbstractAreaTreeTest.java
Added Paths:
-----------
trunk/foray/foray-app/src/javatest/org/foray/app/area/TestVertical.java
trunk/foray/resource/test/fo/vertical-001.fo
Modified: trunk/foray/foray-app/src/javatest/org/foray/app/area/AbstractAreaTreeTest.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/area/AbstractAreaTreeTest.java 2008-02-22 17:49:14 UTC (rev 10337)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/area/AbstractAreaTreeTest.java 2008-02-23 16:03:45 UTC (rev 10338)
@@ -44,7 +44,7 @@
import junit.framework.TestCase;
/**
- * Abstract superclass for test classes testing FO Tree content.
+ * Abstract superclass for test classes testing Area Tree content.
*/
public abstract class AbstractAreaTreeTest extends TestCase {
Added: trunk/foray/foray-app/src/javatest/org/foray/app/area/TestVertical.java
===================================================================
--- trunk/foray/foray-app/src/javatest/org/foray/app/area/TestVertical.java (rev 0)
+++ trunk/foray/foray-app/src/javatest/org/foray/app/area/TestVertical.java 2008-02-23 16:03:45 UTC (rev 10338)
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2007 The FOray Project.
+ * http://www.foray.org
+ *
+ * Licensed 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This work is in part derived from the following work(s), used with the
+ * permission of the licensor:
+ * Apache FOP, licensed by the Apache Software Foundation
+ *
+ */
+
+/*
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ * $LastChangedBy$
+ */
+
+package org.foray.app.area;
+
+import org.foray.area.AreaNode;
+import org.foray.area.AreaTree;
+import org.foray.area.InlineArea;
+import org.foray.area.LineArea;
+import org.foray.area.NormalBlockArea;
+import org.foray.area.NormalFlowRA;
+import org.foray.core.FOrayException;
+
+/**
+ * Tests of various vertical positioning concepts at the Area Tree level.
+ */
+public class TestVertical extends AbstractAreaTreeTest {
+
+ /**
+ * Test of fo/vertical-001.fo.
+ * @throws FOrayException For errors creating the FO Tree or Area Tree.
+ */
+ public void testVertical001() throws FOrayException {
+ final AreaTreeCreator creator = AreaTreeCreator.getInstance();
+ final AreaTree areaTree = creator.buildAreaTree("fo/vertical-001.fo");
+ final NormalFlowRA firstNormalFlowArea = this.getFirstNormalFlowArea(
+ areaTree);
+
+ /* The block area. */
+ AreaNode node = firstNormalFlowArea.getChildAt(0);
+ assertTrue(node instanceof NormalBlockArea);
+ final NormalBlockArea blockArea = (NormalBlockArea) node;
+
+ /* The first child of the block area is a line-area. */
+ node = blockArea.getChildAt(0);
+ assertTrue(node instanceof LineArea);
+ final LineArea lineArea = (LineArea) node;
+ final int lineY = lineArea.alignmentPointY();
+
+ /* The second child of the line area is an inline-area. */
+ node = lineArea.getChildAt(1);
+ assertTrue(node instanceof InlineArea);
+ final InlineArea inlineArea = (InlineArea) node;
+ final int inlineY = inlineArea.baselineY();
+
+ final int expectedInlineY = lineY - 20;
+ assertEquals(expectedInlineY, inlineY);
+ }
+
+}
Property changes on: trunk/foray/foray-app/src/javatest/org/foray/app/area/TestVertical.java
___________________________________________________________________
Name: svn:keywords
+ "Author Id Rev Date URL"
Name: svn:eol-style
+ native
Added: trunk/foray/resource/test/fo/vertical-001.fo
===================================================================
--- trunk/foray/resource/test/fo/vertical-001.fo (rev 0)
+++ trunk/foray/resource/test/fo/vertical-001.fo 2008-02-23 16:03:45 UTC (rev 10338)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+This fo file contains one empty block nested inside another block and tests that
+the three resulting block areas exist and are positioned correctly.
+-->
+
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+<fo:layout-master-set>
+ <!-- layout for the first page -->
+ <fo:simple-page-master master-name="simple"
+ margin-top="1in"
+ margin-bottom="1in"
+ margin-left="1in"
+ margin-right="1in">
+ <fo:region-body/>
+ </fo:simple-page-master>
+</fo:layout-master-set>
+
+<fo:page-sequence master-reference="simple">
+<fo:flow flow-name="xsl-region-body">
+
+
+<fo:block font-family="Courier" font-size="12pt">At the end of this sentence is a footnote
+citation.<fo:inline font-size="60%" vertical-align="super">7</fo:inline></fo:block>
+
+
+
+</fo:flow>
+</fo:page-sequence>
+</fo:root>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2008-02-23 16:14:28
|
Revision: 10339
http://foray.svn.sourceforge.net/foray/?rev=10339&view=rev
Author: victormote
Date: 2008-02-23 08:14:33 -0800 (Sat, 23 Feb 2008)
Log Message:
-----------
Upgrade JUnit dependency from 3.8.1 to 4.4.
Modified Paths:
--------------
trunk/foray/foray-app/.classpath
trunk/foray/foray-areatree/.classpath
trunk/foray/foray-common/.classpath
trunk/foray/foray-font/.classpath
trunk/foray/foray-fotree/.classpath
trunk/foray/foray-graphic/.classpath
trunk/foray/foray-hyphen/.classpath
trunk/foray/foray-ps/.classpath
trunk/foray/foray-render/.classpath
Added Paths:
-----------
trunk/foray/lib-build/junit/junit-4.4-src.jar
trunk/foray/lib-build/junit/junit-4.4.jar
Removed Paths:
-------------
trunk/foray/lib-build/junit/junit.jar
Modified: trunk/foray/foray-app/.classpath
===================================================================
--- trunk/foray/foray-app/.classpath 2008-02-23 16:03:45 UTC (rev 10338)
+++ trunk/foray/foray-app/.classpath 2008-02-23 16:14:33 UTC (rev 10339)
@@ -28,7 +28,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/axslHyphen"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayHyphen"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayPS"/>
- <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-io-1.2.jar" sourcepath="/FOray Lib-Build/commons-io/commons-io-1.2-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/resolver.jar"/>
<classpathentry kind="lib" path="/FOray Lib/servlet-2.2.jar"/>
@@ -39,5 +38,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/FOraySpeech"/>
<classpathentry kind="lib" path="/FOray Lib/foray-hyphen-0.3-rsrc.jar"/>
<classpathentry kind="lib" path="/FOray Lib-Build/ant/ant.jar"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-areatree/.classpath
===================================================================
--- trunk/foray/foray-areatree/.classpath 2008-02-23 16:03:45 UTC (rev 10338)
+++ trunk/foray/foray-areatree/.classpath 2008-02-23 16:14:33 UTC (rev 10339)
@@ -11,8 +11,8 @@
<classpathentry kind="src" path="/axslCommon"/>
<classpathentry kind="src" path="/axslText"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslAreaTree"/>
- <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/svg-1.1.jar" sourcepath="/FOray Lib-Build/svg/svg-1.1-src.zip"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-common/.classpath
===================================================================
--- trunk/foray/foray-common/.classpath 2008-02-23 16:03:45 UTC (rev 10338)
+++ trunk/foray/foray-common/.classpath 2008-02-23 16:14:33 UTC (rev 10339)
@@ -6,6 +6,6 @@
<classpathentry kind="src" path="/axslCommon"/>
<classpathentry kind="lib" path="/FOray Lib/commons-io-1.2.jar" sourcepath="/FOray Lib-Build/commons-io/commons-io-1.2-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
- <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-font/.classpath
===================================================================
--- trunk/foray/foray-font/.classpath 2008-02-23 16:03:45 UTC (rev 10338)
+++ trunk/foray/foray-font/.classpath 2008-02-23 16:14:33 UTC (rev 10339)
@@ -9,11 +9,11 @@
<classpathentry kind="src" path="/axslPs"/>
<classpathentry kind="src" path="/axslCommon"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayPretty"/>
- <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-io-1.2.jar" sourcepath="/FOray Lib-Build/commons-io/commons-io-1.2-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/foray-font-0.3-rsrc.jar"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib-Build/ant/ant.jar"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-fotree/.classpath
===================================================================
--- trunk/foray/foray-fotree/.classpath 2008-02-23 16:03:45 UTC (rev 10338)
+++ trunk/foray/foray-fotree/.classpath 2008-02-23 16:14:33 UTC (rev 10339)
@@ -9,10 +9,10 @@
<classpathentry kind="src" path="/axslFoTree"/>
<classpathentry kind="src" path="/axslCommon"/>
<classpathentry kind="src" path="/axslText"/>
- <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/svg-1.1.jar" sourcepath="/FOray Lib-Build/svg/svg-1.1-src.zip"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslSpeech"/>
<classpathentry kind="lib" path="/FOray Lib/mathml-2.0.jar" sourcepath="/FOray Lib-Build/mathml/mathml-2.0-src.zip"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-graphic/.classpath
===================================================================
--- trunk/foray/foray-graphic/.classpath 2008-02-23 16:03:45 UTC (rev 10338)
+++ trunk/foray/foray-graphic/.classpath 2008-02-23 16:14:33 UTC (rev 10339)
@@ -6,7 +6,6 @@
<classpathentry kind="src" path="/FOrayCommon"/>
<classpathentry kind="src" path="/axslGraphic"/>
<classpathentry kind="src" path="/axslCommon"/>
- <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-io-1.2.jar" sourcepath="/FOray Lib-Build/commons-io/commons-io-1.2-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/svg-1.1.jar" sourcepath="/FOray Lib-Build/svg/svg-1.1-src.zip"/>
@@ -30,5 +29,6 @@
<classpathentry kind="lib" path="/FOray Lib/jeuclid-core-3.0.1.jar" sourcepath="/FOray Lib-Build/jeuclid/jeuclid-3.0.1-source.zip"/>
<classpathentry kind="lib" path="/FOray Lib/xmlgraphics-commons-1.2.jar" sourcepath="/FOray Lib-Build/xmlgraphics-commons/xmlgraphics-commons-1.2-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar" sourcepath="/FOray Lib-Build/xerces/Xerces-J-src.2.7.1.zip"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-hyphen/.classpath
===================================================================
--- trunk/foray/foray-hyphen/.classpath 2008-02-23 16:03:45 UTC (rev 10338)
+++ trunk/foray/foray-hyphen/.classpath 2008-02-23 16:14:33 UTC (rev 10339)
@@ -5,11 +5,11 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayCommon"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslHyphen"/>
- <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="lib" path="/FOray Lib/xercesImpl-2.7.1.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslCommon"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/icu4j_3_4_3.jar"/>
<classpathentry kind="lib" path="/FOray Lib-Build/ant/ant.jar"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-ps/.classpath
===================================================================
--- trunk/foray/foray-ps/.classpath 2008-02-23 16:03:45 UTC (rev 10338)
+++ trunk/foray/foray-ps/.classpath 2008-02-23 16:14:33 UTC (rev 10339)
@@ -6,7 +6,7 @@
<classpathentry kind="src" path="/FOrayCommon"/>
<classpathentry kind="src" path="/axslPs"/>
<classpathentry kind="src" path="/axslCommon"/>
- <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/foray/foray-render/.classpath
===================================================================
--- trunk/foray/foray-render/.classpath 2008-02-23 16:03:45 UTC (rev 10338)
+++ trunk/foray/foray-render/.classpath 2008-02-23 16:14:33 UTC (rev 10339)
@@ -14,8 +14,8 @@
<classpathentry kind="src" path="/axslPdf"/>
<classpathentry combineaccessrules="false" kind="src" path="/FOrayPS"/>
<classpathentry combineaccessrules="false" kind="src" path="/axslOutput"/>
- <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit.jar"/>
<classpathentry kind="lib" path="/FOray Lib/commons-logging-1.1.jar" sourcepath="/FOray Lib-Build/commons-logging/commons-logging-1.1-src.zip"/>
<classpathentry kind="lib" path="/FOray Lib/svg-1.1.jar" sourcepath="/FOray Lib-Build/svg/svg-1.1-src.zip"/>
+ <classpathentry kind="lib" path="/FOray Lib-Build/junit/junit-4.4.jar" sourcepath="/FOray Lib-Build/junit/junit-4.4-src.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Added: trunk/foray/lib-build/junit/junit-4.4-src.jar
===================================================================
(Binary files differ)
Property changes on: trunk/foray/lib-build/junit/junit-4.4-src.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/foray/lib-build/junit/junit-4.4.jar
===================================================================
(Binary files differ)
Property changes on: trunk/foray/lib-build/junit/junit-4.4.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/foray/lib-build/junit/junit.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|