Package com.saperion.connector.options
Class WatermarkText
java.lang.Object
com.saperion.connector.options.WatermarkText
- All Implemented Interfaces:
Serializable
A text to use as watermark on a rendition.
- Author:
- cmerkel
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWatermarkText(String text) Creates a new watermark-text with the specified content.WatermarkText(String text, String fontName, int fontSize, int opacity, EnumSet<WatermarkTextStyle> styles) Creates a new watermark-text with the specified options. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintgetText()inthashCode()voidsetFontName(String fontName) voidsetFontSize(int fontSize) voidsetOpacity(int opacity) voidsetStyles(EnumSet<WatermarkTextStyle> styles) toString()
-
Constructor Details
-
WatermarkText
Creates a new watermark-text with the specified content. The other options default to:- fontName: Arial
- fontSize: 32
- opacity: 50
- styles: empty
- Parameters:
text- the content of the watermark-text
-
WatermarkText
public WatermarkText(String text, String fontName, int fontSize, int opacity, EnumSet<WatermarkTextStyle> styles) Creates a new watermark-text with the specified options.- Parameters:
text- the content of the textfontName- the name of the font to usefontSize- the font-size in pt to useopacity- the opacity of the watermarkstyles- the styles to use for the text
-
-
Method Details
-
getText
- Returns:
- the content of the text
-
getFontName
- Returns:
- the name of the font to use
-
setFontName
- Parameters:
fontName- the name of the font to use
-
getFontSize
public int getFontSize()- Returns:
- the size (in pt) of the text
-
setFontSize
public void setFontSize(int fontSize) - Parameters:
fontSize- the size (in pt) of the text
-
getOpacity
public int getOpacity()- Returns:
- the opacity of the text
-
setOpacity
public void setOpacity(int opacity) - Parameters:
opacity- the opacity of the text
-
getStyles
- Returns:
- the styles to use for the text
-
getStylesAsString
- Returns:
- the styles to use for the text as a comma-separated string or null if styles are not set
-
setStyles
- Parameters:
styles- the styles to use for the text
-
toString
-
equals
-
hashCode
public int hashCode()
-