From 0fe37360cdbc369e89556ef85bf354f750e6bd1c Mon Sep 17 00:00:00 2001 From: William Victor Mote Date: Tue, 6 May 2003 07:46:05 +0000 Subject: [PATCH] Fix checkstyle problems. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196407 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/apps/LayoutHandler.java | 107 +++++++- .../org/apache/fop/apps/StructureHandler.java | 233 ++++++++++++++---- .../fop/fo/pagination/PageSequence.java | 8 + src/java/org/apache/fop/mif/MIFHandler.java | 95 ++++++- .../apache/fop/rtf/renderer/RTFHandler.java | 95 ++++++- 5 files changed, 477 insertions(+), 61 deletions(-) diff --git a/src/java/org/apache/fop/apps/LayoutHandler.java b/src/java/org/apache/fop/apps/LayoutHandler.java index ddc9fa82a..c28944cea 100644 --- a/src/java/org/apache/fop/apps/LayoutHandler.java +++ b/src/java/org/apache/fop/apps/LayoutHandler.java @@ -55,9 +55,6 @@ import java.io.IOException; import java.io.OutputStream; import java.util.List; -// Avalon -import org.apache.avalon.framework.logger.AbstractLogEnabled; - // SAX import org.xml.sax.SAXException; @@ -67,16 +64,11 @@ import org.apache.fop.area.AreaTreeModel; import org.apache.fop.area.StorePagesModel; import org.apache.fop.area.Title; import org.apache.fop.area.TreeExt; -import org.apache.fop.fo.pagination.LayoutMasterSet; import org.apache.fop.fo.pagination.PageSequence; import org.apache.fop.layout.FontInfo; import org.apache.fop.render.Renderer; -import org.apache.fop.apps.StructureHandler; import org.apache.fop.fo.flow.Block; import org.apache.fop.fo.flow.Flow; -import org.apache.fop.fo.pagination.PageSequenceMaster; -import org.apache.fop.fo.pagination.SimplePageMaster; -import org.apache.fop.apps.FOPException; import org.apache.fop.fo.flow.ExternalGraphic; import org.apache.fop.fo.flow.InstreamForeignObject; import org.apache.fop.fo.flow.Leader; @@ -282,6 +274,9 @@ public class LayoutHandler extends StructureHandler { pageSequence.format(areaTree); } + /** + * @see org.apache.fop.apps.StructureHandler#startFlow(Flow) + */ public void startFlow(Flow fl) { } @@ -303,101 +298,197 @@ public class LayoutHandler extends StructureHandler { public void endBlock(Block bl) { } + /** + * @see org.apache.fop.apps.StructureHandler#startTable(Table) + */ public void startTable(Table tbl) { } + /** + * @see org.apache.fop.apps.StructureHandler#endTable(Table) + */ public void endTable(Table tbl) { } + /** + * @see org.apache.fop.apps.StructureHandler#startHeader(TableBody) + */ public void startHeader(TableBody th) { } + /** + * @see org.apache.fop.apps.StructureHandler#endHeader(TableBody) + */ public void endHeader(TableBody th) { } + /** + * @see org.apache.fop.apps.StructureHandler#startFooter(TableBody) + */ public void startFooter(TableBody tf) { } + /** + * @see org.apache.fop.apps.StructureHandler#endFooter(TableBody) + */ public void endFooter(TableBody tf) { } + /** + * @see org.apache.fop.apps.StructureHandler#startBody(TableBody) + */ public void startBody(TableBody tb) { } + /** + * @see org.apache.fop.apps.StructureHandler#endBody(TableBody) + */ public void endBody(TableBody tb) { } + /** + * @see org.apache.fop.apps.StructureHandler#startRow(TableRow) + */ public void startRow(TableRow tr) { } + /** + * @see org.apache.fop.apps.StructureHandler#endRow(TableRow) + */ public void endRow(TableRow tr) { } + /** + * @see org.apache.fop.apps.StructureHandler#startCell(TableCell) + */ public void startCell(TableCell tc) { } + /** + * @see org.apache.fop.apps.StructureHandler#endCell(TableCell) + */ public void endCell(TableCell tc) { } // Lists + /** + * @see org.apache.fop.apps.StructureHandler#startList(ListBlock) + */ public void startList(ListBlock lb) { } + /** + * @see org.apache.fop.apps.StructureHandler#endList(ListBlock) + */ public void endList(ListBlock lb) { } + /** + * @see org.apache.fop.apps.StructureHandler#startListItem(ListItem) + */ public void startListItem(ListItem li) { } + /** + * @see org.apache.fop.apps.StructureHandler#endListItem(ListItem) + */ public void endListItem(ListItem li) { } + /** + * @see org.apache.fop.apps.StructureHandler#startListLabel() + */ public void startListLabel() { } + /** + * @see org.apache.fop.apps.StructureHandler#endListLabel() + */ public void endListLabel() { } + /** + * @see org.apache.fop.apps.StructureHandler#startListBody() + */ public void startListBody() { } + /** + * @see org.apache.fop.apps.StructureHandler#endListBody() + */ public void endListBody() { } // Static Regions + /** + * @see org.apache.fop.apps.StructureHandler#startStatic() + */ public void startStatic() { } + /** + * @see org.apache.fop.apps.StructureHandler#endStatic() + */ public void endStatic() { } + /** + * @see org.apache.fop.apps.StructureHandler#startMarkup() + */ public void startMarkup() { } + /** + * @see org.apache.fop.apps.StructureHandler#endMarkup() + */ public void endMarkup() { } + /** + * @see org.apache.fop.apps.StructureHandler#startLink() + */ public void startLink() { } + /** + * @see org.apache.fop.apps.StructureHandler#endLink() + */ public void endLink() { } + /** + * @see org.apache.fop.apps.StructureHandler#image(ExternalGraphic) + */ public void image(ExternalGraphic eg) { } + /** + * @see org.apache.fop.apps.StructureHandler#pageRef() + */ public void pageRef() { } + /** + * @see org.apache.fop.apps.StructureHandler#foreignObject(InstreamForeignObject) + */ public void foreignObject(InstreamForeignObject ifo) { } + /** + * @see org.apache.fop.apps.StructureHandler#footnote() + */ public void footnote() { } + /** + * @see org.apache.fop.apps.StructureHandler#leader(Leader) + */ public void leader(Leader l) { } + /** + * @see org.apache.fop.apps.StructureHandler#characters(char[], int, int) + */ public void characters(char data[], int start, int length) { } diff --git a/src/java/org/apache/fop/apps/StructureHandler.java b/src/java/org/apache/fop/apps/StructureHandler.java index 77667937c..274bb70e2 100644 --- a/src/java/org/apache/fop/apps/StructureHandler.java +++ b/src/java/org/apache/fop/apps/StructureHandler.java @@ -58,7 +58,6 @@ import java.util.HashSet; import org.apache.avalon.framework.logger.AbstractLogEnabled; // FOP -import org.apache.fop.fo.Title; import org.apache.fop.fo.flow.Block; import org.apache.fop.fo.flow.ExternalGraphic; import org.apache.fop.fo.flow.Flow; @@ -70,7 +69,6 @@ import org.apache.fop.fo.flow.Table; import org.apache.fop.fo.flow.TableBody; import org.apache.fop.fo.flow.TableCell; import org.apache.fop.fo.flow.TableRow; -import org.apache.fop.fo.pagination.LayoutMasterSet; import org.apache.fop.fo.pagination.PageSequence; import org.apache.fop.layout.FontInfo; @@ -81,7 +79,7 @@ import org.xml.sax.SAXException; * Sub-classes can then implement various methods to handle * the FO Tree when the SAX events occur. */ -abstract public class StructureHandler extends AbstractLogEnabled { +public abstract class StructureHandler extends AbstractLogEnabled { /** * The current set of id's in the FO tree. * This is used so we know if the FO tree contains duplicates. @@ -114,100 +112,237 @@ abstract public class StructureHandler extends AbstractLogEnabled { * This method is called to indicate the start of a new document run. * @throws SAXException In case of a problem */ - abstract public void startDocument() throws SAXException; + public abstract void startDocument() throws SAXException; /** * This method is called to indicate the end of a document run. * @throws SAXException In case of a problem */ - abstract public void endDocument() throws SAXException; + public abstract void endDocument() throws SAXException; - abstract public void startPageSequence(PageSequence pageSeq); + /** + * + * @param pageSeq PageSequence that is starting. + */ + public abstract void startPageSequence(PageSequence pageSeq); - abstract public void endPageSequence(PageSequence pageSeq) throws FOPException; + /** + * + * @param pageSeq PageSequence that is ending. + * @throws FOPException For errors encountered. + */ + public abstract void endPageSequence(PageSequence pageSeq) throws FOPException; - abstract public void startFlow(Flow fl); + /** + * + * @param fl Flow that is starting. + */ + public abstract void startFlow(Flow fl); - abstract public void endFlow(Flow fl); + /** + * + * @param fl Flow that is ending. + */ + public abstract void endFlow(Flow fl); - abstract public void startBlock(Block bl); + /** + * + * @param bl Block that is starting. + */ + public abstract void startBlock(Block bl); - abstract public void endBlock(Block bl); + /** + * + * @param bl Block that is ending. + */ + public abstract void endBlock(Block bl); // Tables - abstract public void startTable(Table tbl); + /** + * + * @param tbl Table that is starting. + */ + public abstract void startTable(Table tbl); - abstract public void endTable(Table tbl); + /** + * + * @param tbl Table that is ending. + */ + public abstract void endTable(Table tbl); - abstract public void startHeader(TableBody th); + /** + * + * @param th TableBody that is starting; + */ + public abstract void startHeader(TableBody th); - abstract public void endHeader(TableBody th); + /** + * + * @param th TableBody that is ending. + */ + public abstract void endHeader(TableBody th); - abstract public void startFooter(TableBody tf); + /** + * + * @param tf TableFooter that is starting. + */ + public abstract void startFooter(TableBody tf); - abstract public void endFooter(TableBody tf); + /** + * + * @param tf TableFooter that is ending. + */ + public abstract void endFooter(TableBody tf); - abstract public void startBody(TableBody tb); + /** + * + * @param tb TableBody that is starting. + */ + public abstract void startBody(TableBody tb); - abstract public void endBody(TableBody tb); + /** + * + * @param tb TableBody that is ending. + */ + public abstract void endBody(TableBody tb); - abstract public void startRow(TableRow tr); + /** + * + * @param tr TableRow that is starting. + */ + public abstract void startRow(TableRow tr); - abstract public void endRow(TableRow tr); + /** + * + * @param tr TableRow that is ending. + */ + public abstract void endRow(TableRow tr); - abstract public void startCell(TableCell tc); + /** + * + * @param tc TableCell that is starting. + */ + public abstract void startCell(TableCell tc); - abstract public void endCell(TableCell tc); + /** + * + * @param tc TableCell that is ending. + */ + public abstract void endCell(TableCell tc); // Lists - abstract public void startList(ListBlock lb); + /** + * + * @param lb ListBlock that is starting. + */ + public abstract void startList(ListBlock lb); - abstract public void endList(ListBlock lb); + /** + * + * @param lb ListBlock that is ending. + */ + public abstract void endList(ListBlock lb); - abstract public void startListItem(ListItem li); + /** + * + * @param li ListItem that is starting. + */ + public abstract void startListItem(ListItem li); - abstract public void endListItem(ListItem li); + /** + * + * @param li ListItem that is ending. + */ + public abstract void endListItem(ListItem li); - abstract public void startListLabel(); + /** + * Process start of a ListLabel. + */ + public abstract void startListLabel(); - abstract public void endListLabel(); + /** + * Process end of a ListLabel. + */ + public abstract void endListLabel(); - abstract public void startListBody(); + /** + * Process start of a ListBody. + */ + public abstract void startListBody(); - abstract public void endListBody(); + /** + * Process end of a ListBody. + */ + public abstract void endListBody(); // Static Regions - abstract public void startStatic(); - - abstract public void endStatic(); - - abstract public void startMarkup(); - - abstract public void endMarkup(); - + /** + * Process start of a Static. + */ + public abstract void startStatic(); - abstract public void startLink(); + /** + * Process end of a Static. + */ + public abstract void endStatic(); - abstract public void endLink(); + /** + * Process start of a Markup. + */ + public abstract void startMarkup(); + /** + * Process end of a Markup. + */ + public abstract void endMarkup(); - abstract public void image(ExternalGraphic eg); + /** + * Process start of a Link. + */ + public abstract void startLink(); - abstract public void pageRef(); + /** + * Process end of a Link. + */ + public abstract void endLink(); - abstract public void foreignObject(InstreamForeignObject ifo); + /** + * Process an ExternalGraphic. + * @param eg ExternalGraphic to process. + */ + public abstract void image(ExternalGraphic eg); - abstract public void footnote(); + /** + * Process a pageRef. + */ + public abstract void pageRef(); - abstract public void leader(Leader l); + /** + * Process an InstreamForeignObject. + * @param ifo InstreamForeignObject to process. + */ + public abstract void foreignObject(InstreamForeignObject ifo); - abstract public void characters(char data[], int start, int length); + /** + * Process a footnote. + */ + public abstract void footnote(); - public void pageBreak() { + /** + * Process a Leader. + * @param l Leader to process. + */ + public abstract void leader(Leader l); - } + /** + * Process character data. + * @param data Array of characters to process. + * @param start Offset for characters to process. + * @param length Portion of array to process. + */ + public abstract void characters(char data[], int start, int length); } diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java index 5e9d2b1ad..dcb8c6b48 100644 --- a/src/java/org/apache/fop/fo/pagination/PageSequence.java +++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java @@ -808,10 +808,18 @@ public class PageSequence extends FObj { return (StaticContent)flowMap.get(name); } + /** + * Accessor method for layoutMasterSet + * @return layoutMasterSet for this object + */ public LayoutMasterSet getLayoutMasterSet() { return layoutMasterSet; } + /** + * Accessor method for titleFO + * @return titleFO for this object + */ public Title getTitleFO() { return titleFO; } diff --git a/src/java/org/apache/fop/mif/MIFHandler.java b/src/java/org/apache/fop/mif/MIFHandler.java index 2ef774edb..402d97919 100644 --- a/src/java/org/apache/fop/mif/MIFHandler.java +++ b/src/java/org/apache/fop/mif/MIFHandler.java @@ -59,10 +59,8 @@ import org.xml.sax.SAXException; // FOP import org.apache.fop.apps.StructureHandler; -import org.apache.fop.fo.Title; import org.apache.fop.fo.flow.Block; import org.apache.fop.fo.flow.Flow; -import org.apache.fop.fo.pagination.LayoutMasterSet; import org.apache.fop.fo.pagination.PageSequence; import org.apache.fop.fo.pagination.PageSequenceMaster; import org.apache.fop.fo.pagination.SimplePageMaster; @@ -232,98 +230,191 @@ public class MIFHandler extends StructureHandler { para = null; } + /** + * @see org.apache.fop.apps.StructureHandler#startTable(Table) + */ public void startTable(Table tbl) { } + /** + * @see org.apache.fop.apps.StructureHandler#endTable(Table) + */ public void endTable(Table tbl) { } + /** + * @see org.apache.fop.apps.StructureHandler#startHeader(TableBody) + */ public void startHeader(TableBody th) { } + /** + * @see org.apache.fop.apps.StructureHandler#endHeader(TableBody) + */ public void endHeader(TableBody th) { } + /** + * @see org.apache.fop.apps.StructureHandler#startFooter(TableBody) + */ public void startFooter(TableBody tf) { } + /** + * @see org.apache.fop.apps.StructureHandler#endFooter(TableBody) + */ public void endFooter(TableBody tf) { } + /** + * @see org.apache.fop.apps.StructureHandler#startBody(TableBody) + */ public void startBody(TableBody tb) { } + /** + * @see org.apache.fop.apps.StructureHandler#endBody(TableBody) + */ public void endBody(TableBody tb) { } + /** + * @see org.apache.fop.apps.StructureHandler#startRow(TableRow) + */ public void startRow(TableRow tr) { } + /** + * @see org.apache.fop.apps.StructureHandler#endRow(TableRow) + */ public void endRow(TableRow tr) { } + /** + * @see org.apache.fop.apps.StructureHandler#startCell(TableCell) + */ public void startCell(TableCell tc) { } + /** + * @see org.apache.fop.apps.StructureHandler#endCell(TableCell) + */ public void endCell(TableCell tc) { } // Lists + /** + * @see org.apache.fop.apps.StructureHandler#startList(ListBlock) + */ public void startList(ListBlock lb) { } + /** + * @see org.apache.fop.apps.StructureHandler#endList(ListBlock) + */ public void endList(ListBlock lb) { } + /** + * @see org.apache.fop.apps.StructureHandler#startListItem(ListItem) + */ public void startListItem(ListItem li) { } + /** + * @see org.apache.fop.apps.StructureHandler#endListItem(ListItem) + */ public void endListItem(ListItem li) { } + /** + * @see org.apache.fop.apps.StructureHandler#startListLabel() + */ public void startListLabel() { } + /** + * @see org.apache.fop.apps.StructureHandler#endListLabel() + */ public void endListLabel() { } + /** + * @see org.apache.fop.apps.StructureHandler#startListBody() + */ public void startListBody() { } + /** + * @see org.apache.fop.apps.StructureHandler#endListBody() + */ public void endListBody() { } // Static Regions + /** + * @see org.apache.fop.apps.StructureHandler#startStatic() + */ public void startStatic() { } + /** + * @see org.apache.fop.apps.StructureHandler#endStatic() + */ public void endStatic() { } + /** + * @see org.apache.fop.apps.StructureHandler#startMarkup() + */ public void startMarkup() { } + /** + * @see org.apache.fop.apps.StructureHandler#endMarkup() + */ public void endMarkup() { } + /** + * @see org.apache.fop.apps.StructureHandler#startLink() + */ public void startLink() { } + /** + * @see org.apache.fop.apps.StructureHandler#endLink() + */ public void endLink() { } + /** + * @see org.apache.fop.apps.StructureHandler#image(ExternalGraphic) + */ public void image(ExternalGraphic eg) { } + /** + * @see org.apache.fop.apps.StructureHandler#pageRef() + */ public void pageRef() { } + /** + * @see org.apache.fop.apps.StructureHandler#foreignObject(InstreamForeignObject) + */ public void foreignObject(InstreamForeignObject ifo) { } + /** + * @see org.apache.fop.apps.StructureHandler#footnote() + */ public void footnote() { } + /** + * @see org.apache.fop.apps.StructureHandler#leader(Leader) + */ public void leader(Leader l) { } diff --git a/src/java/org/apache/fop/rtf/renderer/RTFHandler.java b/src/java/org/apache/fop/rtf/renderer/RTFHandler.java index 15e7240cb..c21354f35 100644 --- a/src/java/org/apache/fop/rtf/renderer/RTFHandler.java +++ b/src/java/org/apache/fop/rtf/renderer/RTFHandler.java @@ -64,8 +64,6 @@ import org.apache.fop.layout.FontInfo; import org.apache.fop.apps.FOPException; import org.apache.fop.fo.pagination.PageSequence; -import org.apache.fop.fo.pagination.LayoutMasterSet; -import org.apache.fop.fo.Title; import org.apache.fop.fo.flow.Block; import org.apache.fop.fo.flow.Flow; import org.apache.fop.fo.flow.ExternalGraphic; @@ -199,98 +197,191 @@ public class RTFHandler extends StructureHandler { public void endBlock(Block bl) { } + /** + * @see org.apache.fop.apps.StructureHandler#startTable(Table) + */ public void startTable(Table tbl) { } + /** + * @see org.apache.fop.apps.StructureHandler#endTable(Table) + */ public void endTable(Table tbl) { } + /** + * @see org.apache.fop.apps.StructureHandler#startHeader(TableBody) + */ public void startHeader(TableBody th) { } + /** + * @see org.apache.fop.apps.StructureHandler#endHeader(TableBody) + */ public void endHeader(TableBody th) { } + /** + * @see org.apache.fop.apps.StructureHandler#startFooter(TableBody) + */ public void startFooter(TableBody tf) { } + /** + * @see org.apache.fop.apps.StructureHandler#endFooter(TableBody) + */ public void endFooter(TableBody tf) { } + /** + * @see org.apache.fop.apps.StructureHandler#startBody(TableBody) + */ public void startBody(TableBody tb) { } + /** + * @see org.apache.fop.apps.StructureHandler#endBody(TableBody) + */ public void endBody(TableBody tb) { } + /** + * @see org.apache.fop.apps.StructureHandler#startRow(TableRow) + */ public void startRow(TableRow tr) { } + /** + * @see org.apache.fop.apps.StructureHandler#endRow(TableRow) + */ public void endRow(TableRow tr) { } + /** + * @see org.apache.fop.apps.StructureHandler#startCell(TableCell) + */ public void startCell(TableCell tc) { } + /** + * @see org.apache.fop.apps.StructureHandler#endCell(TableCell) + */ public void endCell(TableCell tc) { } // Lists + /** + * @see org.apache.fop.apps.StructureHandler#startList(ListBlock) + */ public void startList(ListBlock lb) { } + /** + * @see org.apache.fop.apps.StructureHandler#endList(ListBlock) + */ public void endList(ListBlock lb) { } + /** + * @see org.apache.fop.apps.StructureHandler#startListItem(ListItem) + */ public void startListItem(ListItem li) { } + /** + * @see org.apache.fop.apps.StructureHandler#endListItem(ListItem) + */ public void endListItem(ListItem li) { } + /** + * @see org.apache.fop.apps.StructureHandler#startListLabel() + */ public void startListLabel() { } + /** + * @see org.apache.fop.apps.StructureHandler#endListLabel() + */ public void endListLabel() { } + /** + * @see org.apache.fop.apps.StructureHandler#startListBody() + */ public void startListBody() { } + /** + * @see org.apache.fop.apps.StructureHandler#endListBody() + */ public void endListBody() { } // Static Regions + /** + * @see org.apache.fop.apps.StructureHandler#startStatic() + */ public void startStatic() { } + /** + * @see org.apache.fop.apps.StructureHandler#endStatic() + */ public void endStatic() { } + /** + * @see org.apache.fop.apps.StructureHandler#startMarkup() + */ public void startMarkup() { } + /** + * @see org.apache.fop.apps.StructureHandler#endMarkup() + */ public void endMarkup() { } + /** + * @see org.apache.fop.apps.StructureHandler#startLink() + */ public void startLink() { } + /** + * @see org.apache.fop.apps.StructureHandler#endLink() + */ public void endLink() { } + /** + * @see org.apache.fop.apps.StructureHandler#image(ExternalGraphic) + */ public void image(ExternalGraphic eg) { } + /** + * @see org.apache.fop.apps.StructureHandler#pageRef() + */ public void pageRef() { } + /** + * @see org.apache.fop.apps.StructureHandler#foreignObject(InstreamForeignObject) + */ public void foreignObject(InstreamForeignObject ifo) { } + /** + * @see org.apache.fop.apps.StructureHandler#footnote() + */ public void footnote() { } + /** + * @see org.apache.fop.apps.StructureHandler#leader(Leader) + */ public void leader(Leader l) { } -- 2.39.5