Package com.saperion.connector.options
Class WatermarkText
- java.lang.Object
-
- com.saperion.connector.options.WatermarkText
-
- All Implemented Interfaces:
java.io.Serializable
public class WatermarkText extends java.lang.Object implements java.io.SerializableA text to use as watermark on a rendition.- Author:
- cmerkel
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WatermarkText(java.lang.String text)Creates a new watermark-text with the specified content.WatermarkText(java.lang.String text, java.lang.String fontName, int fontSize, int opacity, java.util.EnumSet<WatermarkTextStyle> styles)Creates a new watermark-text with the specified options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetFontName()intgetFontSize()intgetOpacity()java.util.EnumSet<WatermarkTextStyle>getStyles()java.lang.StringgetStylesAsString()java.lang.StringgetText()inthashCode()voidsetFontName(java.lang.String fontName)voidsetFontSize(int fontSize)voidsetOpacity(int opacity)voidsetStyles(java.util.EnumSet<WatermarkTextStyle> styles)java.lang.StringtoString()
-
-
-
Constructor Detail
-
WatermarkText
public WatermarkText(java.lang.String text)
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(java.lang.String text, java.lang.String fontName, int fontSize, int opacity, java.util.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 Detail
-
getText
public java.lang.String getText()
- Returns:
- the content of the text
-
getFontName
public java.lang.String getFontName()
- Returns:
- the name of the font to use
-
setFontName
public void setFontName(java.lang.String fontName)
- 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
public java.util.EnumSet<WatermarkTextStyle> getStyles()
- Returns:
- the styles to use for the text
-
getStylesAsString
public java.lang.String getStylesAsString()
- Returns:
- the styles to use for the text as a comma-separated string or null if styles are not set
-
setStyles
public void setStyles(java.util.EnumSet<WatermarkTextStyle> styles)
- Parameters:
styles- the styles to use for the text
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-