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
Constructor | Description |
---|---|
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
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
doc | IDocument | Document 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:
Parameter | Type | Description |
---|---|---|
page | Page | Page where text field is placed. |
rect | Rectangle | Rectangle 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:
Parameter | Type | Description |
---|---|---|
doc | IDocument | Document where field will be created. |
rect | Rectangle | Rectangle 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:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean 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:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean 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:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean 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:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean 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:
Parameter | Type | Description |
---|---|---|
value | int | int 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:
Parameter | Type | Description |
---|---|---|
value | VerticalAlignment | VerticalAlignment 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:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | String value |
addImage(BufferedImage image)
public void addImage(BufferedImage image)
Adds image into the field resources and draws it.
Parameters:
Parameter | Type | Description |
---|---|---|
image | java.awt.image.BufferedImage | Image 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:
Parameter | Type | Description |
---|---|---|
code | java.lang.String | The text to generate barcode 128. |
setJustification(boolean value)
public void setJustification(boolean value)
Sets justification
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean value |