[FOray-commit] SF.net SVN: foray: [8707] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-02-15 01:38:01
|
Revision: 8707
http://svn.sourceforge.net/foray/?rev=8707&view=rev
Author: victormote
Date: 2007-02-14 17:37:51 -0800 (Wed, 14 Feb 2007)
Log Message:
-----------
Javadoc improvements.
Modified Paths:
--------------
trunk/foray/doc/web/app/using/release.html
trunk/foray/foray-output/src/java/org/foray/output/Converter.java
trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java
trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java
trunk/foray/scripts/checkstyle-suppressions.xml
Modified: trunk/foray/doc/web/app/using/release.html
===================================================================
--- trunk/foray/doc/web/app/using/release.html 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/doc/web/app/using/release.html 2007-02-15 01:37:51 UTC (rev 8707)
@@ -51,7 +51,7 @@
its methods have been replaced by standar Java 5.0 String and Character
methods.</li>
<li>Completion of javadoc API documentation for the FOrayGraphic,
- FOrayHyphen-R, FOrayApp, and FOrayCore modules.</li>
+ FOrayHyphen-R, FOrayOutput, FOrayApp, and FOrayCore modules.</li>
<li>The FOrayGraphicServer constructor no longer requires the name of the
parser class as a parameter.</li>
</ul>
Modified: trunk/foray/foray-output/src/java/org/foray/output/Converter.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/Converter.java 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/foray-output/src/java/org/foray/output/Converter.java 2007-02-15 01:37:51 UTC (rev 8707)
@@ -37,7 +37,9 @@
public abstract class Converter extends OutputTarget {
/**
- *
+ * Constructor.
+ * @param logger The logger.
+ * @param outputConfig The output configuration.
*/
public Converter(final Log logger, final OutputConfig outputConfig) {
super(logger, outputConfig);
Modified: trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java 2007-02-15 01:37:51 UTC (rev 8707)
@@ -53,12 +53,13 @@
*/
public class MIFConverter extends Converter {
+ /** The height of the page, in millipoints. */
private int pageHeight;
+
+ /** The width of the page, in millipoints. */
private int pageWidth;
- /**
- * the MIF Document being created
- */
+ /** The MIF Document being created. */
private MifBook mifDoc;
@@ -66,36 +67,66 @@
// private boolean inTable = false;
/**
- * create the MIF renderer
+ * Create the MIF renderer.
+ * @param logger The logger.
+ * @param outputConfig The output configuration.
*/
public MIFConverter(final Log logger, final OutputConfig outputConfig) {
super(logger, outputConfig);
}
+ /**
+ * Converts an FOTree table to a MIF Table.
+ * @param table The FOtree table to be converted.
+ */
public void convert(final Table table) {
this.mifDoc.createTable();
// this.inTable = true;
}
+ /**
+ * Converts an FOTree table-body to a MIF Table Body.
+ * @param tableBody The FOtree table-body to be converted.
+ */
public void convert(final TableBody tableBody) {
this.mifDoc.setCurrent("fo:table-body");
}
+ /**
+ * Converts an FOTree table-row to a MIF Table Row.
+ * @param row The FOtree table-row to be converted.
+ */
public void convert(final TableRow row) {
this.mifDoc.startRow();
}
+ /**
+ * Converts an FOTree table-column to a MIF Table Column.
+ * @param column The FOtree table-column to be converted.
+ */
public void convert(final TableColumn column) {
// int colWidth = column.getComputedColumnWidth();
// this.mifDoc.setColumnProp(colWidth);
}
+ /**
+ * Converts an FOTree table-cell to a MIF Table Cell.
+ * @param cell The FOtree table-cell to be converted.
+ */
public void render(final TableCell cell) {
final int rowSpan = cell.traitNumberRowsSpanned();
final int colSpan = cell.traitNumberColumnsSpanned();
this.mifDoc.startCell(rowSpan, colSpan);
}
+ /**
+ * Creates a filled rectangle in the MIF output.
+ * @param x The x coordinate of one corner of the rectangle, in millipoints.
+ * @param y The y coordinate of one corner of the rectangle, in millipoints.
+ * @param w The width of the rectangle, in millipoints.
+ * @param h The height of the rectangle, in millipoints.
+ * @param col The color of the rectangle.
+ */
protected void addFilledRect(final int x, final int y, final int w,
final int h, final Color col) {
}
@@ -150,7 +181,8 @@
// }
/**
- * render the given block area
+ * Render a given FOTree block.
+ * @param block The FOtree block to be rendered.
*/
public void render(final Block block) {
final FOContext context = null;
@@ -169,7 +201,7 @@
// }
/**
- * render the given page
+ * Render a page.
*/
public void renderPage() {
@@ -207,9 +239,8 @@
}
/**
- Default start renderer method. This would
- normally be overridden.
- */
+ * {@inheritDoc}
+ */
public void startOutput() throws IOException {
this.mifDoc = new MifBook(getLogger());
getLogger().info("rendering areas to MIF");
@@ -217,9 +248,8 @@
}
/**
- Default stop renderer method. This would
- normally be overridden.
- */
+ * {@inheritDoc}
+ */
public void stopOutput() throws IOException {
getLogger().info("writing out MIF");
this.mifDoc.output(this.getOutputStream());
@@ -233,7 +263,4 @@
return new int[] {FontConsumer.FONT_SOURCE_FREE_STANDING};
}
- public void resetTextCursor() {
- }
-
}
Modified: trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/foray-output/src/java/org/foray/output/OutputConfig.java 2007-02-15 01:37:51 UTC (rev 8707)
@@ -46,16 +46,23 @@
*/
public class OutputConfig extends Configuration {
+ /**
+ * Constructor.
+ * @param logger The logger.
+ */
public OutputConfig(final Log logger) {
super(logger);
}
+ /**
+ * {@inheritDoc}
+ */
public String getName() {
return "FOray Renderer Configuration";
}
/**
- * Sets the default values that should be used unless overridden later.
+ * {@inheritDoc}
*/
protected void setDefaults() {
put("at-sparse", Boolean.FALSE, PRECEDENCE_DEFAULT);
@@ -75,6 +82,9 @@
put("txt-encoding", "UTF-8", PRECEDENCE_DEFAULT);
}
+ /**
+ * {@inheritDoc}
+ */
public boolean parseOption(final String key, final String value,
final int precedenceValue) {
if (key.equals("at-sparse")
@@ -104,16 +114,25 @@
return false;
}
+ /**
+ * Indicates whether AT (Area Tree) output should be sparse.
+ * @return True iff AT output should be sparse.
+ */
public boolean optionATSparse() {
// Never null.
return getBooleanValue("at-sparse").booleanValue();
}
+ /**
+ * Returns the list of PDF filters that this document should use.
+ * @return The list of PDF filters that this document should use.
+ */
public List optionPDFFilters() {
return getListValue("pdf-filters");
}
/**
+ * Return the pdf-owner-password value set by the user.
* @return The pdf-owner-password value set by the user, or null if none
* was set.
*/
@@ -122,6 +141,7 @@
}
/**
+ * Return the pdf-user-password valud set by the user.
* @return The pdf-user-password value set by the user, or null if none
* was set.
*/
@@ -129,31 +149,55 @@
return getStringValue("pdf-user-password");
}
+ /**
+ * Returns the PDF print permission set by the user.
+ * @return True iff the user has permission to print the PDF.
+ */
public boolean optionPDFUserPrint() {
// Never null.
return getBooleanValue("pdf-user-print").booleanValue();
}
+ /**
+ * Returns the PDF copy permission set by the user.
+ * @return True iff the user has permission to copy portions of the PDF.
+ */
public boolean optionPDFUserCopy() {
// Never null.
return getBooleanValue("pdf-user-copy").booleanValue();
}
+ /**
+ * Returns the PDF modify permission set by the user.
+ * @return True iff the user has permission to modify the PDF.
+ */
public boolean optionPDFUserModify() {
// Never null.
return getBooleanValue("pdf-user-modify").booleanValue();
}
+ /**
+ * Returns the PDF annotate permission set by the user.
+ * @return True iff the user has permission to add annotations to the PDF.
+ */
public boolean optionPDFUserAnnotate() {
// Never null.
return getBooleanValue("pdf-user-annotate").booleanValue();
}
+ /**
+ * Returns the encoding options set by the user for text output.
+ * @return The text output encoding.
+ */
public String optionTXTEncoding() {
// Never null.
return getStringValue("txt-encoding");
}
+ /**
+ * Returns the PDF version selected by the user for document output.
+ * @return The PDF version to be used for document output.
+ */
public String optionPDFVersion() {
return getStringValue("pdf-version");
}
Modified: trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java 2007-02-15 01:37:51 UTC (rev 8707)
@@ -39,30 +39,57 @@
*/
public abstract class OutputTarget implements org.axsl.output.OutputTarget {
+ /** The stream to which output should be written. */
private OutputStream outputStream;
+
+ /** The name of the application generating the output (used in document
+ * metadata). */
private String applicationName;
+
+ /** The short name of the application generating the output (used in
+ * document metadata). */
private String applicationNameShort;
+
+ /** The version of the application generating the output (used in document
+ * metadata). */
private String applicationVersion;
+
+ /** The short version of the URL of the developer organization creating the
+ * output (used in document metadata). */
private String developerURLShort;
+
+ /** Indicates whether SVG text should be stroked in the output document. */
private boolean strokeSVGText;
+
+ /** The logger. */
private Log logger;
+
+ /** The FontConsumer used by the document. */
private FontConsumer fontConsumer;
+ /** The output configuration options. */
private OutputConfig options;
/**
- *
+ * Constructor.
+ * @param logger The logger.
+ * @param outputConfig The output configuration.
*/
public OutputTarget(final Log logger, final OutputConfig outputConfig) {
this.logger = logger;
this.options = outputConfig;
}
+ /**
+ * Returns the logger.
+ * @return The logger.
+ */
public Log getLogger() {
return this.logger;
}
/**
+ * Returns the FontConsumer.
* @return The FontConsumer implementation which should be used by this
* Renderer.
*/
@@ -70,10 +97,17 @@
return this.fontConsumer;
}
+ /**
+ * {@inheritDoc}
+ */
public void setOutputStream(final OutputStream stream) {
this.outputStream = stream;
}
+ /**
+ * Returns the OutputStream.
+ * @return The OutputStream.
+ */
public OutputStream getOutputStream() {
return this.outputStream;
}
@@ -87,7 +121,8 @@
}
/**
- * @return The name of the application that is creating the output.
+ * Returns the name of the application creating the output.
+ * @return The name of the application creating the output.
*/
public String getApplicationName() {
return applicationName;
@@ -101,6 +136,7 @@
}
/**
+ * Returns the short name of the application creating the output.
* @return The "short" name of the application that is creating the
* output.
* For example, if the name of the application is "XYZ Document Processor",
@@ -118,6 +154,8 @@
}
/**
+ * Returna the current version of the application that is creating the
+ * output.
* @return The current version of the application that is creating the
* output.
*/
@@ -133,6 +171,7 @@
}
/**
+ * Returns a short version of the URL of the developer.
* @return The shortened version of the URL to the home-page of the
* developer. For example, if the URL is "http://www.xyz.com", return
* "www.xyz.com".
@@ -148,11 +187,15 @@
this.developerURLShort = developerURLShort;
}
+ /**
+ * {@inheritDoc}
+ */
public void setStrokeSVGText(final boolean stroke) {
this.strokeSVGText = stroke;
}
/**
+ * Indicates whether SVG text should be converted to strokes.
* @return True if SVG text should be converted to strokes instead of
* rendered as characters of a Font.
*/
@@ -161,13 +204,14 @@
}
/**
- * @param fontConsumer The fontConsumer to set.
+ * {@inheritDoc}
*/
public void setFontConsumer(final FontConsumer fontConsumer) {
this.fontConsumer = fontConsumer;
}
/**
+ * Returns the configuration options.
* @return Returns the options.
*/
public OutputConfig getOptions() {
Modified: trunk/foray/scripts/checkstyle-suppressions.xml
===================================================================
--- trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-14 04:53:26 UTC (rev 8706)
+++ trunk/foray/scripts/checkstyle-suppressions.xml 2007-02-15 01:37:51 UTC (rev 8707)
@@ -17,8 +17,6 @@
<suppress checks="Javadoc[MVS].*"
files="org.foray.mif.*"/>
<suppress checks="Javadoc[MVS].*"
- files="org.foray.output.*"/>
- <suppress checks="Javadoc[MVS].*"
files="org.foray.pdf.*"/>
<suppress checks="Javadoc[MVS].*"
files="org.foray.pioneer.*"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|