2 * Licensed to the Apache Software Foundation (ASF) under one or more
\r
3 * contributor license agreements. See the NOTICE file distributed with
\r
4 * this work for additional information regarding copyright ownership.
\r
5 * The ASF licenses this file to You under the Apache License, Version 2.0
\r
6 * (the "License"); you may not use this file except in compliance with
\r
7 * the License. You may obtain a copy of the License at
\r
9 * http://www.apache.org/licenses/LICENSE-2.0
\r
11 * Unless required by applicable law or agreed to in writing, software
\r
12 * distributed under the License is distributed on an "AS IS" BASIS,
\r
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 * See the License for the specific language governing permissions and
\r
15 * limitations under the License.
\r
17 package org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf;
\r
19 import org.apache.pdfbox.cos.COSArray;
\r
20 import org.apache.pdfbox.cos.COSBase;
\r
21 import org.apache.pdfbox.cos.COSDictionary;
\r
22 import org.apache.pdfbox.pdmodel.common.PDRectangle;
\r
23 import org.apache.pdfbox.pdmodel.graphics.color.PDGamma;
\r
26 * A Layout attribute object.
\r
28 * @author <a href="mailto:Johannes%20Koch%20%3Ckoch@apache.org%3E">Johannes Koch</a>
\r
29 * @version $Revision: $
\r
31 public class PDLayoutAttributeObject extends PDStandardAttributeObject
\r
35 * standard attribute owner: Layout
\r
37 public static final String OWNER_LAYOUT = "Layout";
\r
39 private static final String PLACEMENT = "Placement";
\r
40 private static final String WRITING_MODE = "WritingMode";
\r
41 private static final String BACKGROUND_COLOR = "BackgroundColor";
\r
42 private static final String BORDER_COLOR = "BorderColor";
\r
43 private static final String BORDER_STYLE = "BorderStyle";
\r
44 private static final String BORDER_THICKNESS = "BorderThickness";
\r
45 private static final String PADDING = "Padding";
\r
46 private static final String COLOR = "Color";
\r
47 private static final String SPACE_BEFORE = "SpaceBefore";
\r
48 private static final String SPACE_AFTER = "SpaceAfter";
\r
49 private static final String START_INDENT = "StartIndent";
\r
50 private static final String END_INDENT = "EndIndent";
\r
51 private static final String TEXT_INDENT = "TextIndent";
\r
52 private static final String TEXT_ALIGN = "TextAlign";
\r
53 private static final String BBOX = "BBox";
\r
54 private static final String WIDTH = "Width";
\r
55 private static final String HEIGHT = "Height";
\r
56 private static final String BLOCK_ALIGN = "BlockAlign";
\r
57 private static final String INLINE_ALIGN = "InlineAlign";
\r
58 private static final String T_BORDER_STYLE = "TBorderStyle";
\r
59 private static final String T_PADDING = "TPadding";
\r
60 private static final String BASELINE_SHIFT = "BaselineShift";
\r
61 private static final String LINE_HEIGHT = "LineHeight";
\r
62 private static final String TEXT_DECORATION_COLOR = "TextDecorationColor";
\r
63 private static final String TEXT_DECORATION_THICKNESS = "TextDecorationThickness";
\r
64 private static final String TEXT_DECORATION_TYPE = "TextDecorationType";
\r
65 private static final String RUBY_ALIGN = "RubyAlign";
\r
66 private static final String RUBY_POSITION = "RubyPosition";
\r
67 private static final String GLYPH_ORIENTATION_VERTICAL = "GlyphOrientationVertical";
\r
68 private static final String COLUMN_COUNT = "ColumnCount";
\r
69 private static final String COLUMN_GAP = "ColumnGap";
\r
70 private static final String COLUMN_WIDTHS = "ColumnWidths";
\r
73 * Placement: Block: Stacked in the block-progression direction within an
\r
74 * enclosing reference area or parent BLSE.
\r
76 public static final String PLACEMENT_BLOCK = "Block";
\r
78 * Placement: Inline: Packed in the inline-progression direction within an
\r
81 public static final String PLACEMENT_INLINE = "Inline";
\r
83 * Placement: Before: Placed so that the before edge of the element’s
\r
84 * allocation rectangle coincides with that of the nearest enclosing
\r
85 * reference area. The element may float, if necessary, to achieve the
\r
86 * specified placement. The element shall be treated as a block occupying
\r
87 * the full extent of the enclosing reference area in the inline direction.
\r
88 * Other content shall be stacked so as to begin at the after edge of the
\r
89 * element’s allocation rectangle.
\r
91 public static final String PLACEMENT_BEFORE = "Before";
\r
93 * Placement: Start: Placed so that the start edge of the element’s
\r
94 * allocation rectangle coincides with that of the nearest enclosing
\r
95 * reference area. The element may float, if necessary, to achieve the
\r
96 * specified placement. Other content that would intrude into the element’s
\r
97 * allocation rectangle shall be laid out as a runaround.
\r
99 public static final String PLACEMENT_START = "Start";
\r
101 * Placement: End: Placed so that the end edge of the element’s allocation
\r
102 * rectangle coincides with that of the nearest enclosing reference area.
\r
103 * The element may float, if necessary, to achieve the specified placement.
\r
104 * Other content that would intrude into the element’s allocation rectangle
\r
105 * shall be laid out as a runaround.
\r
107 public static final String PLACEMENT_END = "End";
\r
109 * WritingMode: LrTb: Inline progression from left to right; block
\r
110 * progression from top to bottom. This is the typical writing mode for
\r
111 * Western writing systems.
\r
113 public static final String WRITING_MODE_LRTB = "LrTb";
\r
115 * WritingMode: RlTb: Inline progression from right to left; block
\r
116 * progression from top to bottom. This is the typical writing mode for
\r
117 * Arabic and Hebrew writing systems.
\r
119 public static final String WRITING_MODE_RLTB = "RlTb";
\r
121 * WritingMode: TbRl: Inline progression from top to bottom; block
\r
122 * progression from right to left. This is the typical writing mode for
\r
123 * Chinese and Japanese writing systems.
\r
125 public static final String WRITING_MODE_TBRL = "TbRl";
\r
127 * BorderStyle: None: No border. Forces the computed value of
\r
128 * BorderThickness to be 0.
\r
130 public static final String BORDER_STYLE_NONE = "None";
\r
132 * BorderStyle: Hidden: Same as {@link #BORDER_STYLE_NONE}, except in terms
\r
133 * of border conflict resolution for table elements.
\r
135 public static final String BORDER_STYLE_HIDDEN = "Hidden";
\r
137 * BorderStyle: Dotted: The border is a series of dots.
\r
139 public static final String BORDER_STYLE_DOTTED = "Dotted";
\r
141 * BorderStyle: Dashed: The border is a series of short line segments.
\r
143 public static final String BORDER_STYLE_DASHED = "Dashed";
\r
145 * BorderStyle: Solid: The border is a single line segment.
\r
147 public static final String BORDER_STYLE_SOLID = "Solid";
\r
149 * BorderStyle: Double: The border is two solid lines. The sum of the two
\r
150 * lines and the space between them equals the value of BorderThickness.
\r
152 public static final String BORDER_STYLE_DOUBLE = "Double";
\r
154 * BorderStyle: Groove: The border looks as though it were carved into the
\r
157 public static final String BORDER_STYLE_GROOVE = "Groove";
\r
159 * BorderStyle: Ridge: The border looks as though it were coming out of the
\r
160 * canvas (the opposite of {@link #BORDER_STYLE_GROOVE}).
\r
162 public static final String BORDER_STYLE_RIDGE = "Ridge";
\r
164 * BorderStyle: Inset: The border makes the entire box look as though it
\r
165 * were embedded in the canvas.
\r
167 public static final String BORDER_STYLE_INSET = "Inset";
\r
169 * BorderStyle: Outset: The border makes the entire box look as though it
\r
170 * were coming out of the canvas (the opposite of {@link #BORDER_STYLE_INSET}.
\r
172 public static final String BORDER_STYLE_OUTSET = "Outset";
\r
174 * TextAlign: Start: Aligned with the start edge.
\r
176 public static final String TEXT_ALIGN_START = "Start";
\r
178 * TextAlign: Center: Centered between the start and end edges.
\r
180 public static final String TEXT_ALIGN_CENTER = "Center";
\r
182 * TextAlign: End: Aligned with the end edge.
\r
184 public static final String TEXT_ALIGN_END = "End";
\r
186 * TextAlign: Justify: Aligned with both the start and end edges, with
\r
187 * internal spacing within each line expanded, if necessary, to achieve such
\r
188 * alignment. The last (or only) line shall be aligned with the start edge
\r
191 public static final String TEXT_ALIGN_JUSTIFY = "Justify";
\r
195 public static final String WIDTH_AUTO = "Auto";
\r
199 public static final String HEIGHT_AUTO = "Auto";
\r
201 * BlockAlign: Before: Before edge of the first child’s allocation rectangle
\r
202 * aligned with that of the table cell’s content rectangle.
\r
204 public static final String BLOCK_ALIGN_BEFORE = "Before";
\r
206 * BlockAlign: Middle: Children centered within the table cell. The distance
\r
207 * between the before edge of the first child’s allocation rectangle and
\r
208 * that of the table cell’s content rectangle shall be the same as the
\r
209 * distance between the after edge of the last child’s allocation rectangle
\r
210 * and that of the table cell’s content rectangle.
\r
212 public static final String BLOCK_ALIGN_MIDDLE = "Middle";
\r
214 * BlockAlign: After: After edge of the last child’s allocation rectangle
\r
215 * aligned with that of the table cell’s content rectangle.
\r
217 public static final String BLOCK_ALIGN_AFTER = "After";
\r
219 * BlockAlign: Justify: Children aligned with both the before and after
\r
220 * edges of the table cell’s content rectangle. The first child shall be
\r
221 * placed as described for {@link #BLOCK_ALIGN_BEFORE} and the last child as
\r
222 * described for {@link #BLOCK_ALIGN_AFTER}, with equal spacing between the
\r
223 * children. If there is only one child, it shall be aligned with the before
\r
224 * edge only, as for {@link #BLOCK_ALIGN_BEFORE}.
\r
226 public static final String BLOCK_ALIGN_JUSTIFY = "Justify";
\r
228 * InlineAlign: Start: Start edge of each child’s allocation rectangle
\r
229 * aligned with that of the table cell’s content rectangle.
\r
231 public static final String INLINE_ALIGN_START = "Start";
\r
233 * InlineAlign: Center: Each child centered within the table cell. The
\r
234 * distance between the start edges of the child’s allocation rectangle and
\r
235 * the table cell’s content rectangle shall be the same as the distance
\r
236 * between their end edges.
\r
238 public static final String INLINE_ALIGN_CENTER = "Center";
\r
240 * InlineAlign: End: End edge of each child’s allocation rectangle aligned
\r
241 * with that of the table cell’s content rectangle.
\r
243 public static final String INLINE_ALIGN_END = "End";
\r
245 * LineHeight: NormalAdjust the line height to include any nonzero value
\r
246 * specified for BaselineShift.
\r
248 public static final String LINE_HEIGHT_NORMAL = "Normal";
\r
250 * LineHeight: Auto: Adjustment for the value of BaselineShift shall not be
\r
253 public static final String LINE_HEIGHT_AUTO = "Auto";
\r
255 * TextDecorationType: None: No text decoration
\r
257 public static final String TEXT_DECORATION_TYPE_NONE = "None";
\r
259 * TextDecorationType: Underline: A line below the text
\r
261 public static final String TEXT_DECORATION_TYPE_UNDERLINE = "Underline";
\r
263 * TextDecorationType: Overline: A line above the text
\r
265 public static final String TEXT_DECORATION_TYPE_OVERLINE = "Overline";
\r
267 * TextDecorationType: LineThrough: A line through the middle of the text
\r
269 public static final String TEXT_DECORATION_TYPE_LINE_THROUGH = "LineThrough";
\r
271 * RubyAlign: Start: The content shall be aligned on the start edge in the
\r
272 * inline-progression direction.
\r
274 public static final String RUBY_ALIGN_START = "Start";
\r
276 * RubyAlign: Center: The content shall be centered in the
\r
277 * inline-progression direction.
\r
279 public static final String RUBY_ALIGN_CENTER = "Center";
\r
281 * RubyAlign: End: The content shall be aligned on the end edge in the
\r
282 * inline-progression direction.
\r
284 public static final String RUBY_ALIGN_END = "End";
\r
286 * RubyAlign: Justify: The content shall be expanded to fill the available
\r
287 * width in the inline-progression direction.
\r
289 public static final String RUBY_ALIGN_JUSTIFY = "Justify";
\r
291 * RubyAlign: Distribute: The content shall be expanded to fill the
\r
292 * available width in the inline-progression direction. However, space shall
\r
293 * also be inserted at the start edge and end edge of the text. The spacing
\r
294 * shall be distributed using a 1:2:1 (start:infix:end) ratio. It shall be
\r
295 * changed to a 0:1:1 ratio if the ruby appears at the start of a text line
\r
296 * or to a 1:1:0 ratio if the ruby appears at the end of the text line.
\r
298 public static final String RUBY_ALIGN_DISTRIBUTE = "Distribute";
\r
300 * RubyPosition: Before: The RT content shall be aligned along the before
\r
301 * edge of the element.
\r
303 public static final String RUBY_POSITION_BEFORE = "Before";
\r
305 * RubyPosition: After: The RT content shall be aligned along the after edge
\r
308 public static final String RUBY_POSITION_AFTER = "After";
\r
310 * RubyPosition: Warichu: The RT and associated RP elements shall be
\r
311 * formatted as a warichu, following the RB element.
\r
313 public static final String RUBY_POSITION_WARICHU = "Warichu";
\r
315 * RubyPosition: Inline: The RT and associated RP elements shall be
\r
316 * formatted as a parenthesis comment, following the RB element.
\r
318 public static final String RUBY_POSITION_INLINE = "Inline";
\r
320 * GlyphOrientationVertical: Auto
\r
322 public static final String GLYPH_ORIENTATION_VERTICAL_AUTO = "Auto";
\r
324 * GlyphOrientationVertical: -180°
\r
326 public static final String GLYPH_ORIENTATION_VERTICAL_MINUS_180_DEGREES = "-180";
\r
328 * GlyphOrientationVertical: -90°
\r
330 public static final String GLYPH_ORIENTATION_VERTICAL_MINUS_90_DEGREES = "-90";
\r
332 * GlyphOrientationVertical: 0°
\r
334 public static final String GLYPH_ORIENTATION_VERTICAL_ZERO_DEGREES = "0";
\r
336 * GlyphOrientationVertical: 90°
\r
338 public static final String GLYPH_ORIENTATION_VERTICAL_90_DEGREES = "90";
\r
340 * GlyphOrientationVertical: 180°
\r
342 public static final String GLYPH_ORIENTATION_VERTICAL_180_DEGREES = "180";
\r
344 * GlyphOrientationVertical: 270°
\r
346 public static final String GLYPH_ORIENTATION_VERTICAL_270_DEGREES = "270";
\r
348 * GlyphOrientationVertical: 360°
\r
350 public static final String GLYPH_ORIENTATION_VERTICAL_360_DEGREES = "360";
\r
354 * Default constructor.
\r
356 public PDLayoutAttributeObject()
\r
358 this.setOwner(OWNER_LAYOUT);
\r
362 * Creates a new Layout attribute object with a given dictionary.
\r
364 * @param dictionary the dictionary
\r
366 public PDLayoutAttributeObject(COSDictionary dictionary)
\r
373 * Gets the positioning of the element with respect to the enclosing
\r
374 * reference area and other content (Placement). The default value is
\r
375 * {@link #PLACEMENT_INLINE}.
\r
377 * @return the placement
\r
379 public String getPlacement()
\r
381 return this.getName(PLACEMENT, PLACEMENT_INLINE);
\r
385 * Sets the positioning of the element with respect to the enclosing
\r
386 * reference area and other content (Placement). The value should be one of:
\r
388 * <li>{@link #PLACEMENT_BLOCK},</li>
\r
389 * <li>{@link #PLACEMENT_INLINE},</li>
\r
390 * <li>{@link #PLACEMENT_BEFORE},</li>
\r
391 * <li>{@link #PLACEMENT_START},</li>
\r
392 * <li>{@link #PLACEMENT_END}.</li>
\r
395 * @param placement the placement
\r
397 public void setPlacement(String placement)
\r
399 this.setName(PLACEMENT, placement);
\r
403 * Gets the writing mode (WritingMode). The default value is
\r
404 * {@link #WRITING_MODE_LRTB}.
\r
406 * @return the writing mode
\r
408 public String getWritingMode()
\r
410 return this.getName(WRITING_MODE, WRITING_MODE_LRTB);
\r
414 * Sets the writing mode (WritingMode). The value should be one of:
\r
416 * <li>{@link #WRITING_MODE_LRTB},</li>
\r
417 * <li>{@link #WRITING_MODE_RLTB},</li>
\r
418 * <li>{@link #WRITING_MODE_TBRL}.</li>
\r
421 * @param writingMode the writing mode
\r
423 public void setWritingMode(String writingMode)
\r
425 this.setName(WRITING_MODE, writingMode);
\r
429 * Gets the background colour (BackgroundColor).
\r
431 * @return the background colour
\r
433 public PDGamma getBackgroundColor()
\r
435 return this.getColor(BACKGROUND_COLOR);
\r
439 * Sets the background colour (BackgroundColor).
\r
441 * @param backgroundColor the background colour
\r
443 public void setBackgroundColor(PDGamma backgroundColor)
\r
445 this.setColor(BACKGROUND_COLOR, backgroundColor);
\r
449 * Gets the border colour (BorderColor).
\r
451 * @return a single border colour ({@link PDGamma}) or four border colours
\r
452 * ({@link PDFourColours})
\r
454 public Object getBorderColors()
\r
456 return this.getColorOrFourColors(BORDER_COLOR);
\r
460 * Sets the same border colour for all four sides (BorderColor).
\r
462 * @param borderColor the border colour
\r
464 public void setAllBorderColors(PDGamma borderColor)
\r
466 this.setColor(BORDER_COLOR, borderColor);
\r
470 * Sets the border colours for four sides separately (BorderColor).
\r
472 * @param borderColors the border colours
\r
474 public void setBorderColors(PDFourColours borderColors)
\r
476 this.setFourColors(BORDER_COLOR, borderColors);
\r
480 * Gets the border style (BorderStyle). The default value is
\r
481 * {@link #BORDER_STYLE_NONE}.
\r
483 * @return the border styles (a String or an array of four Strings)
\r
485 public Object getBorderStyle()
\r
487 return this.getNameOrArrayOfName(BORDER_STYLE, BORDER_STYLE_NONE);
\r
491 * Sets the same border style for all four sides (BorderStyle). The value
\r
492 * should be one of:
\r
494 * <li>{@link #BORDER_STYLE_NONE},</li>
\r
495 * <li>{@link #BORDER_STYLE_HIDDEN},</li>
\r
496 * <li>{@link #BORDER_STYLE_DOTTED},</li>
\r
497 * <li>{@link #BORDER_STYLE_DASHED},</li>
\r
498 * <li>{@link #BORDER_STYLE_SOLID},</li>
\r
499 * <li>{@link #BORDER_STYLE_DOUBLE},</li>
\r
500 * <li>{@link #BORDER_STYLE_GROOVE},</li>
\r
501 * <li>{@link #BORDER_STYLE_RIDGE},</li>
\r
502 * <li>{@link #BORDER_STYLE_INSET},</li>
\r
503 * <li>{@link #BORDER_STYLE_OUTSET}.</li>
\r
506 * @param borderStyle the border style
\r
508 public void setAllBorderStyles(String borderStyle)
\r
510 this.setName(BORDER_STYLE, borderStyle);
\r
514 * Sets the border styles for four sides separately (BorderStyle). The
\r
515 * values should be of:
\r
517 * <li>{@link #BORDER_STYLE_NONE},</li>
\r
518 * <li>{@link #BORDER_STYLE_HIDDEN},</li>
\r
519 * <li>{@link #BORDER_STYLE_DOTTED},</li>
\r
520 * <li>{@link #BORDER_STYLE_DASHED},</li>
\r
521 * <li>{@link #BORDER_STYLE_SOLID},</li>
\r
522 * <li>{@link #BORDER_STYLE_DOUBLE},</li>
\r
523 * <li>{@link #BORDER_STYLE_GROOVE},</li>
\r
524 * <li>{@link #BORDER_STYLE_RIDGE},</li>
\r
525 * <li>{@link #BORDER_STYLE_INSET},</li>
\r
526 * <li>{@link #BORDER_STYLE_OUTSET}.</li>
\r
529 * @param borderStyles the border styles (an array of four Strings)
\r
531 public void setBorderStyles(String[] borderStyles)
\r
533 this.setArrayOfName(BORDER_STYLE, borderStyles);
\r
537 * Gets the border thickness (BorderThickness).
\r
539 * @return the border thickness (a Float or an array of four floats)
\r
541 public Object getBorderThickness()
\r
543 return this.getNumberOrArrayOfNumber(BORDER_THICKNESS, UNSPECIFIED);
\r
547 * Sets the same border thickness for all four sides (BorderThickness).
\r
549 * @param borderThickness the border thickness
\r
551 public void setAllBorderThicknesses(float borderThickness)
\r
553 this.setNumber(BORDER_THICKNESS, borderThickness);
\r
557 * Sets the same border thickness for all four sides (BorderThickness).
\r
559 * @param borderThickness the border thickness
\r
561 public void setAllBorderThicknesses(int borderThickness)
\r
563 this.setNumber(BORDER_THICKNESS, borderThickness);
\r
567 * Sets the border thicknesses for four sides separately (BorderThickness).
\r
569 * @param borderThicknesses the border thickness (an array of four floats)
\r
571 public void setBorderThicknesses(float[] borderThicknesses)
\r
573 this.setArrayOfNumber(BORDER_THICKNESS, borderThicknesses);
\r
577 * Gets the padding (Padding). The default value is 0.
\r
579 * @return the padding (a Float or an array of float)
\r
581 public Object getPadding()
\r
583 return this.getNumberOrArrayOfNumber(PADDING, 0.f);
\r
587 * Sets the same padding for all four sides (Padding).
\r
589 * @param padding the padding
\r
591 public void setAllPaddings(float padding)
\r
593 this.setNumber(PADDING, padding);
\r
597 * Sets the same padding for all four sides (Padding).
\r
599 * @param padding the padding
\r
601 public void setAllPaddings(int padding)
\r
603 this.setNumber(PADDING, padding);
\r
607 * Sets the paddings for four sides separately (Padding).
\r
609 * @param paddings the paddings (an array of four floats)
\r
611 public void setPaddings(float[] paddings)
\r
613 this.setArrayOfNumber(PADDING, paddings);
\r
617 * Gets the color to be used for drawing text and the default value for the
\r
618 * colour of table borders and text decorations (Color).
\r
620 * @return the colour
\r
622 public PDGamma getColor()
\r
624 return this.getColor(COLOR);
\r
628 * Sets the color to be used for drawing text and the default value for the
\r
629 * colour of table borders and text decorations (Color).
\r
631 * @param color the colour
\r
633 public void setColor(PDGamma color)
\r
635 this.setColor(COLOR, color);
\r
639 * Gets the amount of extra space preceding the before edge of the BLSE in
\r
640 * the block-progression direction (SpaceBefore). The default value is 0.
\r
642 * @return the space before
\r
644 public float getSpaceBefore()
\r
646 return this.getNumber(SPACE_BEFORE, 0.f);
\r
650 * Sets the amount of extra space preceding the before edge of the BLSE in
\r
651 * the block-progression direction (SpaceBefore).
\r
653 * @param spaceBefore the space before
\r
655 public void setSpaceBefore(float spaceBefore)
\r
657 this.setNumber(SPACE_BEFORE, spaceBefore);
\r
661 * Sets the amount of extra space preceding the before edge of the BLSE in
\r
662 * the block-progression direction (SpaceBefore).
\r
664 * @param spaceBefore the space before
\r
666 public void setSpaceBefore(int spaceBefore)
\r
668 this.setNumber(SPACE_BEFORE, spaceBefore);
\r
672 * Gets the amount of extra space following the after edge of the BLSE in
\r
673 * the block-progression direction (SpaceAfter). The default value is 0.
\r
675 * @return the space after
\r
677 public float getSpaceAfter()
\r
679 return this.getNumber(SPACE_AFTER, 0.f);
\r
683 * Sets the amount of extra space following the after edge of the BLSE in
\r
684 * the block-progression direction (SpaceAfter).
\r
686 * @param spaceAfter the space after
\r
688 public void setSpaceAfter(float spaceAfter)
\r
690 this.setNumber(SPACE_AFTER, spaceAfter);
\r
694 * Sets the amount of extra space following the after edge of the BLSE in
\r
695 * the block-progression direction (SpaceAfter).
\r
697 * @param spaceAfter the space after
\r
699 public void setSpaceAfter(int spaceAfter)
\r
701 this.setNumber(SPACE_AFTER, spaceAfter);
\r
705 * Gets the distance from the start edge of the reference area to that of
\r
706 * the BLSE in the inline-progression direction (StartIndent). The default value is 0.
\r
708 * @return the start indent
\r
710 public float getStartIndent()
\r
712 return this.getNumber(START_INDENT, 0.f);
\r
716 * Sets the distance from the start edge of the reference area to that of
\r
717 * the BLSE in the inline-progression direction (StartIndent).
\r
719 * @param startIndent the start indent
\r
721 public void setStartIndent(float startIndent)
\r
723 this.setNumber(START_INDENT, startIndent);
\r
727 * Sets the distance from the start edge of the reference area to that of
\r
728 * the BLSE in the inline-progression direction (StartIndent).
\r
730 * @param startIndent the start indent
\r
732 public void setStartIndent(int startIndent)
\r
734 this.setNumber(START_INDENT, startIndent);
\r
738 * Gets the distance from the end edge of the BLSE to that of the reference
\r
739 * area in the inline-progression direction (EndIndent). The default value
\r
742 * @return the end indent
\r
744 public float getEndIndent()
\r
746 return this.getNumber(END_INDENT, 0.f);
\r
750 * Sets the distance from the end edge of the BLSE to that of the reference
\r
751 * area in the inline-progression direction (EndIndent).
\r
753 * @param endIndent the end indent
\r
755 public void setEndIndent(float endIndent)
\r
757 this.setNumber(END_INDENT, endIndent);
\r
761 * Sets the distance from the end edge of the BLSE to that of the reference
\r
762 * area in the inline-progression direction (EndIndent).
\r
764 * @param endIndent the end indent
\r
766 public void setEndIndent(int endIndent)
\r
768 this.setNumber(END_INDENT, endIndent);
\r
772 * Gets the additional distance in the inline-progression direction from the
\r
773 * start edge of the BLSE, as specified by StartIndent, to that of the first
\r
774 * line of text (TextIndent). The default value is 0.
\r
776 * @return the text indent
\r
778 public float getTextIndent()
\r
780 return this.getNumber(TEXT_INDENT, 0.f);
\r
784 * Sets the additional distance in the inline-progression direction from the
\r
785 * start edge of the BLSE, as specified by StartIndent, to that of the first
\r
786 * line of text (TextIndent).
\r
788 * @param textIndent the text indent
\r
790 public void setTextIndent(float textIndent)
\r
792 this.setNumber(TEXT_INDENT, textIndent);
\r
796 * Sets the additional distance in the inline-progression direction from the
\r
797 * start edge of the BLSE, as specified by StartIndent, to that of the first
\r
798 * line of text (TextIndent).
\r
800 * @param textIndent the text indent
\r
802 public void setTextIndent(int textIndent)
\r
804 this.setNumber(TEXT_INDENT, textIndent);
\r
808 * Gets the alignment, in the inline-progression direction, of text and
\r
809 * other content within lines of the BLSE (TextAlign). The default value is
\r
810 * {@link #TEXT_ALIGN_START}.
\r
812 * @return the text alignment
\r
814 public String getTextAlign()
\r
816 return this.getName(TEXT_ALIGN, TEXT_ALIGN_START);
\r
820 * Sets the alignment, in the inline-progression direction, of text and
\r
821 * other content within lines of the BLSE (TextAlign). The value should be
\r
824 * <li>{@link #TEXT_ALIGN_START},</li>
\r
825 * <li>{@link #TEXT_ALIGN_CENTER},</li>
\r
826 * <li>{@link #TEXT_ALIGN_END},</li>
\r
827 * <li>{@link #TEXT_ALIGN_JUSTIFY}.</li>
\r
830 * @param textIndent the text alignment
\r
832 public void setTextAlign(String textIndent)
\r
834 this.setName(TEXT_ALIGN, textIndent);
\r
838 * Gets the bounding box.
\r
840 * @return the bounding box.
\r
842 public PDRectangle getBBox()
\r
845 (COSArray) this.getCOSDictionary().getDictionaryObject(BBOX);
\r
848 return new PDRectangle(array);
\r
854 * Sets the bounding box.
\r
856 * @param bbox the bounding box
\r
858 public void setBBox(PDRectangle bbox)
\r
860 String name = BBOX;
\r
861 COSBase oldValue = this.getCOSDictionary().getDictionaryObject(name);
\r
862 this.getCOSDictionary().setItem(name, bbox);
\r
863 COSBase newValue = bbox == null ? null : bbox.getCOSObject();
\r
864 this.potentiallyNotifyChanged(oldValue, newValue);
\r
868 * Gets the width of the element’s content rectangle in the
\r
869 * inline-progression direction (Width). The default value is
\r
870 * {@link #WIDTH_AUTO}.
\r
872 * @return the width (a Float or a String)
\r
874 public Object getWidth()
\r
876 return this.getNumberOrName(WIDTH, WIDTH_AUTO);
\r
880 * Sets the width of the element’s content rectangle in the
\r
881 * inline-progression direction (Width) to {@link #WIDTH_AUTO}.
\r
883 public void setWidthAuto()
\r
885 this.setName(WIDTH, WIDTH_AUTO);
\r
889 * Sets the width of the element’s content rectangle in the
\r
890 * inline-progression direction (Width).
\r
892 * @param width the width
\r
894 public void setWidth(float width)
\r
896 this.setNumber(WIDTH, width);
\r
900 * Sets the width of the element’s content rectangle in the
\r
901 * inline-progression direction (Width).
\r
903 * @param width the width
\r
905 public void setWidth(int width)
\r
907 this.setNumber(WIDTH, width);
\r
911 * Gets the height of the element’s content rectangle in the
\r
912 * block-progression direction (Height). The default value is
\r
913 * {@link #HEIGHT_AUTO}.
\r
915 * @return the height (a Float or a String)
\r
917 public Object getHeight()
\r
919 return this.getNumberOrName(HEIGHT, HEIGHT_AUTO);
\r
923 * Sets the height of the element’s content rectangle in the
\r
924 * block-progression direction (Height) to {@link #HEIGHT_AUTO}.
\r
926 public void setHeightAuto()
\r
928 this.setName(HEIGHT, HEIGHT_AUTO);
\r
932 * Sets the height of the element’s content rectangle in the
\r
933 * block-progression direction (Height).
\r
935 * @param height the height
\r
937 public void setHeight(float height)
\r
939 this.setNumber(HEIGHT, height);
\r
943 * Sets the height of the element’s content rectangle in the
\r
944 * block-progression direction (Height).
\r
946 * @param height the height
\r
948 public void setHeight(int height)
\r
950 this.setNumber(HEIGHT, height);
\r
954 * Gets the alignment, in the block-progression direction, of content within
\r
955 * the table cell (BlockAlign). The default value is
\r
956 * {@link #BLOCK_ALIGN_BEFORE}.
\r
958 * @return the block alignment
\r
960 public String getBlockAlign()
\r
962 return this.getName(BLOCK_ALIGN, BLOCK_ALIGN_BEFORE);
\r
966 * Sets the alignment, in the block-progression direction, of content within
\r
967 * the table cell (BlockAlign). The value should be one of:
\r
969 * <li>{@link #BLOCK_ALIGN_BEFORE},</li>
\r
970 * <li>{@link #BLOCK_ALIGN_MIDDLE},</li>
\r
971 * <li>{@link #BLOCK_ALIGN_AFTER},</li>
\r
972 * <li>{@link #BLOCK_ALIGN_JUSTIFY}.</li>
\r
975 * @param blockAlign the block alignment
\r
977 public void setBlockAlign(String blockAlign)
\r
979 this.setName(BLOCK_ALIGN, blockAlign);
\r
983 * Gets the alignment, in the inline-progression direction, of content
\r
984 * within the table cell (InlineAlign). The default value is
\r
985 * {@link #INLINE_ALIGN_START}.
\r
987 * @return the inline alignment
\r
989 public String getInlineAlign()
\r
991 return this.getName(INLINE_ALIGN, INLINE_ALIGN_START);
\r
995 * Sets the alignment, in the inline-progression direction, of content
\r
996 * within the table cell (InlineAlign). The value should be one of
\r
998 * <li>{@link #INLINE_ALIGN_START},</li>
\r
999 * <li>{@link #INLINE_ALIGN_CENTER},</li>
\r
1000 * <li>{@link #INLINE_ALIGN_END}.</li>
\r
1003 * @param inlineAlign the inline alignment
\r
1005 public void setInlineAlign(String inlineAlign)
\r
1007 this.setName(INLINE_ALIGN, inlineAlign);
\r
1011 * Gets the style of the border drawn on each edge of a table cell
\r
1016 public Object getTBorderStyle()
\r
1018 return this.getNameOrArrayOfName(T_BORDER_STYLE, BORDER_STYLE_NONE);
\r
1022 * Sets the same table border style for all four sides (TBorderStyle). The
\r
1023 * value should be one of:
\r
1025 * <li>{@link #BORDER_STYLE_NONE},</li>
\r
1026 * <li>{@link #BORDER_STYLE_HIDDEN},</li>
\r
1027 * <li>{@link #BORDER_STYLE_DOTTED},</li>
\r
1028 * <li>{@link #BORDER_STYLE_DASHED},</li>
\r
1029 * <li>{@link #BORDER_STYLE_SOLID},</li>
\r
1030 * <li>{@link #BORDER_STYLE_DOUBLE},</li>
\r
1031 * <li>{@link #BORDER_STYLE_GROOVE},</li>
\r
1032 * <li>{@link #BORDER_STYLE_RIDGE},</li>
\r
1033 * <li>{@link #BORDER_STYLE_INSET},</li>
\r
1034 * <li>{@link #BORDER_STYLE_OUTSET}.</li>
\r
1037 * @param tBorderStyle the table border style
\r
1039 public void setAllTBorderStyles(String tBorderStyle)
\r
1041 this.setName(T_BORDER_STYLE, tBorderStyle);
\r
1045 * Sets the style of the border drawn on each edge of a table cell
\r
1046 * (TBorderStyle). The values should be of:
\r
1048 * <li>{@link #BORDER_STYLE_NONE},</li>
\r
1049 * <li>{@link #BORDER_STYLE_HIDDEN},</li>
\r
1050 * <li>{@link #BORDER_STYLE_DOTTED},</li>
\r
1051 * <li>{@link #BORDER_STYLE_DASHED},</li>
\r
1052 * <li>{@link #BORDER_STYLE_SOLID},</li>
\r
1053 * <li>{@link #BORDER_STYLE_DOUBLE},</li>
\r
1054 * <li>{@link #BORDER_STYLE_GROOVE},</li>
\r
1055 * <li>{@link #BORDER_STYLE_RIDGE},</li>
\r
1056 * <li>{@link #BORDER_STYLE_INSET},</li>
\r
1057 * <li>{@link #BORDER_STYLE_OUTSET}.</li>
\r
1060 * @param tBorderStyles
\r
1062 public void setTBorderStyles(String[] tBorderStyles)
\r
1064 this.setArrayOfName(T_BORDER_STYLE, tBorderStyles);
\r
1068 * Gets the offset to account for the separation between the table cell’s
\r
1069 * content rectangle and the surrounding border (TPadding). The default
\r
1072 * @return the table padding (a Float or an array of float)
\r
1074 public Object getTPadding()
\r
1076 return this.getNumberOrArrayOfNumber(T_PADDING, 0.f);
\r
1080 * Sets the same table padding for all four sides (TPadding).
\r
1082 * @param tPadding the table padding
\r
1084 public void setAllTPaddings(float tPadding)
\r
1086 this.setNumber(T_PADDING, tPadding);
\r
1090 * Sets the same table padding for all four sides (TPadding).
\r
1092 * @param tPadding the table padding
\r
1094 public void setAllTPaddings(int tPadding)
\r
1096 this.setNumber(T_PADDING, tPadding);
\r
1100 * Sets the table paddings for four sides separately (TPadding).
\r
1102 * @param tPaddings the table paddings (an array of four floats)
\r
1104 public void setTPaddings(float[] tPaddings)
\r
1106 this.setArrayOfNumber(T_PADDING, tPaddings);
\r
1110 * Gets the distance by which the element’s baseline shall be shifted
\r
1111 * relative to that of its parent element (BaselineShift). The default value
\r
1114 * @return the baseline shift
\r
1116 public float getBaselineShift()
\r
1118 return this.getNumber(BASELINE_SHIFT, 0.f);
\r
1122 * Sets the distance by which the element’s baseline shall be shifted
\r
1123 * relative to that of its parent element (BaselineShift).
\r
1125 * @param baselineShift the baseline shift
\r
1127 public void setBaselineShift(float baselineShift)
\r
1129 this.setNumber(BASELINE_SHIFT, baselineShift);
\r
1133 * Sets the distance by which the element’s baseline shall be shifted
\r
1134 * relative to that of its parent element (BaselineShift).
\r
1136 * @param baselineShift the baseline shift
\r
1138 public void setBaselineShift(int baselineShift)
\r
1140 this.setNumber(BASELINE_SHIFT, baselineShift);
\r
1144 * Gets the element’s preferred height in the block-progression direction
\r
1145 * (LineHeight). The default value is {@link #LINE_HEIGHT_NORMAL}.
\r
1147 * @return the line height (a Float or a String)
\r
1149 public Object getLineHeight()
\r
1151 return this.getNumberOrName(LINE_HEIGHT, LINE_HEIGHT_NORMAL);
\r
1155 * Sets the element’s preferred height in the block-progression direction
\r
1156 * (LineHeight) to {@link #LINE_HEIGHT_NORMAL}.
\r
1158 public void setLineHeightNormal()
\r
1160 this.setName(LINE_HEIGHT, LINE_HEIGHT_NORMAL);
\r
1164 * Sets the element’s preferred height in the block-progression direction
\r
1165 * (LineHeight) to {@link #LINE_HEIGHT_AUTO}.
\r
1167 public void setLineHeightAuto()
\r
1169 this.setName(LINE_HEIGHT, LINE_HEIGHT_AUTO);
\r
1173 * Sets the element’s preferred height in the block-progression direction
\r
1176 * @param lineHeight the line height
\r
1178 public void setLineHeight(float lineHeight)
\r
1180 this.setNumber(LINE_HEIGHT, lineHeight);
\r
1184 * Sets the element’s preferred height in the block-progression direction
\r
1187 * @param lineHeight the line height
\r
1189 public void setLineHeight(int lineHeight)
\r
1191 this.setNumber(LINE_HEIGHT, lineHeight);
\r
1195 * Gets the colour to be used for drawing text decorations
\r
1196 * (TextDecorationColor).
\r
1198 * @return the text decoration colour
\r
1200 public PDGamma getTextDecorationColor()
\r
1202 return this.getColor(TEXT_DECORATION_COLOR);
\r
1206 * Sets the colour to be used for drawing text decorations
\r
1207 * (TextDecorationColor).
\r
1209 * @param textDecorationColor the text decoration colour
\r
1211 public void setTextDecorationColor(PDGamma textDecorationColor)
\r
1213 this.setColor(TEXT_DECORATION_COLOR, textDecorationColor);
\r
1217 * Gets the thickness of each line drawn as part of the text decoration
\r
1218 * (TextDecorationThickness).
\r
1220 * @return the text decoration thickness
\r
1222 public float getTextDecorationThickness()
\r
1224 return this.getNumber(TEXT_DECORATION_THICKNESS);
\r
1228 * Sets the thickness of each line drawn as part of the text decoration
\r
1229 * (TextDecorationThickness).
\r
1231 * @param textDecorationThickness the text decoration thickness
\r
1233 public void setTextDecorationThickness(float textDecorationThickness)
\r
1235 this.setNumber(TEXT_DECORATION_THICKNESS, textDecorationThickness);
\r
1239 * Sets the thickness of each line drawn as part of the text decoration
\r
1240 * (TextDecorationThickness).
\r
1242 * @param textDecorationThickness the text decoration thickness
\r
1244 public void setTextDecorationThickness(int textDecorationThickness)
\r
1246 this.setNumber(TEXT_DECORATION_THICKNESS, textDecorationThickness);
\r
1250 * Gets the type of text decoration (TextDecorationType). The default value
\r
1251 * is {@link #TEXT_DECORATION_TYPE_NONE}.
\r
1253 * @return the type of text decoration
\r
1255 public String getTextDecorationType()
\r
1257 return this.getName(TEXT_DECORATION_TYPE, TEXT_DECORATION_TYPE_NONE);
\r
1261 * Sets the type of text decoration (TextDecorationType). The value should
\r
1264 * <li>{@link #TEXT_DECORATION_TYPE_NONE},</li>
\r
1265 * <li>{@link #TEXT_DECORATION_TYPE_UNDERLINE},</li>
\r
1266 * <li>{@link #TEXT_DECORATION_TYPE_OVERLINE},</li>
\r
1267 * <li>{@link #TEXT_DECORATION_TYPE_LINE_THROUGH}.</li>
\r
1270 * @param textDecorationType the type of text decoration
\r
1272 public void setTextDecorationType(String textDecorationType)
\r
1274 this.setName(TEXT_DECORATION_TYPE, textDecorationType);
\r
1278 * Gets the justification of the lines within a ruby assembly (RubyAlign).
\r
1279 * The default value is {@link #RUBY_ALIGN_DISTRIBUTE}.
\r
1281 * @return the ruby alignment
\r
1283 public String getRubyAlign()
\r
1285 return this.getName(RUBY_ALIGN, RUBY_ALIGN_DISTRIBUTE);
\r
1289 * Sets the justification of the lines within a ruby assembly (RubyAlign).
\r
1290 * The value should be one of:
\r
1292 * <li>{@link #RUBY_ALIGN_START},</li>
\r
1293 * <li>{@link #RUBY_ALIGN_CENTER},</li>
\r
1294 * <li>{@link #RUBY_ALIGN_END},</li>
\r
1295 * <li>{@link #RUBY_ALIGN_JUSTIFY},</li>
\r
1296 * <li>{@link #RUBY_ALIGN_DISTRIBUTE},</li>
\r
1299 * @param rubyAlign the ruby alignment
\r
1301 public void setRubyAlign(String rubyAlign)
\r
1303 this.setName(RUBY_ALIGN, rubyAlign);
\r
1307 * Gets the placement of the RT structure element relative to the RB element
\r
1308 * in a ruby assembly (RubyPosition). The default value is
\r
1309 * {@link #RUBY_POSITION_BEFORE}.
\r
1311 * @return the ruby position
\r
1313 public String getRubyPosition()
\r
1315 return this.getName(RUBY_POSITION, RUBY_POSITION_BEFORE);
\r
1319 * Sets the placement of the RT structure element relative to the RB element
\r
1320 * in a ruby assembly (RubyPosition). The value should be one of:
\r
1322 * <li>{@link #RUBY_POSITION_BEFORE},</li>
\r
1323 * <li>{@link #RUBY_POSITION_AFTER},</li>
\r
1324 * <li>{@link #RUBY_POSITION_WARICHU},</li>
\r
1325 * <li>{@link #RUBY_POSITION_INLINE}.</li>
\r
1328 * @param rubyPosition the ruby position
\r
1330 public void setRubyPosition(String rubyPosition)
\r
1332 this.setName(RUBY_POSITION, rubyPosition);
\r
1336 * Gets the orientation of glyphs when the inline-progression direction is
\r
1337 * top to bottom or bottom to top (GlyphOrientationVertical). The default
\r
1338 * value is {@link #GLYPH_ORIENTATION_VERTICAL_AUTO}.
\r
1340 * @return the vertical glyph orientation
\r
1342 public String getGlyphOrientationVertical()
\r
1344 return this.getName(GLYPH_ORIENTATION_VERTICAL,
\r
1345 GLYPH_ORIENTATION_VERTICAL_AUTO);
\r
1349 * Sets the orientation of glyphs when the inline-progression direction is
\r
1350 * top to bottom or bottom to top (GlyphOrientationVertical). The value
\r
1351 * should be one of:
\r
1353 * <li>{@link #GLYPH_ORIENTATION_VERTICAL_AUTO},</li>
\r
1354 * <li>{@link #GLYPH_ORIENTATION_VERTICAL_MINUS_180_DEGREES},</li>
\r
1355 * <li>{@link #GLYPH_ORIENTATION_VERTICAL_MINUS_90_DEGREES},</li>
\r
1356 * <li>{@link #GLYPH_ORIENTATION_VERTICAL_ZERO_DEGREES},</li>
\r
1357 * <li>{@link #GLYPH_ORIENTATION_VERTICAL_90_DEGREES},</li>
\r
1358 * <li>{@link #GLYPH_ORIENTATION_VERTICAL_180_DEGREES},</li>
\r
1359 * <li>{@link #GLYPH_ORIENTATION_VERTICAL_270_DEGREES},</li>
\r
1360 * <li>{@link #GLYPH_ORIENTATION_VERTICAL_360_DEGREES}.</li>
\r
1363 * @param glyphOrientationVertical the vertical glyph orientation
\r
1365 public void setGlyphOrientationVertical(String glyphOrientationVertical)
\r
1367 this.setName(GLYPH_ORIENTATION_VERTICAL, glyphOrientationVertical);
\r
1371 * Gets the number of columns in the content of the grouping element
\r
1372 * (ColumnCount). The default value is 1.
\r
1374 * @return the column count
\r
1376 public int getColumnCount()
\r
1378 return this.getInteger(COLUMN_COUNT, 1);
\r
1382 * Sets the number of columns in the content of the grouping element
\r
1385 * @param columnCount the column count
\r
1387 public void setColumnCount(int columnCount)
\r
1389 this.setInteger(COLUMN_COUNT, columnCount);
\r
1393 * Gets the desired space between adjacent columns in the inline-progression
\r
1394 * direction (ColumnGap).
\r
1396 * @return the column gap (FLoat or array of floats)
\r
1398 public Object getColumnGap()
\r
1400 return this.getNumberOrArrayOfNumber(COLUMN_GAP, UNSPECIFIED);
\r
1404 * Sets the desired space between all columns in the inline-progression
\r
1405 * direction (ColumnGap).
\r
1407 * @param columnGap the column gap
\r
1409 public void setColumnGap(float columnGap)
\r
1411 this.setNumber(COLUMN_GAP, columnGap);
\r
1415 * Sets the desired space between all columns in the inline-progression
\r
1416 * direction (ColumnGap).
\r
1418 * @param columnGap the column gap
\r
1420 public void setColumnGap(int columnGap)
\r
1422 this.setNumber(COLUMN_GAP, columnGap);
\r
1426 * Sets the desired space between adjacent columns in the inline-progression
\r
1427 * direction (ColumnGap), the first element specifying the space between the
\r
1428 * first and second columns, the second specifying the space between the
\r
1429 * second and third columns, and so on.
\r
1431 * @param columnGaps the column gaps
\r
1433 public void setColumnGaps(float[] columnGaps)
\r
1435 this.setArrayOfNumber(COLUMN_GAP, columnGaps);
\r
1439 * Gets the desired width of the columns, measured in default user space
\r
1440 * units in the inline-progression direction (ColumnWidths).
\r
1442 * @return the column widths (Float or array of floats)
\r
1444 public Object getColumnWidths()
\r
1446 return this.getNumberOrArrayOfNumber(COLUMN_WIDTHS, UNSPECIFIED);
\r
1450 * Sets the same column width for all columns (ColumnWidths).
\r
1452 * @param columnWidth the column width
\r
1454 public void setAllColumnWidths(float columnWidth)
\r
1456 this.setNumber(COLUMN_WIDTHS, columnWidth);
\r
1460 * Sets the same column width for all columns (ColumnWidths).
\r
1462 * @param columnWidth the column width
\r
1464 public void setAllColumnWidths(int columnWidth)
\r
1466 this.setNumber(COLUMN_WIDTHS, columnWidth);
\r
1470 * Sets the column widths for the columns separately (ColumnWidths).
\r
1472 * @param columnWidths the column widths
\r
1474 public void setColumnWidths(float[] columnWidths)
\r
1476 this.setArrayOfNumber(COLUMN_WIDTHS, columnWidths);
\r
1480 public String toString()
\r
1482 StringBuilder sb = new StringBuilder().append(super.toString());
\r
1483 if (this.isSpecified(PLACEMENT))
\r
1485 sb.append(", Placement=").append(this.getPlacement());
\r
1487 if (this.isSpecified(WRITING_MODE))
\r
1489 sb.append(", WritingMode=").append(this.getWritingMode());
\r
1491 if (this.isSpecified(BACKGROUND_COLOR))
\r
1493 sb.append(", BackgroundColor=").append(this.getBackgroundColor());
\r
1495 if (this.isSpecified(BORDER_COLOR))
\r
1497 sb.append(", BorderColor=").append(this.getBorderColors());
\r
1499 if (this.isSpecified(BORDER_STYLE))
\r
1501 Object borderStyle = this.getBorderStyle();
\r
1502 sb.append(", BorderStyle=");
\r
1503 if (borderStyle instanceof String[])
\r
1505 sb.append(arrayToString((String[]) borderStyle));
\r
1509 sb.append(borderStyle);
\r
1512 if (this.isSpecified(BORDER_THICKNESS))
\r
1514 Object borderThickness = this.getBorderThickness();
\r
1515 sb.append(", BorderThickness=");
\r
1516 if (borderThickness instanceof float[])
\r
1518 sb.append(arrayToString((float[]) borderThickness));
\r
1522 sb.append(String.valueOf((Float) borderThickness));
\r
1525 if (this.isSpecified(PADDING))
\r
1527 Object padding = this.getPadding();
\r
1528 sb.append(", Padding=");
\r
1529 if (padding instanceof float[])
\r
1531 sb.append(arrayToString((float[]) padding));
\r
1535 sb.append(String.valueOf((Float) padding));
\r
1538 if (this.isSpecified(COLOR))
\r
1540 sb.append(", Color=").append(this.getColor());
\r
1542 if (this.isSpecified(SPACE_BEFORE))
\r
1544 sb.append(", SpaceBefore=")
\r
1545 .append(String.valueOf(this.getSpaceBefore()));
\r
1547 if (this.isSpecified(SPACE_AFTER))
\r
1549 sb.append(", SpaceAfter=")
\r
1550 .append(String.valueOf(this.getSpaceAfter()));
\r
1552 if (this.isSpecified(START_INDENT))
\r
1554 sb.append(", StartIndent=")
\r
1555 .append(String.valueOf(this.getStartIndent()));
\r
1557 if (this.isSpecified(END_INDENT))
\r
1559 sb.append(", EndIndent=")
\r
1560 .append(String.valueOf(this.getEndIndent()));
\r
1562 if (this.isSpecified(TEXT_INDENT))
\r
1564 sb.append(", TextIndent=")
\r
1565 .append(String.valueOf(this.getTextIndent()));
\r
1567 if (this.isSpecified(TEXT_ALIGN))
\r
1569 sb.append(", TextAlign=").append(this.getTextAlign());
\r
1571 if (this.isSpecified(BBOX))
\r
1573 sb.append(", BBox=").append(this.getBBox());
\r
1575 if (this.isSpecified(WIDTH))
\r
1577 Object width = this.getWidth();
\r
1578 sb.append(", Width=");
\r
1579 if (width instanceof Float)
\r
1581 sb.append(String.valueOf((Float) width));
\r
1588 if (this.isSpecified(HEIGHT))
\r
1590 Object height = this.getHeight();
\r
1591 sb.append(", Height=");
\r
1592 if (height instanceof Float)
\r
1594 sb.append(String.valueOf((Float) height));
\r
1598 sb.append(height);
\r
1601 if (this.isSpecified(BLOCK_ALIGN))
\r
1603 sb.append(", BlockAlign=").append(this.getBlockAlign());
\r
1605 if (this.isSpecified(INLINE_ALIGN))
\r
1607 sb.append(", InlineAlign=").append(this.getInlineAlign());
\r
1609 if (this.isSpecified(T_BORDER_STYLE))
\r
1611 Object tBorderStyle = this.getTBorderStyle();
\r
1612 sb.append(", TBorderStyle=");
\r
1613 if (tBorderStyle instanceof String[])
\r
1615 sb.append(arrayToString((String[]) tBorderStyle));
\r
1619 sb.append(tBorderStyle);
\r
1622 if (this.isSpecified(T_PADDING))
\r
1624 Object tPadding = this.getTPadding();
\r
1625 sb.append(", TPadding=");
\r
1626 if (tPadding instanceof float[])
\r
1628 sb.append(arrayToString((float[]) tPadding));
\r
1632 sb.append(String.valueOf((Float) tPadding));
\r
1635 if (this.isSpecified(BASELINE_SHIFT))
\r
1637 sb.append(", BaselineShift=")
\r
1638 .append(String.valueOf(this.getBaselineShift()));
\r
1640 if (this.isSpecified(LINE_HEIGHT))
\r
1642 Object lineHeight = this.getLineHeight();
\r
1643 sb.append(", LineHeight=");
\r
1644 if (lineHeight instanceof Float)
\r
1646 sb.append(String.valueOf((Float) lineHeight));
\r
1650 sb.append(lineHeight);
\r
1653 if (this.isSpecified(TEXT_DECORATION_COLOR))
\r
1655 sb.append(", TextDecorationColor=")
\r
1656 .append(this.getTextDecorationColor());
\r
1658 if (this.isSpecified(TEXT_DECORATION_THICKNESS))
\r
1660 sb.append(", TextDecorationThickness=")
\r
1661 .append(String.valueOf(this.getTextDecorationThickness()));
\r
1663 if (this.isSpecified(TEXT_DECORATION_TYPE))
\r
1665 sb.append(", TextDecorationType=")
\r
1666 .append(this.getTextDecorationType());
\r
1668 if (this.isSpecified(RUBY_ALIGN))
\r
1670 sb.append(", RubyAlign=").append(this.getRubyAlign());
\r
1672 if (this.isSpecified(RUBY_POSITION))
\r
1674 sb.append(", RubyPosition=").append(this.getRubyPosition());
\r
1676 if (this.isSpecified(GLYPH_ORIENTATION_VERTICAL))
\r
1678 sb.append(", GlyphOrientationVertical=")
\r
1679 .append(this.getGlyphOrientationVertical());
\r
1681 if (this.isSpecified(COLUMN_COUNT))
\r
1683 sb.append(", ColumnCount=")
\r
1684 .append(String.valueOf(this.getColumnCount()));
\r
1686 if (this.isSpecified(COLUMN_GAP))
\r
1688 Object columnGap = this.getColumnGap();
\r
1689 sb.append(", ColumnGap=");
\r
1690 if (columnGap instanceof float[])
\r
1692 sb.append(arrayToString((float[]) columnGap));
\r
1696 sb.append(String.valueOf((Float) columnGap));
\r
1699 if (this.isSpecified(COLUMN_WIDTHS))
\r
1701 Object columnWidth = this.getColumnWidths();
\r
1702 sb.append(", ColumnWidths=");
\r
1703 if (columnWidth instanceof float[])
\r
1705 sb.append(arrayToString((float[]) columnWidth));
\r
1709 sb.append(String.valueOf((Float) columnWidth));
\r
1712 return sb.toString();
\r