Class RtfText
java.lang.Object
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfText
Model of a text run (a piece of text with attributes) in an RTF document.
This work was authored by Bertrand Delacretaz (bdelacretaz@codeconsult.ch).
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
constant for align centerstatic final String
constant for align distributedstatic final String
constant for align justifiedstatic final String
constant for align leftstatic final String
constant for align rightstatic final String[]
RtfText attributes: this must contain all allignment attributes namesstatic final String
constant for background colorstatic final String
constant for boldstatic final String
constant for font colorstatic final String
constant for font familystatic final String
constant for font sizestatic final String
constant for italicstatic final String[]
RtfText attributes: this must contain all attribute namesstatic final String
constant for underlinestatic final String
constant for subscriptstatic final String
constant for superscriptstatic final String
constant for underlinestatic final String
constant for bottom dashed borderstatic final String
constant for bottom dotted borderstatic final String
constant for bottom double borderstatic final String
constant for bottom embossed borderstatic final String
constant for bottom single borderstatic final String[]
RtfText attributes:: this must contain all border attribute namesstatic final int
Constant for the 100% shading of the paragraphstatic final String[]
String array of indent constantsstatic final String
constant for left indent bodystatic final String
constant for left indent firststatic final String
constant for right indent bodystatic final String
constant for fieldstatic final String
constant for field pagestatic final String
constant for field resultstatic final String
Constant for the shading of the paragraphstatic final String
Constant for the document's color tableshading of the paragraphstatic final String
Space after a paragraphstatic final String
Space before/after a paragraphstatic final String
constant for center tabstatic final String
constant for tab leader dotsstatic final String
constant for tab leader equalsstatic final String
constant for tab leader hyphensstatic final String
constant for tab leader thickstatic final String
constant for tab leader underscoresstatic final String
constant for right tabstatic final String[]
String array of tab constantsFields inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
attrib, parent, writer
-
Method Summary
Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
close, getParentOfClass, getRtfAttributes, newLine, okToWriteRtf, toString, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeRtfPrefix, writeRtfSuffix, writeStarControlWord, writeStarControlWordNS
-
Field Details
-
ATTR_BOLD
constant for bold- See Also:
-
ATTR_ITALIC
constant for italic- See Also:
-
ATTR_UNDERLINE
constant for underline- See Also:
-
ATTR_STRIKETHROUGH
constant for underline- See Also:
-
ATTR_FONT_SIZE
constant for font size- See Also:
-
ATTR_FONT_FAMILY
constant for font family- See Also:
-
ATTR_FONT_COLOR
constant for font color- See Also:
-
ATTR_BACKGROUND_COLOR
constant for background color- See Also:
-
ATTR_SUPERSCRIPT
constant for superscript- See Also:
-
ATTR_SUBSCRIPT
constant for subscript- See Also:
-
SHADING
Constant for the shading of the paragraph- See Also:
-
SHADING_FRONT_COLOR
Constant for the document's color tableshading of the paragraph- See Also:
-
FULL_SHADING
public static final int FULL_SHADINGConstant for the 100% shading of the paragraph- See Also:
-
ALIGN_CENTER
constant for align center- See Also:
-
ALIGN_LEFT
constant for align left- See Also:
-
ALIGN_RIGHT
constant for align right- See Also:
-
ALIGN_JUSTIFIED
constant for align justified- See Also:
-
ALIGN_DISTRIBUTED
constant for align distributed- See Also:
-
BDR_BOTTOM_SINGLE
constant for bottom single border- See Also:
-
BDR_BOTTOM_DOUBLE
constant for bottom double border- See Also:
-
BDR_BOTTOM_EMBOSS
constant for bottom embossed border- See Also:
-
BDR_BOTTOM_DOTTED
constant for bottom dotted border- See Also:
-
BDR_BOTTOM_DASH
constant for bottom dashed border- See Also:
-
RTF_FIELD
constant for field- See Also:
-
RTF_FIELD_PAGE
constant for field page- See Also:
-
RTF_FIELD_RESULT
constant for field result- See Also:
-
LEFT_INDENT_BODY
constant for left indent body- See Also:
-
LEFT_INDENT_FIRST
constant for left indent first- See Also:
-
RIGHT_INDENT_BODY
constant for right indent body- See Also:
-
TAB_CENTER
constant for center tab- See Also:
-
TAB_RIGHT
constant for right tab- See Also:
-
TAB_LEADER_DOTS
constant for tab leader dots- See Also:
-
TAB_LEADER_HYPHEN
constant for tab leader hyphens- See Also:
-
TAB_LEADER_UNDER
constant for tab leader underscores- See Also:
-
TAB_LEADER_THICK
constant for tab leader thick- See Also:
-
TAB_LEADER_EQUALS
constant for tab leader equals- See Also:
-
SPACE_BEFORE
Space before/after a paragraph- See Also:
-
SPACE_AFTER
Space after a paragraph- See Also:
-
ALIGNMENT
RtfText attributes: this must contain all allignment attributes names -
BORDER
RtfText attributes:: this must contain all border attribute names -
INDENT
String array of indent constants -
TABS
String array of tab constants -
ATTR_NAMES
RtfText attributes: this must contain all attribute names
-
-
Method Details
-
writeRtfContent
Write our text to the RTF stream- Specified by:
writeRtfContent
in classRtfElement
- Throws:
IOException
- for I/O problems
-
getTextContainerAttributes
IRtfTextContainer requirement:- Returns:
- a copy of our attributes
- Throws:
FOPException
- if attributes cannot be cloned
-
isEmpty
public boolean isEmpty()Checks whether the text is empty.- Specified by:
isEmpty
in classRtfElement
- Returns:
- true If m_text is null\n false m_text is set
-
isNbsp
public boolean isNbsp()True if text contains a single non-breaking space (#160). TODO make this more general and/or merge with isEmpty? -- what happen with empty paragraphs, if they will be removed, than NO, else ok- Returns:
- true If m_text is character 160\n false m_text is not a nbsp
-
isTab
public boolean isTab()- Returns:
- true if the text is a tab character
-
isNewLine
public boolean isNewLine()- Returns:
- true if text is a newline character
-
isBold
public boolean isBold(boolean isStart) - Parameters:
isStart
- set to true if processing the start of the text (??)- Returns:
- true if text is bold
-
getTextAttributes
- Returns:
- the attributes of our text
-