NumberField

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

public class NumberField extends TextBoxField

Text Field with specified valid chars

Constructors

ConstructorDescription
NumberField()Initializes a new instance of the NumberField class.
NumberField(Page page, Rectangle rect)Initializes a new instance of the NumberField class.
NumberField(Document doc, Rectangle rect)Initializes a new instance of the NumberField class.

Methods

MethodDescription
getAllowedChars()Gets or sets the allowed chars.
setAllowedChars(String value)Gets or sets the allowed chars.

NumberField()

public NumberField()

Initializes a new instance of the NumberField class.

NumberField(Page page, Rectangle rect)

public NumberField(Page page, Rectangle rect)

Initializes a new instance of the NumberField class.

Parameters:

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

NumberField(Document doc, Rectangle rect)

public NumberField(Document doc, Rectangle rect)

Initializes a new instance of the NumberField class.

Parameters:

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

getAllowedChars()

public final String getAllowedChars()

Gets or sets the allowed chars.

Value: The allowed chars string. 0123456789 by default

Returns: java.lang.String - String value

setAllowedChars(String value)

public final void setAllowedChars(String value)

Gets or sets the allowed chars.

Value: The allowed chars string. 0123456789 by default

Parameters:

ParameterTypeDescription
valuejava.lang.StringString value