public class RtfText extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RtfText.FieldModifier
Modifiers for fields.
|
Modifier and Type | Method and Description |
---|---|
static RtfText |
bold(Object text)
Bold a given text.
|
static RtfText |
bullet()
Bullet character.
|
static RtfText |
color(int colorindex,
Object text)
Colors text.
|
static RtfText |
color(int colorindex,
String text)
Colors text.
|
static RtfText |
columnBreak()
Required column break.
|
static RtfText |
currentDate()
Current date.
|
static RtfText |
currentDateAbbreviated()
Current date in abbreviated format.
|
static RtfText |
currentDateLong()
Current date in long format.
|
static RtfText |
currentPageNumber()
Current page number.
|
static RtfText |
currentSectionNumber()
Current section number.
|
static RtfText |
currentTime()
Current time.
|
static RtfText |
dottedUnderline(String text)
Underlines dotted.
|
static RtfText |
doubleQuote(Object text)
Sets a text in double quotation marks.
|
static RtfText |
doubleUnderline(Object text)
Underlines double.
|
static RtfText |
field(RtfPara fieldInstructions,
RtfPara recentResult)
Inserts a RTF field.
|
static RtfText |
field(RtfPara fieldInstructions,
RtfPara recentResult,
RtfText.FieldModifier fieldModifier)
Inserts a RTF field.
|
static RtfText |
font(int fontnum,
Object text)
Sets text with a given font style.
|
static RtfText |
fontSize(int fontSize,
Object text)
Sets the font size in half-points.
|
static RtfText |
footnote(Object para)
Place a footnote with automatic footnote reference.
|
static RtfText |
footnote(RtfPara... paras)
Place a footnote with automatic footnote reference.
|
static RtfText |
hyperlink(String url,
RtfPara text)
Adds an hyperlink (aka anchor).
|
static RtfText |
italic(Object text)
Italic given text.
|
static RtfText |
leftDoubleQuotationMark()
Left double quotation mark.
|
static RtfText |
leftQuotationMark()
Left single quotation mark.
|
static RtfText |
lineBreak()
Required line break (no paragraph break).
|
static RtfText |
longHyphen()
Em-dash (long hyphen).
|
static RtfText |
nonBreakingSpace()
Non-breaking space.
|
static RtfText |
pageBreak()
Required page break.
|
static RtfPicture |
picture(InputStream source)
Place a picture.
|
static RtfPicture |
picture(URL source)
Place a picture.
|
static RtfText |
qoute(Object text)
Sets a text in single quotation marks.
|
static RtfText |
revised(Object text)
Set text for revision.
|
static RtfText |
rightDoubleQuotationMark()
Right double quotation mark.
|
static RtfText |
rightQuotationMark()
Right single quotation mark.
|
static RtfText |
shadow(Object text)
Shadows text.
|
static RtfText |
shortHyphen()
En-dash (short hyphen).
|
static RtfText |
smallCapitals(Object text)
Shows text in small capitals.
|
static RtfText |
softColumnBreak()
Non-required column break.
|
static RtfText |
softLineBreak()
Non-required line break.
|
static RtfText |
softPageBreak()
Non-required page break.
|
static RtfText |
strikethru(Object text)
Strikes through text.
|
static RtfText |
subscript(Object text)
Subscripts text.
|
static RtfText |
superscript(Object text)
Superscripts text.
|
static RtfText |
tab()
Tab character.
|
static RtfText |
text(Object... texts)
Converts every object in the sequence with
toString to a
String object and wraps it into a RtfText if its not already a
RtfText object. |
static RtfText |
text(String text)
Wraps a String in a
RtfText object. |
static RtfText |
textJoinWithSpace(boolean joinWithSpace,
Object... texts)
Converts every object in the sequence with
toString to a
String object and wraps it into a RtfText if its not already a
RtfText object and join every text with a space between if wanted. |
static RtfText |
underline(Object text)
Underline text.
|
static RtfText |
wordUnderline(Object text)
Underlines word.
|
public static RtfText text(Object... texts)
toString
to a
String object and wraps it into a RtfText if its not already a
RtfText object.
If the argument is null
or no elements are given
the result is equal to text("")
. If one element of the vararg
is null
then this element is omitted and no separating space
will be written too.texts
- Sequence of text.public static RtfText textJoinWithSpace(boolean joinWithSpace, Object... texts)
toString
to a
String object and wraps it into a RtfText if its not already a
RtfText object and join every text with a space between if wanted.
If the argument is null
or no elements are given
the result is equal to text("")
. If one element of the vararg
is null
then this element is omitted and no separating space
will be written too.joinWithSpace
- If space character should be set between non null
elements.texts
- Sequence of text.public static RtfText text(String text)
RtfText
object.
If the argument is a null
value then it will be treated like a ""
.text
- Stringpublic static RtfText font(int fontnum, Object text)
fontnum
- Font number according to the header.text
- Text to set with a different font.public static RtfText italic(Object text)
text
- Text to make italic.public static RtfText bold(Object text)
text
- Text to be set bold.public static RtfText underline(Object text)
text
- Text to underline.public static RtfText dottedUnderline(String text)
text
- Text to underline dotted.public static RtfText doubleUnderline(Object text)
text
- Text to underline double.public static RtfText wordUnderline(Object text)
text
- Text where words will be underlined.public static RtfText subscript(Object text)
text
- Text to subscript.public static RtfText revised(Object text)
text
- Text for revision.public static RtfText superscript(Object text)
text
- Text to superscript.public static RtfText strikethru(Object text)
text
- Text to strike through.public static RtfText shadow(Object text)
text
- Text to shadow.public static RtfText smallCapitals(Object text)
text
- Text to show in small capitals.public static RtfText fontSize(int fontSize, Object text)
fontSize
- Font size.text
- Text to set in a different font size.public static RtfText color(int colorindex, Object text)
colorindex
- Index of the color set defined in the header.text
- Text to color.public static RtfText color(int colorindex, String text)
colorindex
- Index of the color set defined in the header.text
- Text to color.public static RtfText currentDate()
public static RtfText currentDateLong()
public static RtfText currentDateAbbreviated()
public static RtfText currentTime()
public static RtfText currentPageNumber()
public static RtfText currentSectionNumber()
public static RtfText pageBreak()
public static RtfText columnBreak()
public static RtfText lineBreak()
public static RtfText softPageBreak()
public static RtfText softColumnBreak()
public static RtfText softLineBreak()
public static RtfText tab()
RtfTextPara.tab(double, RtfUnit)
for adjustments.public static RtfText longHyphen()
public static RtfText shortHyphen()
public static RtfText bullet()
public static RtfText leftQuotationMark()
public static RtfText rightQuotationMark()
public static RtfText qoute(Object text)
text
- Text to put in quotes.public static RtfText leftDoubleQuotationMark()
public static RtfText rightDoubleQuotationMark()
public static RtfText doubleQuote(Object text)
text
- to put in quotes.public static RtfText nonBreakingSpace()
public static RtfPicture picture(URL source)
source
- InputStream of the image.RtfPicture
object.public static RtfPicture picture(InputStream source)
source
- InputStream of the image.RtfPicture
object.public static RtfText footnote(RtfPara... paras)
paras
- Paragraphs of this footnote.public static RtfText footnote(Object para)
para
- Paragraph of this footnote.public static RtfText field(RtfPara fieldInstructions, RtfPara recentResult, RtfText.FieldModifier fieldModifier)
fieldInstructions
- Field instructions.recentResult
- Recent results of this field.fieldModifier
- Additional field modifier. Can be null
.public static RtfText field(RtfPara fieldInstructions, RtfPara recentResult)
fieldInstructions
- Field instructions.recentResult
- Recent results of this field.Copyright © 2010–2015 Tutego. All rights reserved.