public class XprObjText extends XprObjBase
Modifier and Type | Field and Description |
---|---|
private boolean |
bold
Bold flag.
|
private java.lang.String |
fontName
Font used with current text.
|
private int |
fontSize
Font size.
|
private boolean |
italic
Italic flag.
|
private java.lang.String |
textBuff
Text buffer in a form line by line.
|
TYPE_BARCODE, TYPE_BOOKMARK, TYPE_FILLED_RECTANGLE, TYPE_IMAGE, TYPE_LINE, TYPE_RECTANGLE, TYPE_TEXT, TYPE_UNDEFINED
Constructor and Description |
---|
XprObjText(java.lang.String fntName,
int fntSize,
boolean isBold,
boolean isItalic,
int fgColor,
double row,
double column,
java.lang.String text)
Create a new text XPR object.
|
Modifier and Type | Method and Description |
---|---|
void |
addText(java.lang.String newLine)
Adding new text line to the object.
|
void |
appendText(java.lang.String newText)
Appending new text line to the object's las line.
|
java.lang.String |
getFontName()
Returns the font name for text object.
|
int |
getFontSize()
Returns the font size for text object.
|
java.lang.String |
getValue()
Returns the first line of the text buffer for the given object.
|
boolean |
isBold()
Returns the font bold attribute.
|
boolean |
isItalic()
Returns the font italic attribute.
|
getColor, getColumn, getLeftMargin, getRow, getTopMargin, getType, setMargins
private java.lang.String textBuff
private java.lang.String fontName
private int fontSize
private boolean bold
private boolean italic
public XprObjText(java.lang.String fntName, int fntSize, boolean isBold, boolean isItalic, int fgColor, double row, double column, java.lang.String text)
fntName
- The font name to be used with text object.fntSize
- The font size to be used with text object.isBold
- Whether the text to be bold or not.isItalic
- Whether the text to be italic or not.fgColor
- Text color.row
- The row value for text.column
- The column value for text.text
- The value for text.public void addText(java.lang.String newLine)
newLine
- New text line to add.public void appendText(java.lang.String newText)
newText
- New text line to append.public java.lang.String getFontName()
public int getFontSize()
public boolean isBold()
TRUE
if font is bold.public boolean isItalic()
TRUE
if font is italic.public java.lang.String getValue()