Package org.faceless.pdf2
Class LayoutBox.Text
- java.lang.Object
-
- org.faceless.pdf2.LayoutBox.Box
-
- org.faceless.pdf2.LayoutBox.Text
-
- Enclosing class:
- LayoutBox
public final class LayoutBox.Text extends LayoutBox.Box
The Text class is a subclass ofLayoutBox.Box
which is specifically for displaying Text.- Since:
- 1.2
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LayoutBox.Text
getNextTwin()
Return the next "twin" of this Text item, ornull
if none exist.PDFStyle
getStyle()
Return the style of this Text itemjava.lang.String
getText()
Return the content of this Text item as a String.void
setText(java.lang.String s)
Replace the contents of this Text box with a different line of text.java.lang.String
toString()
-
Methods inherited from class org.faceless.pdf2.LayoutBox.Box
getBottom, getCorners, getImage, getLeft, getLineBottom, getLineNumber, getLineTop, getLinkedObject, getParent, getRight, getTop, setBottom, setImage, setLeft, setLineCoords, setLinkedObject, setTop, setWidth
-
-
-
-
Method Detail
-
getStyle
public PDFStyle getStyle()
Return the style of this Text item
-
getText
public java.lang.String getText()
Return the content of this Text item as a String.
-
getNextTwin
public LayoutBox.Text getNextTwin()
Return the next "twin" of this Text item, ornull
if none exist. A "twin" is a second (or third, fourth etc.)Text
object which was created when a phrase of text was split at the end of the line.
-
setText
public void setText(java.lang.String s)
Replace the contents of this Text box with a different line of text. This method does not reflow the text, so you need to ensure that the contents of the box are the same length by sticking to digits or using a fixed-width font. This method is not recommended for normal use.- Since:
- 1.2.1
-
toString
public java.lang.String toString()
- Overrides:
toString
in classLayoutBox.Box
-
-