TextBoxField

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.WidgetAnnotation, com.aspose.pdf.Field

public class TextBoxField extends Field

Class representing text box field.

Constructors

ConstructorDescription
TextBoxField(IDocument doc)Constructor which should be used with Generator.
TextBoxField()Create instance of TextBoxField.
TextBoxField(Page page, Rectangle rect)Constructor of TextBox field.
TextBoxField(IDocument doc, Rectangle rect)Constructor of TextBox field.

Methods

MethodDescription
getMultiline()Gets multiline flag of the field.
setMultiline(boolean value)Sets multiline flag of the field.
getSpellCheck()Gets spellcheck flag for field.
setSpellCheck(boolean value)Sets spellcheck flag for field.
getScrollable()Gets scrollable flag of field.
setScrollable(boolean value)Sets scrollable flag of field.
getForceCombs()Gets flag which indicates is field divided into spaced positions.
setForceCombs(boolean value)Sets flag which indicates is field divided into spaced positions.
getMaxLen()Gets maximum length of text in the field.
setMaxLen(int value)Sets maximum length of text in the field.
getTextVerticalAlignment()Gets or sets text vertical alignment for annotation.
setTextVerticalAlignment(VerticalAlignment value)Gets or sets text vertical alignment for annotation.
getValue()Gets value of the field.
setValue(String value)Sets value of the field.
addImage(BufferedImage image)Adds image into the field resources and draws it.
addBarcode(String code)Adds barcode 128 into the field.
setJustification(boolean value)Sets justification

TextBoxField(IDocument doc)

public TextBoxField(IDocument doc)

Constructor which should be used with Generator.

Parameters:

ParameterTypeDescription
docIDocumentDocument where field will be created.

TextBoxField()

public TextBoxField()

Create instance of TextBoxField.

TextBoxField(Page page, Rectangle rect)

public TextBoxField(Page page, Rectangle rect)

Constructor of TextBox field.

Parameters:

ParameterTypeDescription
pagePagePage where text field is placed.
rectRectangleRectangle where the text field will be placed on the page.

TextBoxField(IDocument doc, Rectangle rect)

public TextBoxField(IDocument doc, Rectangle rect)

Constructor of TextBox field.

Parameters:

ParameterTypeDescription
docIDocumentDocument where field will be created.
rectRectangleRectangle of the field.

getMultiline()

public boolean getMultiline()

Gets multiline flag of the field. If Multiline is true field can contain multiple lines of text.

Returns: boolean - boolean value

setMultiline(boolean value)

public void setMultiline(boolean value)

Sets multiline flag of the field. If Multiline is true field can contain multiple lines of text.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getSpellCheck()

public boolean getSpellCheck()

Gets spellcheck flag for field. If true field shall be spell checked.

Returns: boolean - boolean value

setSpellCheck(boolean value)

public void setSpellCheck(boolean value)

Sets spellcheck flag for field. If true field shall be spell checked.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getScrollable()

public boolean getScrollable()

Gets scrollable flag of field. If true field can be scrolled.

Returns: boolean - boolean value

setScrollable(boolean value)

public void setScrollable(boolean value)

Sets scrollable flag of field. If true field can be scrolled.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getForceCombs()

public boolean getForceCombs()

Gets flag which indicates is field divided into spaced positions.

Returns: boolean - boolean value

setForceCombs(boolean value)

public void setForceCombs(boolean value)

Sets flag which indicates is field divided into spaced positions.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getMaxLen()

public int getMaxLen()

Gets maximum length of text in the field.

Returns: int - int value

setMaxLen(int value)

public void setMaxLen(int value)

Sets maximum length of text in the field.

Parameters:

ParameterTypeDescription
valueintint value

getTextVerticalAlignment()

public final VerticalAlignment getTextVerticalAlignment()

Gets or sets text vertical alignment for annotation.

Returns: VerticalAlignment - VerticalAlignment element

setTextVerticalAlignment(VerticalAlignment value)

public final void setTextVerticalAlignment(VerticalAlignment value)

Gets or sets text vertical alignment for annotation.

Parameters:

ParameterTypeDescription
valueVerticalAlignmentVerticalAlignment element

getValue()

public String getValue()

Gets value of the field.

Returns: java.lang.String - String value

setValue(String value)

public void setValue(String value)

Sets value of the field.

Parameters:

ParameterTypeDescription
valuejava.lang.StringString value

addImage(BufferedImage image)

public void addImage(BufferedImage image)

Adds image into the field resources and draws it.

Parameters:

ParameterTypeDescription
imagejava.awt.image.BufferedImageImage to add into text field.

addBarcode(String code)

public void addBarcode(String code)

Adds barcode 128 into the field. Field value will be changed onto the code and field become read only.

Parameters:

ParameterTypeDescription
codejava.lang.StringThe text to generate barcode 128.

setJustification(boolean value)

public void setJustification(boolean value)

Sets justification

Parameters:

ParameterTypeDescription
valuebooleanboolean value