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 classSignatureImageTextParameters.SignerTextHorizontalAlignmentEnum to define the more line text horizontal alignmentstatic classSignatureImageTextParameters.SignerTextPositionEnum to define where to add a signer text inside a signature field relatively to an imagestatic classSignatureImageTextParameters.SignerTextVerticalAlignmentEnum 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 ColorgetBackgroundColor()Returns background color for the text's areaDSSFontgetFont()Returns specified text fontfloatgetPadding()Returns padding between text and its areaSignatureImageTextParameters.SignerTextHorizontalAlignmentgetSignerTextHorizontalAlignment()Returns a signer text horizontal alignment valueSignatureImageTextParameters.SignerTextPositiongetSignerTextPosition()Returns a signer text position respectively to an imageSignatureImageTextParameters.SignerTextVerticalAlignmentgetSignerTextVerticalAlignment()Returns a signer text vertical alignment valueStringgetText()Returns defines text contentColorgetTextColor()Returns text color parametervoidsetBackgroundColor(Color backgroundColor)Sets the provided background color for a test's areavoidsetFont(DSSFont dssFont)Sets a text fontvoidsetPadding(float padding)Sets a padding between text and its areavoidsetSignerTextHorizontalAlignment(SignatureImageTextParameters.SignerTextHorizontalAlignment signerTextHorizontalAlignment)Allows a horizontal alignment of a text with respect to its areavoidsetSignerTextPosition(SignatureImageTextParameters.SignerTextPosition signerTextPosition)Specifies a text position respectively to an image inside the signature field areavoidsetSignerTextVerticalAlignment(SignatureImageTextParameters.SignerTextVerticalAlignment signerTextVerticalAlignment)Defines a vertical alignment (positioning) of signer text inside the signature fieldvoidsetSize(int size)Sets a size for a text.voidsetText(String text)Sets a text content parametervoidsetTextColor(Color textColor)Sets color for the text
-
-
-
Method Detail
-
getSignerTextPosition
public SignatureImageTextParameters.SignerTextPosition 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
public SignatureImageTextParameters.SignerTextVerticalAlignment 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)
-
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
-
setTextColor
public void setTextColor(Color textColor)
Sets color for the text- Parameters:
textColor-Colorto set
-
getBackgroundColor
public Color getBackgroundColor()
Returns background color for the text's area- Returns:
Colorof the text area background
-
setBackgroundColor
public void setBackgroundColor(Color backgroundColor)
Sets the provided background color for a test's area- Parameters:
backgroundColor-Colorto set
-
setText
public void setText(String text)
Sets a text content parameter- Parameters:
text-Stringtext to display
-
setSize
public void setSize(int size)
Sets a size for a text. Note: overrides values defined insetFont(DSSFont dssFont)method!- Parameters:
size-intsize
-
-