Package eu.europa.esig.dss.pades
Class SignatureImageTextParameters
java.lang.Object
eu.europa.esig.dss.pades.SignatureImageTextParameters
public class SignatureImageTextParameters extends Object
This class allows to custom text generation in the PAdES visible signature
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SignatureImageTextParameters.SignerTextHorizontalAlignment
Enum to define the more line text horizontal alignmentstatic class
SignatureImageTextParameters.SignerTextPosition
Enum to define where to add a signer text inside a signature field relatively to an imagestatic class
SignatureImageTextParameters.SignerTextVerticalAlignment
Enum to define image from text vertical alignment in connection with the image -
Constructor Summary
Constructors Constructor Description SignatureImageTextParameters()
-
Method Summary
Modifier and Type Method Description Color
getBackgroundColor()
Returns background color for the text's areaDSSFont
getFont()
Returns specified text fontfloat
getPadding()
Returns padding between text and its areaSignatureImageTextParameters.SignerTextHorizontalAlignment
getSignerTextHorizontalAlignment()
Returns a signer text horizontal alignment valueSignatureImageTextParameters.SignerTextPosition
getSignerTextPosition()
Returns a signer text position respectively to an imageSignatureImageTextParameters.SignerTextVerticalAlignment
getSignerTextVerticalAlignment()
Returns a signer text vertical alignment valueString
getText()
Returns defines text contentColor
getTextColor()
Returns text color parametervoid
setBackgroundColor(Color backgroundColor)
Sets the provided background color for a test's areavoid
setFont(DSSFont dssFont)
Sets a text fontvoid
setPadding(float padding)
Sets a padding between text and its areavoid
setSignerTextHorizontalAlignment(SignatureImageTextParameters.SignerTextHorizontalAlignment signerTextHorizontalAlignment)
Allows a horizontal alignment of a text with respect to its areavoid
setSignerTextPosition(SignatureImageTextParameters.SignerTextPosition signerTextPosition)
Specifies a text position respectively to an image inside the signature field areavoid
setSignerTextVerticalAlignment(SignatureImageTextParameters.SignerTextVerticalAlignment signerTextVerticalAlignment)
Defines a vertical alignment (positioning) of signer text inside the signature fieldvoid
setSize(int size)
Sets a size for a text.void
setText(String text)
Sets a text content parametervoid
setTextColor(Color textColor)
Sets color for the text
-
Constructor Details
-
SignatureImageTextParameters
public SignatureImageTextParameters()
-
-
Method Details
-
getSignerTextPosition
Returns a signer text position respectively to an image -
setSignerTextPosition
public void setSignerTextPosition(SignatureImageTextParameters.SignerTextPosition signerTextPosition)Specifies a text position respectively to an image inside the signature field area- Parameters:
signerTextPosition
-SignatureImageTextParameters.SignerTextPosition
(TOP, BOTTOM, RIGHT, LEFT)
-
getSignerTextVerticalAlignment
Returns a signer text vertical alignment value -
setSignerTextVerticalAlignment
public void setSignerTextVerticalAlignment(SignatureImageTextParameters.SignerTextVerticalAlignment signerTextVerticalAlignment)Defines a vertical alignment (positioning) of signer text inside the signature field- Parameters:
signerTextVerticalAlignment
-SignatureImageTextParameters.SignerTextVerticalAlignment
(TOP, MIDDLE, BOTTOM)
-
getSignerTextHorizontalAlignment
public SignatureImageTextParameters.SignerTextHorizontalAlignment getSignerTextHorizontalAlignment()Returns a signer text horizontal alignment value -
setSignerTextHorizontalAlignment
public void setSignerTextHorizontalAlignment(SignatureImageTextParameters.SignerTextHorizontalAlignment signerTextHorizontalAlignment)Allows a horizontal alignment of a text with respect to its area- Parameters:
signerTextHorizontalAlignment
-SignatureImageTextParameters.SignerTextHorizontalAlignment
(LEFT, CENTER, RIGHT)
-
getFont
Returns specified text font- Returns:
DSSFont
-
setFont
Sets a text font- Parameters:
dssFont
-DSSFont
-
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
Returns text color parameter- Returns:
Color
-
setTextColor
Sets color for the text- Parameters:
textColor
-Color
to set
-
getBackgroundColor
Returns background color for the text's area- Returns:
Color
of the text area background
-
setBackgroundColor
Sets the provided background color for a test's area- Parameters:
backgroundColor
-Color
to set
-
getText
Returns defines text content- Returns:
String
text
-
setText
Sets a text content parameter- Parameters:
text
-String
text to display
-
setSize
public void setSize(int size)Sets a size for a text. Note: overrides values defined insetFont(DSSFont dssFont)
method!- Parameters:
size
-int
size
-