org.fife.ui.rsyntaxtextarea
public class RtfGenerator extends Object
The following RTF features are supported:
Constructor and Description |
---|
RtfGenerator()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
appendNewline()
Adds a newline to the RTF document.
|
void |
appendToDoc(String text,
Font f,
Color fg,
Color bg)
Appends styled text to the RTF document being generated.
|
void |
appendToDoc(String text,
Font f,
Color fg,
Color bg,
boolean underline)
Appends styled text to the RTF document being generated.
|
void |
appendToDoc(String text,
Font f,
Color fg,
Color bg,
boolean underline,
boolean setFG)
Appends styled text to the RTF document being generated.
|
void |
appendToDocNoFG(String text,
Font f,
Color bg,
boolean underline)
Appends styled text to the RTF document being generated.
|
String |
getRtf()
Returns the RTF document created by this generator.
|
void |
reset()
Resets this generator.
|
public void appendNewline()
public void appendToDoc(String text, Font f, Color fg, Color bg)
text
- The text to append.f
- The font of the text. If this is null
, the
default font is used.fg
- The foreground of the text. If this is null
,
the default foreground color is used.bg
- The background color of the text. If this is
null
, the default background color is used.appendNewline()
public void appendToDocNoFG(String text, Font f, Color bg, boolean underline)
text
- The text to append.f
- The font of the text. If this is null
, the
default font is used.bg
- The background color of the text. If this is
null
, the default background color is used.underline
- Whether the text should be underlined.appendNewline()
public void appendToDoc(String text, Font f, Color fg, Color bg, boolean underline)
text
- The text to append.f
- The font of the text. If this is null
, the
default font is used.fg
- The foreground of the text. If this is null
,
the default foreground color is used.bg
- The background color of the text. If this is
null
, the default background color is used.underline
- Whether the text should be underlined.appendNewline()
public void appendToDoc(String text, Font f, Color fg, Color bg, boolean underline, boolean setFG)
text
- The text to append.f
- The font of the text. If this is null
, the
default font is used.fg
- The foreground of the text. If this is null
,
the default foreground color is used.bg
- The background color of the text. If this is
null
, the default background color is used.underline
- Whether the text should be underlined.setFG
- Whether the foreground specified by fg
should
be honored (if it is non-null
).appendNewline()
public String getRtf()
String
.public void reset()