From af51c2412a1390ffb1f4032955717090dc5886d9 Mon Sep 17 00:00:00 2001 From: William Victor Mote Date: Tue, 1 Jul 2003 16:36:03 +0000 Subject: [PATCH] Cleanup style issues, mostly javadoc comments. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196554 13f79535-47bb-0310-9956-ffa450edef68 --- .../rtf/rtflib/rtfdoc/IRtfAfterContainer.java | 6 + .../rtflib/rtfdoc/IRtfBeforeContainer.java | 10 + .../rtflib/rtfdoc/IRtfBookmarkContainer.java | 5 +- .../rtfdoc/IRtfExternalGraphicContainer.java | 5 +- .../rtflib/rtfdoc/IRtfHyperLinkContainer.java | 4 +- .../rtflib/rtfdoc/IRtfJforCmdContainer.java | 9 + .../rtf/rtflib/rtfdoc/IRtfListContainer.java | 6 +- .../rtflib/rtfdoc/IRtfPageBreakContainer.java | 4 +- .../rtf/rtflib/rtfdoc/IRtfPageContainer.java | 4 +- .../IRtfPageNumberCitationContainer.java | 9 + .../rtfdoc/IRtfPageNumberContainer.java | 9 + .../rtflib/rtfdoc/IRtfParagraphContainer.java | 15 +- .../IRtfParagraphKeepTogetherContainer.java | 9 +- .../rtf/rtflib/rtfdoc/IRtfTableContainer.java | 23 +- .../rtf/rtflib/rtfdoc/IRtfTextContainer.java | 25 ++- .../rtf/rtflib/rtfdoc/ITableAttributes.java | 200 +++++++++++------- .../rtflib/rtfdoc/IrtfTemplateContainer.java | 8 +- 17 files changed, 249 insertions(+), 102 deletions(-) diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfAfterContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfAfterContainer.java index 54c48ae55..92a530fd4 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfAfterContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfAfterContainer.java @@ -62,5 +62,11 @@ import java.io.IOException; /** interface for RTF objects that can contain footers */ public interface IRtfAfterContainer { + /** + * + * @param attrs Attributes for new footer + * @return RtfAfter for footer + * @throws IOException for I/O problems + */ RtfAfter newAfter(RtfAttributes attrs) throws IOException; } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfBeforeContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfBeforeContainer.java index cd568d062..a67292cc8 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfBeforeContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfBeforeContainer.java @@ -60,6 +60,16 @@ package org.apache.fop.rtf.rtflib.rtfdoc; import java.io.IOException; +/** + * Interface for classes containing headers. + */ public interface IRtfBeforeContainer { + + /** + * + * @param attrs Attributes of new header + * @return RtfBefore for new header object + * @throws IOException for I/O problems + */ RtfBefore newBefore(RtfAttributes attrs) throws IOException; } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfBookmarkContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfBookmarkContainer.java index 3deb4318a..0d17a50cd 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfBookmarkContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfBookmarkContainer.java @@ -68,12 +68,9 @@ public interface IRtfBookmarkContainer { /** * Create a new RTF bookmark. - * * @param bookmark Name of the bookmark - * * @return RTF bookmark - * - * @throws IOException On eror + * @throws IOException for I/O problems */ RtfBookmark newBookmark (String bookmark) throws IOException; } diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfExternalGraphicContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfExternalGraphicContainer.java index e393c8b3e..6f71ddb87 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfExternalGraphicContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfExternalGraphicContainer.java @@ -60,11 +60,14 @@ package org.apache.fop.rtf.rtflib.rtfdoc; import java.io.IOException; +/** + * Interface for classes containing images. + */ public interface IRtfExternalGraphicContainer { /** * Creates a new image on external graphic base. - * + * @return RtfExternalGraphic for the new image * @exception IOException On error */ RtfExternalGraphic newImage () throws IOException; diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfHyperLinkContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfHyperLinkContainer.java index 1a5b0869b..d2393e8b4 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfHyperLinkContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfHyperLinkContainer.java @@ -66,8 +66,10 @@ import java.io.IOException; public interface IRtfHyperLinkContainer extends IRtfTextContainer { /** * Creates a new hyperlink. - * + * @param str Hyperlink string + * @param attr Hyperlink attributes * @exception IOException on error + * @return new Hyperlink object */ RtfHyperLink newHyperLink (String str, RtfAttributes attr) throws IOException; } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfJforCmdContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfJforCmdContainer.java index 47930a1a1..a6b1fd5fe 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfJforCmdContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfJforCmdContainer.java @@ -61,6 +61,15 @@ package org.apache.fop.rtf.rtflib.rtfdoc; import java.io.IOException; +/** + * Interface for objects containing Commands + */ public interface IRtfJforCmdContainer { + /** + * + * @param attr Attributes for the command + * @return new Command object + * @throws IOException for I/O problems + */ RtfJforCmd newJforCmd(RtfAttributes attr) throws IOException; } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfListContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfListContainer.java index 8566db05a..b76dcb702 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfListContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfListContainer.java @@ -65,6 +65,10 @@ import java.io.IOException; */ public interface IRtfListContainer { - /** close current list if any and start a new one */ + /** Close the current list, if any, and starts a new one + * @param attrs attributes of new List + * @return new List object + * @throws IOException for I/O problems + */ RtfList newList(RtfAttributes attrs) throws IOException; } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageBreakContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageBreakContainer.java index 2fb4db308..95a2883db 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageBreakContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageBreakContainer.java @@ -65,6 +65,8 @@ import java.io.IOException; */ public interface IRtfPageBreakContainer { - /** add a page break */ + /** add a page break + * @throws IOException for I/O problems + */ void newPageBreak() throws IOException; } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageContainer.java index 37fef86fa..e99b2b43d 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageContainer.java @@ -66,7 +66,9 @@ import java.io.IOException; public interface IRtfPageContainer { /** close current text run if any and start a new one with specified attributes - * @param str if not null, added to the RtfText created + * @param attrs attributes for the new Page + * @return new Page object + * @throws IOException for I/O problems. */ RtfPage newPage(RtfAttributes attrs) throws IOException; } diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageNumberCitationContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageNumberCitationContainer.java index 5814de4dc..078bf2c34 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageNumberCitationContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageNumberCitationContainer.java @@ -60,6 +60,15 @@ package org.apache.fop.rtf.rtflib.rtfdoc; import java.io.IOException; +/** + * Interface for classes containing page number citations + */ public interface IRtfPageNumberCitationContainer { + /** + * + * @param id String identifying new page number citation + * @return RtfPageNumberCitation new page number citation object + * @throws IOException for I/O problems + */ RtfPageNumberCitation newPageNumberCitation(String id) throws IOException; } diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageNumberContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageNumberContainer.java index dcbd9b4be..fe634e660 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageNumberContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfPageNumberContainer.java @@ -60,6 +60,15 @@ package org.apache.fop.rtf.rtflib.rtfdoc; import java.io.IOException; +/** + * Interface for objects containing page numbers + */ public interface IRtfPageNumberContainer { + + /** + * + * @return new RtfPageNumber + * @throws IOException for I/O problems. + */ RtfPageNumber newPageNumber() throws IOException; } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfParagraphContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfParagraphContainer.java index 19dab0539..9db4c7f59 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfParagraphContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfParagraphContainer.java @@ -65,10 +65,21 @@ import java.io.IOException; */ public interface IRtfParagraphContainer { - /** close current paragraph if any and start a new one with default attributes */ + /** + * Close current paragraph, if any, and start a new one with default + * attributes. + * @throws IOException for I/O problems. + * @return new paragraph object + */ RtfParagraph newParagraph() throws IOException; - /** close current paragraph if any and start a new one with specified attributes */ + /** + * Close current paragraph, if any, and start a new one with specified + * attributes + * @param attr attributes for new paragraph + * @return new paragraph object + * @throws IOException for I/O problems. + */ RtfParagraph newParagraph(RtfAttributes attr) throws IOException; } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfParagraphKeepTogetherContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfParagraphKeepTogetherContainer.java index 0d6b0d197..29a038c73 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfParagraphKeepTogetherContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfParagraphKeepTogetherContainer.java @@ -60,8 +60,15 @@ package org.apache.fop.rtf.rtflib.rtfdoc; import java.io.IOException; +/** + * Interface for classes containing Paragraphs with Keep Together + */ public interface IRtfParagraphKeepTogetherContainer { - /** close current paragraph if any and start a new one */ + /** + * Close current paragraph, if any, and start a new one + * @return new paragraph object (with keep together) + * @throws IOException for I/O problems + */ RtfParagraphKeepTogether newParagraphKeepTogether() throws IOException; } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTableContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTableContainer.java index 9a8d5711f..b9e0fc76e 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTableContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTableContainer.java @@ -61,17 +61,26 @@ package org.apache.fop.rtf.rtflib.rtfdoc; import java.io.IOException; import org.apache.fop.rtf.rtflib.interfaces.ITableColumnsInfo; -/** Interface for RtfElements that can contain RtfTables +/** + * Interface for RtfElements that can contain RtfTables * @author Bertrand Delacretaz bdelacretaz@codeconsult.ch + * @author Boris Poudérous */ - public interface IRtfTableContainer { - /** close current table if any and start a new one */ + /** + * Close current table, if any, and start a new one + * @param tc Table Columns Info + * @return new table object + * @throws IOException for I/O problems + */ RtfTable newTable(ITableColumnsInfo tc) throws IOException; - /** close current table if any and start a new one - * @param tc added by Boris Poudérous on july 2002 in order to process - * number-columns-spanned attribute - **/ + /** + * Close current table, if any, and start a new one + * @param attrs for the Table attributes + * @param tc to process number-columns-spanned attribute + * @return new table object + * @throws IOException for I/O problems + */ RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc) throws IOException; } diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTextContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTextContainer.java index 334ac275d..57271b74f 100755 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTextContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IRtfTextContainer.java @@ -65,21 +65,32 @@ import java.io.IOException; */ public interface IRtfTextContainer { - /** close current text run if any and start a new one with specified attributes - * @param str if not null, added to the RtfText created + /** + * Close current text element, if any, and start a new one + * @param str if not null, added to the RtfText created + * @param attr attributes for text + * @return new text object + * @throws IOException for I/O problems */ RtfText newText(String str, RtfAttributes attr) throws IOException; - /** close current text run if any and start a new one with default attributes - * @param str if not null, added to the RtfText created + /** + * Close current text run, if any, and start a new one with default attributes + * @param str if not null, added to the RtfText created + * @return a new text object + * @throws IOException for I/O problems */ RtfText newText(String str) throws IOException; - /** add a line break */ + /** + * Add a line break + * @throws IOException for I/O problems + */ void newLineBreak() throws IOException; - /** text containers usually provide default attributes for all texts that they contain. - * This returns a copy of the container's attributes + /** + * Text containers usually provide default attributes for all texts that they contain. + * @return a copy of the container's attributes. */ RtfAttributes getTextContainerAttributes(); } diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/ITableAttributes.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/ITableAttributes.java index a2ebc363a..c3d1a2d5f 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/ITableAttributes.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/ITableAttributes.java @@ -58,33 +58,47 @@ package org.apache.fop.rtf.rtflib.rtfdoc; -/** Constants for RTF table attribute names */ +/** + * Constants for RTF table attribute names + * @author unascribed + * @author Boris POUDEROUS + * @author Chris Scott, Westinghouse + */ public interface ITableAttributes { - /** - * Added by Boris POUDEROUS on 2002/06/27 in order to - * process column/row spanning : - */ + /** to process column spanning */ public static final String COLUMN_SPAN = "number-columns-spanned"; + /** to process row spanning */ public static final String ROW_SPAN = "number-rows-spanned"; - // RTF 1.5 attributes (word 97) - // half the space between the cells of a table row in twips - String ATTR_RTF_15_TRGAPH = "trgaph"; +// RTF 1.5 attributes (word 97) + + /** half the space between the cells of a table row in twips */ + public static final String ATTR_RTF_15_TRGAPH = "trgaph"; + +// RTF 1.6 Row and table attributes + /** table row padding, top */ + public static final String ATTR_ROW_PADDING_TOP = "trpaddt"; + /** table row padding, bottom */ + public static final String ATTR_ROW_PADDING_BOTTOM = "trpaddb"; + /** table row padding, left */ + public static final String ATTR_ROW_PADDING_LEFT = "trpaddl"; + /** table row padding, right */ + public static final String ATTR_ROW_PADDING_RIGHT = "trpaddr"; + + /** table row padding, top */ + public static final String ATTR_ROW_U_PADDING_TOP = "trpaddft"; + /** table row padding, bottom */ + public static final String ATTR_ROW_U_PADDING_BOTTOM = "trpaddfb"; + /** table row padding, left */ + public static final String ATTR_ROW_U_PADDING_LEFT = "trpaddfl"; + /** table row padding, right */ + public static final String ATTR_ROW_U_PADDING_RIGHT = "trpaddfr"; - // RTF 1.6 Row and table attributes - String ATTR_ROW_PADDING_TOP = "trpaddt"; - String ATTR_ROW_PADDING_BOTTOM = "trpaddb"; - String ATTR_ROW_PADDING_LEFT = "trpaddl"; - String ATTR_ROW_PADDING_RIGHT = "trpaddr"; - - String ATTR_ROW_U_PADDING_TOP = "trpaddft"; - String ATTR_ROW_U_PADDING_BOTTOM = "trpaddfb"; - String ATTR_ROW_U_PADDING_LEFT = "trpaddfl"; - String ATTR_ROW_U_PADDING_RIGHT = "trpaddfr"; - - // list of ALL ROW PADDING attributes, used to select them - // when writing attributes - String[] ATTRIB_ROW_PADDING = { + /** + * List of ALL ROW PADDING attributes, used to select them when writing + * attributes + */ + public static final String[] ATTRIB_ROW_PADDING = { ATTR_ROW_PADDING_TOP, ATTR_ROW_U_PADDING_TOP, ATTR_ROW_PADDING_BOTTOM, ATTR_ROW_U_PADDING_BOTTOM, ATTR_ROW_PADDING_LEFT, ATTR_ROW_U_PADDING_LEFT, @@ -92,68 +106,106 @@ public interface ITableAttributes { ATTR_RTF_15_TRGAPH }; - // Cell attributes - String ATTR_CELL_PADDING_TOP = "clpadt"; - String ATTR_CELL_PADDING_BOTTOM = "clpadb"; - String ATTR_CELL_PADDING_LEFT = "clpadl"; - String ATTR_CELL_PADDING_RIGHT = "clpadr"; - - String ATTR_CELL_U_PADDING_TOP = "clpadft"; - String ATTR_CELL_U_PADDING_BOTTOM = "clpadfb"; - String ATTR_CELL_U_PADDING_LEFT = "clpadfl"; - String ATTR_CELL_U_PADDING_RIGHT = "clpadfr"; - - // These lines added by Chris Scott, Westinghouse - // need to make a border style file - - String CELL_BORDER_TOP = "clbrdrt"; - String CELL_BORDER_BOTTOM = "clbrdrb"; - String CELL_BORDER_LEFT = "clbrdrl"; - String CELL_BORDER_RIGHT = "clbrdrr"; - //Table row border attributes - String ROW_BORDER_TOP = "trbrdrt"; - String ROW_BORDER_BOTTOM = "trbrdrb"; - String ROW_BORDER_LEFT = "trbrdrl"; - String ROW_BORDER_RIGHT = "trbrdrr"; - String ROW_BORDER_HORIZONTAL = "trbrdrh"; - String ROW_BORDER_VERTICAL = "trbrdrv"; - - //Table row attributes - String ROW_KEEP_TOGETHER = "trkeep"; - - //This control word is nonexistent in RTF, used - //to simulate the FO:keep-with-next attribute. - String ROW_KEEP_WITH_NEXT = "knext"; - - //This control word is nonexistent in RTF, used - //to simulate the FO:keep-with-previous attribute. - String ROW_KEEP_WITH_PREVIOUS = "kprevious"; - - //shading and color, all are unit based attributes - String CELL_SHADE = "clshdng"; - String CELL_COLOR_BACKGROUND = "clcbpat"; - String CELL_COLOR_FOREGROUND = "clcfpat"; - - // list of ALL CELL PADDING attributes, used to select them - // when writing attributes - String[] ATTRIB_CELL_PADDING = { +// Cell attributes + /** cell padding, top */ + public static final String ATTR_CELL_PADDING_TOP = "clpadt"; + /** cell padding, bottom */ + public static final String ATTR_CELL_PADDING_BOTTOM = "clpadb"; + /** cell padding, left */ + public static final String ATTR_CELL_PADDING_LEFT = "clpadl"; + /** cell padding, right */ + public static final String ATTR_CELL_PADDING_RIGHT = "clpadr"; + + /** cell padding, top */ + public static final String ATTR_CELL_U_PADDING_TOP = "clpadft"; + /** cell padding, bottom */ + public static final String ATTR_CELL_U_PADDING_BOTTOM = "clpadfb"; + /** cell padding, left */ + public static final String ATTR_CELL_U_PADDING_LEFT = "clpadfl"; + /** cell padding, right */ + public static final String ATTR_CELL_U_PADDING_RIGHT = "clpadfr"; + +// for border style file + /** cell border, top */ + public static final String CELL_BORDER_TOP = "clbrdrt"; + /** cell border, bottom */ + public static final String CELL_BORDER_BOTTOM = "clbrdrb"; + /** cell border, left */ + public static final String CELL_BORDER_LEFT = "clbrdrl"; + /** cell border, right */ + public static final String CELL_BORDER_RIGHT = "clbrdrr"; + +//Table row border attributes + /** row border, top */ + public static final String ROW_BORDER_TOP = "trbrdrt"; + /** row border, bottom */ + public static final String ROW_BORDER_BOTTOM = "trbrdrb"; + /** row border, left */ + public static final String ROW_BORDER_LEFT = "trbrdrl"; + /** row border, right */ + public static final String ROW_BORDER_RIGHT = "trbrdrr"; + /** row border, horizontal */ + public static final String ROW_BORDER_HORIZONTAL = "trbrdrh"; + /** row border, vertical */ + public static final String ROW_BORDER_VERTICAL = "trbrdrv"; + +//Table row attributes + /** row attribute, keep-together */ + public static final String ROW_KEEP_TOGETHER = "trkeep"; + + /** + * This control word is nonexistent in RTF, used to simulate the + * FO:keep-with-next attribute. + */ + public static final String ROW_KEEP_WITH_NEXT = "knext"; + + /** + * This control word is nonexistent in RTF, used to simulate the + * FO:keep-with-previous attribute. + */ + public static final String ROW_KEEP_WITH_PREVIOUS = "kprevious"; + + /** cell shading, a unit-based attribute */ + public static final String CELL_SHADE = "clshdng"; + /** cell background color, a unit-based attribute */ + public static final String CELL_COLOR_BACKGROUND = "clcbpat"; + /** cell foreground color, a unit-based attribute */ + public static final String CELL_COLOR_FOREGROUND = "clcfpat"; + + /** + * List of ALL CELL PADDING attributes, used to select them when writing + * attributes + */ + public static final String[] ATTRIB_CELL_PADDING = { ATTR_CELL_PADDING_TOP, ATTR_CELL_U_PADDING_TOP, ATTR_CELL_PADDING_BOTTOM, ATTR_CELL_U_PADDING_BOTTOM, ATTR_CELL_PADDING_LEFT, ATTR_CELL_U_PADDING_LEFT, ATTR_CELL_PADDING_RIGHT, ATTR_CELL_U_PADDING_RIGHT, }; - String[] CELL_BORDER = { - CELL_BORDER_TOP, CELL_BORDER_BOTTOM, - CELL_BORDER_LEFT, CELL_BORDER_RIGHT + /** + * List of ALL CELL BORDER attributes, used to select them when writing + * attributes + */ + public static final String[] CELL_BORDER = { + CELL_BORDER_TOP, CELL_BORDER_BOTTOM, + CELL_BORDER_LEFT, CELL_BORDER_RIGHT }; - String[] ROW_BORDER = { - ROW_BORDER_TOP, ROW_BORDER_BOTTOM, ROW_BORDER_LEFT, - ROW_BORDER_RIGHT, ROW_BORDER_HORIZONTAL, ROW_BORDER_VERTICAL + /** + * List of ALL ROW BORDER attributes, used to select them when writing + * attributes + */ + public static final String[] ROW_BORDER = { + ROW_BORDER_TOP, ROW_BORDER_BOTTOM, ROW_BORDER_LEFT, + ROW_BORDER_RIGHT, ROW_BORDER_HORIZONTAL, ROW_BORDER_VERTICAL }; - String[] CELL_COLOR = { + /** + * List of ALL CELL SHADING AND COLOR attributes, used to select them when + * writing attributes + */ + public static final String[] CELL_COLOR = { CELL_SHADE, CELL_COLOR_BACKGROUND, CELL_COLOR_FOREGROUND }; } \ No newline at end of file diff --git a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IrtfTemplateContainer.java b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IrtfTemplateContainer.java index 6ffacb1bd..c97a525ab 100644 --- a/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IrtfTemplateContainer.java +++ b/src/java/org/apache/fop/rtf/rtflib/rtfdoc/IrtfTemplateContainer.java @@ -60,12 +60,16 @@ package org.apache.fop.rtf.rtflib.rtfdoc; import java.io.IOException; - +/** + * Interface for classes containing templates. + */ public interface IrtfTemplateContainer { /** * Creates a new Template. - * + * @param str description of Template + * @param attr attributes of Template + * @return new Template object * @exception IOException on error */ RtfTemplate newTemplate (String str, RtfAttributes attr) throws IOException; -- 2.39.5