com.jrefinery.report.targets.base.content
Class TextParagraph
java.lang.Object
com.jrefinery.report.targets.base.content.ContentContainer
com.jrefinery.report.targets.base.content.TextParagraph
- All Implemented Interfaces:
- Content
- public class TextParagraph
- extends ContentContainer
A paragraph of an given text content. A paragraph consists of one or more
TextLines.
- Author:
- Thomas Morgner.
|
Field Summary |
static java.lang.String |
RESERVED_LITERAL
A literal used for lines that get shortened by the linebreak implementation. |
|
Constructor Summary |
TextParagraph(SizeCalculator calc,
float lineHeight)
Creates a new text paragraph using the specified size calculator. |
|
Method Summary |
protected java.lang.String |
clearWhitespaces(java.lang.String text)
Removes all whitespaces from the given String and replaces them with a space character. |
void |
setContent(java.lang.String content,
float x,
float y,
float width,
float height)
Sets the content. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RESERVED_LITERAL
public static final java.lang.String RESERVED_LITERAL
- A literal used for lines that get shortened by the linebreak implementation.
- See Also:
- Constant Field Values
TextParagraph
public TextParagraph(SizeCalculator calc,
float lineHeight)
- Creates a new text paragraph using the specified size calculator.
- Parameters:
calc - the size calculator.lineHeight - the height of the lines contained in this paragraph.
setContent
public void setContent(java.lang.String content,
float x,
float y,
float width,
float height)
- Sets the content.
- Parameters:
content - the content.x - the x coordinates for the bounds.y - the y coordinates for the bounds.width - the width of the bounds.height - the height of the bounds.
clearWhitespaces
protected java.lang.String clearWhitespaces(java.lang.String text)
- Removes all whitespaces from the given String and replaces them with a space character.
- Parameters:
text - the string to process.
- Returns:
- a string with all whitespace replaced by space characters.