001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: /* $Id: ITableAttributes.java 492769 2007-01-04 21:54:38Z jeremias $ */
019:
020: package org.apache.fop.render.rtf.rtflib.rtfdoc;
021:
022: /* $Id: ITableAttributes.java 492769 2007-01-04 21:54:38Z jeremias $ */
023:
024: /*
025: * This file is part of the RTF library of the FOP project, which was originally
026: * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
027: * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
028: * the FOP project.
029: */
030:
031: /**
032: * Constants for RTF table attribute names
033: * @author unascribed
034: * @author Boris POUDEROUS
035: * @author Chris Scott, Westinghouse
036: */
037: public interface ITableAttributes {
038: /** to process column spanning */
039: String COLUMN_SPAN = "number-columns-spanned";
040: /** to process row spanning */
041: String ROW_SPAN = "number-rows-spanned";
042:
043: // RTF 1.5 attributes (word 97)
044:
045: /** half the space between the cells of a table row in twips */
046: String ATTR_RTF_15_TRGAPH = "trgaph";
047:
048: /**
049: * Position of the leftmost edge of the table with respect to the
050: * left edge of its column
051: */
052: String ATTR_ROW_LEFT_INDENT = "trleft";
053:
054: /** table row header */
055: String ATTR_HEADER = "trhdr";
056:
057: // RTF 1.6 Row and table attributes
058: /** table row padding, top */
059: String ATTR_ROW_PADDING_TOP = "trpaddt";
060: /** table row padding, bottom */
061: String ATTR_ROW_PADDING_BOTTOM = "trpaddb";
062: /** table row padding, left */
063: String ATTR_ROW_PADDING_LEFT = "trpaddl";
064: /** table row padding, right */
065: String ATTR_ROW_PADDING_RIGHT = "trpaddr";
066:
067: /** table row padding, top */
068: String ATTR_ROW_U_PADDING_TOP = "trpaddft";
069: /** table row padding, bottom */
070: String ATTR_ROW_U_PADDING_BOTTOM = "trpaddfb";
071: /** table row padding, left */
072: String ATTR_ROW_U_PADDING_LEFT = "trpaddfl";
073: /** table row padding, right */
074: String ATTR_ROW_U_PADDING_RIGHT = "trpaddfr";
075:
076: /**
077: * List of ALL ROW PADDING attributes, used to select them when writing
078: * attributes
079: */
080: String[] ATTRIB_ROW_PADDING = { ATTR_ROW_PADDING_TOP,
081: ATTR_ROW_U_PADDING_TOP, ATTR_ROW_PADDING_BOTTOM,
082: ATTR_ROW_U_PADDING_BOTTOM, ATTR_ROW_PADDING_LEFT,
083: ATTR_ROW_U_PADDING_LEFT, ATTR_ROW_PADDING_RIGHT,
084: ATTR_ROW_U_PADDING_RIGHT, ATTR_RTF_15_TRGAPH,
085: ATTR_ROW_LEFT_INDENT };
086:
087: // Cell attributes
088: /** cell padding, top */
089: String ATTR_CELL_PADDING_TOP = "clpadt";
090: /** cell padding, bottom */
091: String ATTR_CELL_PADDING_BOTTOM = "clpadb";
092: /** cell padding, left */
093: String ATTR_CELL_PADDING_LEFT = "clpadl";
094: /** cell padding, right */
095: String ATTR_CELL_PADDING_RIGHT = "clpadr";
096:
097: /** cell padding, top */
098: String ATTR_CELL_U_PADDING_TOP = "clpadft";
099: /** cell padding, bottom */
100: String ATTR_CELL_U_PADDING_BOTTOM = "clpadfb";
101: /** cell padding, left */
102: String ATTR_CELL_U_PADDING_LEFT = "clpadfl";
103: /** cell padding, right */
104: String ATTR_CELL_U_PADDING_RIGHT = "clpadfr";
105:
106: // for border style file
107: /** cell border, top */
108: String CELL_BORDER_TOP = "clbrdrt";
109: /** cell border, bottom */
110: String CELL_BORDER_BOTTOM = "clbrdrb";
111: /** cell border, left */
112: String CELL_BORDER_LEFT = "clbrdrl";
113: /** cell border, right */
114: String CELL_BORDER_RIGHT = "clbrdrr";
115:
116: // for vertical alignment in cells
117: /** cell alignment, top */
118: String ATTR_CELL_VERT_ALIGN_TOP = "clvertalt";
119: /** cell alignment, center */
120: String ATTR_CELL_VERT_ALIGN_CENTER = "clvertalc";
121: /** cell alignment, bottom */
122: String ATTR_CELL_VERT_ALIGN_BOTTOM = "clvertalb";
123:
124: //Table row border attributes
125: /** row border, top */
126: String ROW_BORDER_TOP = "trbrdrt";
127: /** row border, bottom */
128: String ROW_BORDER_BOTTOM = "trbrdrb";
129: /** row border, left */
130: String ROW_BORDER_LEFT = "trbrdrl";
131: /** row border, right */
132: String ROW_BORDER_RIGHT = "trbrdrr";
133: /** row border, horizontal */
134: String ROW_BORDER_HORIZONTAL = "trbrdrh";
135: /** row border, vertical */
136: String ROW_BORDER_VERTICAL = "trbrdrv";
137:
138: //Table row attributes
139: /** row attribute, keep-together */
140: String ROW_KEEP_TOGETHER = "trkeep";
141:
142: /** Height of a table row in twips */
143: String ROW_HEIGHT = "trrh";
144:
145: /**
146: * This control word is nonexistent in RTF, used to simulate the
147: * FO:keep-with-next attribute.
148: */
149: String ROW_KEEP_WITH_NEXT = "knext";
150:
151: /**
152: * This control word is nonexistent in RTF, used to simulate the
153: * FO:keep-with-previous attribute.
154: */
155: String ROW_KEEP_WITH_PREVIOUS = "kprevious";
156:
157: /** cell shading, a unit-based attribute */
158: String CELL_SHADE = "clshdng";
159: /** cell background color, a unit-based attribute */
160: String CELL_COLOR_BACKGROUND = "clcbpat";
161: /** cell foreground color, a unit-based attribute */
162: String CELL_COLOR_FOREGROUND = "clcfpat";
163:
164: /**
165: * List of ALL CELL PADDING attributes, used to select them when writing
166: * attributes
167: */
168: String[] ATTRIB_CELL_PADDING = { ATTR_CELL_PADDING_TOP,
169: ATTR_CELL_U_PADDING_TOP, ATTR_CELL_PADDING_BOTTOM,
170: ATTR_CELL_U_PADDING_BOTTOM, ATTR_CELL_PADDING_LEFT,
171: ATTR_CELL_U_PADDING_LEFT, ATTR_CELL_PADDING_RIGHT,
172: ATTR_CELL_U_PADDING_RIGHT, };
173:
174: /**
175: * List of ALL CELL BORDER attributes, used to select them when writing
176: * attributes
177: */
178: String[] CELL_BORDER = { CELL_BORDER_TOP, CELL_BORDER_BOTTOM,
179: CELL_BORDER_LEFT, CELL_BORDER_RIGHT };
180:
181: /**
182: * List of ALL ROW BORDER attributes, used to select them when writing
183: * attributes
184: */
185: String[] ROW_BORDER = { ROW_BORDER_TOP, ROW_BORDER_BOTTOM,
186: ROW_BORDER_LEFT, ROW_BORDER_RIGHT, ROW_BORDER_HORIZONTAL,
187: ROW_BORDER_VERTICAL };
188:
189: /**
190: * List of ALL CELL SHADING AND COLOR attributes, used to select them when
191: * writing attributes
192: */
193: String[] CELL_COLOR = { CELL_SHADE, CELL_COLOR_BACKGROUND,
194: CELL_COLOR_FOREGROUND };
195:
196: /**
197: * List of ALL vertical alignment attributes, used to select them when writing
198: * attributes
199: */
200: String[] CELL_VERT_ALIGN = { ATTR_CELL_VERT_ALIGN_TOP,
201: ATTR_CELL_VERT_ALIGN_CENTER, ATTR_CELL_VERT_ALIGN_BOTTOM };
202:
203: }
|