com.groupdocs.parser

Interfaces

Classes

Exceptions

com.groupdocs.parser

Class TemplateFieldPosition



  • public final class TemplateFieldPosition
    extends Object

    Provides a template field position.

    • Method Detail

      • getType

        public int getType()

        Gets a type of the template field position.

        Returns:
        A value that represents a type of the template field position.
      • getRectangle

        public Rectangle getRectangle()

        Gets a rectangle of the field.

        Returns:
        A rectangle that bounds the field; null for non-fixed template fields.
      • getRegex

        public String getRegex()

        Gets a regular expression.

        Returns:
        A string value that represents a regular expression to find the field; null for non-regex template fields.
      • getRelatedFieldName

        public String getRelatedFieldName()

        Gets a name of the related field.

        Returns:
        A string value that represents a name of the related field; null for non-related template fields.
      • getRelatedPositionType

        public int getRelatedPositionType()

        Gets a field position relative to the related field.

        Returns:
        A value that represents a field position relative to the related field.
      • getSearchAreaSize

        public Size getSearchAreaSize()

        Gets a size of the field.

        Returns:
        An instance of Size; null for non-related template fields.
      • canScaleSearchAreaSize

        public boolean canScaleSearchAreaSize()
      • createFixed

        public static TemplateFieldPosition createFixed(Rectangle rectangle)

        Creates a fixed template field position.

        Parameters:
        rectangle - A rectangle that bounds the template field.
        Returns:
        An instance of TemplateFieldPosition.
      • createRegex

        public static TemplateFieldPosition createRegex(String regex)

        Creates a regex template field position.

        Parameters:
        regex - A string value that represents a regular expression to find the field.
        Returns:
        An instance of TemplateFieldPosition.
      • createRelated

        public static TemplateFieldPosition createRelated(String relatedFieldName,
                                          int relatedPositionType,
                                          Size searchAreaSize)

        Creates a related template field position.

        Parameters:
        relatedFieldName - A string value that represents a name of the related field.
        relatedPositionType - A value that represents a field position relative to the related field.
        searchAreaSize - A size of the field.
        Returns:
        An instance of TemplateFieldPosition.
      • createRelated

        public static TemplateFieldPosition createRelated(String relatedFieldName,
                                          int relatedPositionType,
                                          Size searchAreaSize,
                                          boolean canScaleSearchAreaSize)

        Creates a related template field position.

        Parameters:
        relatedFieldName - A string value that represents a name of the related field.
        relatedPositionType - A value that represents a field position relative to the related field.
        searchAreaSize - A size of the field.
        canScaleSearchAreaSize - A boolean value indicating whether a SearchAreaSize is scaled according to the related field.
        Returns:
        An instance of TemplateFieldPosition.