|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.content.TextLine
Represents a line of text.
Constructor Summary | |
TextLine(SizeCalculator sizeCalc,
float lineheight)
Creates a new line of text. |
Method Summary | |
java.awt.geom.Rectangle2D |
getBounds()
Returns the bounds of the text. |
java.lang.String |
getContent()
Returns the text content. |
Content |
getContentForBounds(java.awt.geom.Rectangle2D bounds)
Returns the content that fits in the specified bounds. |
Content |
getContentPart(int part)
This class does not store sub-content items, so this method always returns null . |
int |
getContentPartCount()
This class does not store sub-content items, so this method always returns zero. |
ContentType |
getContentType()
Returns the content type, in this case ContentType.TEXT . |
float |
getHeight()
Returns the height of this text line. |
java.awt.geom.Rectangle2D |
getMinimumContentSize()
Return the minimum content size. |
void |
setContent(java.lang.String content,
float x,
float y,
float width,
float height)
Sets the content for the line of text. |
java.lang.String |
toString()
Returns a string representation of this text line. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TextLine(SizeCalculator sizeCalc, float lineheight)
sizeCalc
- the size calculator.lineheight
- the line height that should be used for this text line.Method Detail |
public float getHeight()
public ContentType getContentType()
ContentType.TEXT
.
getContentType
in interface Content
public void setContent(java.lang.String content, float x, float y, float width, float height)
content
- the string for this line of text.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.public java.lang.String getContent()
public int getContentPartCount()
getContentPartCount
in interface Content
public Content getContentPart(int part)
null
.
getContentPart
in interface Content
part
- ignored.
null
.public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface Content
public Content getContentForBounds(java.awt.geom.Rectangle2D bounds)
This is a single line, so either the content does fit the height, or it doesn't (in that case, return nothing at all).
getContentForBounds
in interface Content
bounds
- the bounds.
public java.awt.geom.Rectangle2D getMinimumContentSize()
getMinimumContentSize
in interface Content
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |