DateField

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 DateField extends TextBoxField

Date field with calendar view.

DateField dateField = new DateField(page, rect);
 doc.getForm().add(dateField);
 dateField.init(page);

Constructors

ConstructorDescription
DateField()Initializes a new instance of the DateField
DateField(Document doc)Constructor which should be used with Generator.
DateField(Page page, Rectangle rect)Initializes a new instance of the DateField
DateField(Document doc, Rectangle rect)Initializes a new instance of the DateField

Methods

MethodDescription
getValue_DateField_New()Gets or sets Date.
setValue_DateField_New(Date value)Gets or sets Date.
getDateFormat()Gets or sets the date format.
setDateFormat(String value)Gets or sets the date format.
init(Page page)Initializes the JS Action.
addImage_DateField_New(BufferedImage image)Image adding denied for this field.

DateField()

public DateField()

Initializes a new instance of the DateField

DateField(Document doc)

public DateField(Document doc)

Constructor which should be used with Generator.

Parameters:

ParameterTypeDescription
docDocumentDocument where field will be created.

DateField(Page page, Rectangle rect)

public DateField(Page page, Rectangle rect)

Initializes a new instance of the DateField

Parameters:

ParameterTypeDescription
pagePagePage needed for create.
rectRectangleRectangle where the text field will be placed on the page.

DateField(Document doc, Rectangle rect)

public DateField(Document doc, Rectangle rect)

Initializes a new instance of the DateField

Parameters:

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

getValue_DateField_New()

public final Date getValue_DateField_New()

Gets or sets Date.

Returns: Date - java.util.Date instance

setValue_DateField_New(Date value)

public final void setValue_DateField_New(Date value)

Gets or sets Date.

Parameters:

ParameterTypeDescription
valuejava.util.Datejava.util.Date instance

getDateFormat()

public final String getDateFormat()

Gets or sets the date format.

Value: The date format. Default dd/MM/yyyy

Returns: java.lang.String - String value

setDateFormat(String value)

public final void setDateFormat(String value)

Gets or sets the date format.

Value: The date format. Default dd/MM/yyyy

Parameters:

ParameterTypeDescription
valuejava.lang.StringString value

init(Page page)

public final void init(Page page)

Initializes the JS Action.

Parameters:

ParameterTypeDescription
pagePageThe page.

addImage_DateField_New(BufferedImage image)

public final void addImage_DateField_New(BufferedImage image)

Image adding denied for this field.

Parameters:

ParameterTypeDescription
imagejava.awt.image.BufferedImageThe image.