Package eu.europa.esig.dss.pades
Class SignatureImageTextParameters
java.lang.Object
eu.europa.esig.dss.pades.SignatureImageTextParameters
- All Implemented Interfaces:
Serializable
This class allows to custom text generation in the PAdES visible signature
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor instantiating object with default configuration -
Method Summary
Modifier and TypeMethodDescriptionReturns background color for the text's areagetFont()Returns specified text font If not defined, returns a Default Font instance (PTSerifRegular)floatReturns padding between text and its areaReturns a signer text horizontal alignment valueReturns a signer text position respectively to an imageReturns a signer text vertical alignment valuegetText()Returns defines text contentReturns text color parameterGetsTextWrappingbooleanisEmpty()Checks if the text property is set for the parametersvoidsetBackgroundColor(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)voidSets a text fontvoidsetPadding(float padding) Sets a padding between text and its areavoidsetSignerTextHorizontalAlignment(SignerTextHorizontalAlignment signerTextHorizontalAlignment) Allows a horizontal alignment of a text with respect to its areavoidsetSignerTextPosition(SignerTextPosition signerTextPosition) Specifies a text position respectively to an image inside the signature field areavoidsetSignerTextVerticalAlignment(SignerTextVerticalAlignment signerTextVerticalAlignment) Defines a vertical alignment (positioning) of signer text inside the signature fieldvoidSets a text content parametervoidsetTextColor(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)voidsetTextWrapping(TextWrapping textWrapping) Sets theTextWrappingparameter, defining a way the text will be generated Default : TextWrapping.FONT_BASED - text is generated based in the provideddssFontconfigurationtoString()
-
Constructor Details
-
SignatureImageTextParameters
public SignatureImageTextParameters()Default constructor instantiating object with default configuration
-
-
Method Details
-
getSignerTextPosition
Returns a signer text position respectively to an image- Returns:
SignerTextPosition
-
setSignerTextPosition
Specifies a text position respectively to an image inside the signature field area- Parameters:
signerTextPosition-SignerTextPosition(TOP, BOTTOM, RIGHT, LEFT)
-
getSignerTextVerticalAlignment
Returns a signer text vertical alignment value- Returns:
SignerTextVerticalAlignment
-
setSignerTextVerticalAlignment
Defines a vertical alignment (positioning) of signer text inside the signature field- Parameters:
signerTextVerticalAlignment-SignerTextVerticalAlignment(TOP, MIDDLE, BOTTOM)
-
getSignerTextHorizontalAlignment
Returns a signer text horizontal alignment value- Returns:
SignerTextHorizontalAlignment
-
setSignerTextHorizontalAlignment
public void setSignerTextHorizontalAlignment(SignerTextHorizontalAlignment signerTextHorizontalAlignment) Allows a horizontal alignment of a text with respect to its area- Parameters:
signerTextHorizontalAlignment-SignerTextHorizontalAlignment(LEFT, CENTER, RIGHT)
-
getFont
-
setFont
-
getTextWrapping
-
setTextWrapping
Sets theTextWrappingparameter, defining a way the text will be generated Default : TextWrapping.FONT_BASED - text is generated based in the provideddssFontconfiguration- Parameters:
textWrapping-TextWrapping
-
getPadding
public float getPadding()Returns padding between text and its area- Returns:
floatpadding value
-
setPadding
public void setPadding(float padding) Sets a padding between text and its area- Parameters:
padding-floatpadding value
-
getTextColor
-
setTextColor
-
getBackgroundColor
-
setBackgroundColor
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-Colorto set
-
getText
-
setText
-
isEmpty
public boolean isEmpty()Checks if the text property is set for the parameters- Returns:
- TRUE if the text is defined, FALSE otherwise
-
toString
-