Class SignatureImageTextParameters

java.lang.Object
eu.europa.esig.dss.pades.SignatureImageTextParameters
All Implemented Interfaces:
Serializable

public class SignatureImageTextParameters extends Object implements Serializable
This class allows to custom text generation in the PAdES visible signature
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor instantiating object with default configuration
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns background color for the text's area
    Returns specified text font If not defined, returns a Default Font instance (PTSerifRegular)
    float
    Returns padding between text and its area
    eu.europa.esig.dss.enumerations.SignerTextHorizontalAlignment
    Returns a signer text horizontal alignment value
    eu.europa.esig.dss.enumerations.SignerTextPosition
    Returns a signer text position respectively to an image
    eu.europa.esig.dss.enumerations.SignerTextVerticalAlignment
    Returns a signer text vertical alignment value
    Returns defines text content
    Returns text color parameter
    eu.europa.esig.dss.enumerations.TextWrapping
    Gets TextWrapping
    boolean
    Checks if the text property is set for the parameters
    void
    setBackgroundColor(Color backgroundColor)
    Sets the provided background color for a test's area NOTE: use NULL for a transparent background (if supported by a selected implementation) DEFAULT: Color.WHITE (PAdES visual appearance: allow null as text color, preventing graphic operators)
    void
    setFont(DSSFont dssFont)
    Sets a text font
    void
    setPadding(float padding)
    Sets a padding between text and its area
    void
    setSignerTextHorizontalAlignment(eu.europa.esig.dss.enumerations.SignerTextHorizontalAlignment signerTextHorizontalAlignment)
    Allows a horizontal alignment of a text with respect to its area
    void
    setSignerTextPosition(eu.europa.esig.dss.enumerations.SignerTextPosition signerTextPosition)
    Specifies a text position respectively to an image inside the signature field area
    void
    setSignerTextVerticalAlignment(eu.europa.esig.dss.enumerations.SignerTextVerticalAlignment signerTextVerticalAlignment)
    Defines a vertical alignment (positioning) of signer text inside the signature field
    void
    Sets a text content parameter
    void
    setTextColor(Color textColor)
    Sets color for the text NOTE: use NULL for the default text color (if supported by a selected implementation) DEFAULT: Color.BLACK (PAdES visual appearance: allow null as text color, preventing graphic operators)
    void
    setTextWrapping(eu.europa.esig.dss.enumerations.TextWrapping textWrapping)
    Sets the TextWrapping parameter, defining a way the text will be generated Default : TextWrapping.FONT_BASED - text is generated based in the provided dssFont configuration
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SignatureImageTextParameters

      public SignatureImageTextParameters()
      Default constructor instantiating object with default configuration
  • Method Details

    • getSignerTextPosition

      public eu.europa.esig.dss.enumerations.SignerTextPosition getSignerTextPosition()
      Returns a signer text position respectively to an image
      Returns:
      SignerTextPosition
    • setSignerTextPosition

      public void setSignerTextPosition(eu.europa.esig.dss.enumerations.SignerTextPosition signerTextPosition)
      Specifies a text position respectively to an image inside the signature field area
      Parameters:
      signerTextPosition - SignerTextPosition (TOP, BOTTOM, RIGHT, LEFT)
    • getSignerTextVerticalAlignment

      public eu.europa.esig.dss.enumerations.SignerTextVerticalAlignment getSignerTextVerticalAlignment()
      Returns a signer text vertical alignment value
      Returns:
      SignerTextVerticalAlignment
    • setSignerTextVerticalAlignment

      public void setSignerTextVerticalAlignment(eu.europa.esig.dss.enumerations.SignerTextVerticalAlignment signerTextVerticalAlignment)
      Defines a vertical alignment (positioning) of signer text inside the signature field
      Parameters:
      signerTextVerticalAlignment - SignerTextVerticalAlignment (TOP, MIDDLE, BOTTOM)
    • getSignerTextHorizontalAlignment

      public eu.europa.esig.dss.enumerations.SignerTextHorizontalAlignment getSignerTextHorizontalAlignment()
      Returns a signer text horizontal alignment value
      Returns:
      SignerTextHorizontalAlignment
    • setSignerTextHorizontalAlignment

      public void setSignerTextHorizontalAlignment(eu.europa.esig.dss.enumerations.SignerTextHorizontalAlignment signerTextHorizontalAlignment)
      Allows a horizontal alignment of a text with respect to its area
      Parameters:
      signerTextHorizontalAlignment - SignerTextHorizontalAlignment (LEFT, CENTER, RIGHT)
    • getFont

      public DSSFont getFont()
      Returns specified text font If not defined, returns a Default Font instance (PTSerifRegular)
      Returns:
      DSSFont
    • setFont

      public void setFont(DSSFont dssFont)
      Sets a text font
      Parameters:
      dssFont - DSSFont
    • getTextWrapping

      public eu.europa.esig.dss.enumerations.TextWrapping getTextWrapping()
      Gets TextWrapping
      Returns:
      TextWrapping
    • setTextWrapping

      public void setTextWrapping(eu.europa.esig.dss.enumerations.TextWrapping textWrapping)
      Sets the TextWrapping parameter, defining a way the text will be generated Default : TextWrapping.FONT_BASED - text is generated based in the provided dssFont configuration
      Parameters:
      textWrapping - TextWrapping
    • getPadding

      public float getPadding()
      Returns padding between text and its area
      Returns:
      float padding value
    • setPadding

      public void setPadding(float padding)
      Sets a padding between text and its area
      Parameters:
      padding - float padding value
    • getTextColor

      public Color getTextColor()
      Returns text color parameter
      Returns:
      Color
    • setTextColor

      public void setTextColor(Color textColor)
      Sets color for the text NOTE: use NULL for the default text color (if supported by a selected implementation) DEFAULT: Color.BLACK (PAdES visual appearance: allow null as text color, preventing graphic operators)
      Parameters:
      textColor - Color to set
    • getBackgroundColor

      public Color getBackgroundColor()
      Returns background color for the text's area
      Returns:
      Color of the text area background
    • setBackgroundColor

      public void setBackgroundColor(Color backgroundColor)
      Sets the provided background color for a test's area NOTE: use NULL for a transparent background (if supported by a selected implementation) DEFAULT: Color.WHITE (PAdES visual appearance: allow null as text color, preventing graphic operators)
      Parameters:
      backgroundColor - Color to set
    • getText

      public String getText()
      Returns defines text content
      Returns:
      String text
    • setText

      public void setText(String text)
      Sets a text content parameter
      Parameters:
      text - String text to display
    • isEmpty

      public boolean isEmpty()
      Checks if the text property is set for the parameters
      Returns:
      TRUE if the text is defined, FALSE otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object