public abstract class Span extends Object
| Modifier and Type | Method and Description |
|---|---|
Rectangle2D |
getBounds()
Gets the bounds of this span.
|
Rectangle2D |
getBounds(int beginIndex,
int endIndex) |
String |
getText()
Gets the text content of this span.
|
void |
setColor(Color color)
Change the text fill color of the entire Span.
|
void |
setColor(Color color,
int beginIndex,
int endIndex)
Change the text fill color of a subset of the Span.
|
public Rectangle2D getBounds()
public Rectangle2D getBounds(int beginIndex, int endIndex) throws PDFException
PDFExceptionpublic String getText()
public void setColor(Color color) throws PDFException
color - The new color.PDFExceptionpublic void setColor(Color color, int beginIndex, int endIndex) throws PDFException
color - The new color.beginIndex - The beginning index, inclusive.endIndex - The ending index, exclusive.PDFException - Thrown If the text position is invalid.