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.Serializable
A 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 boolean
equals(java.lang.Object o)
java.lang.String
getFontName()
int
getFontSize()
int
getOpacity()
java.util.EnumSet<WatermarkTextStyle>
getStyles()
java.lang.String
getStylesAsString()
java.lang.String
getText()
int
hashCode()
void
setFontName(java.lang.String fontName)
void
setFontSize(int fontSize)
void
setOpacity(int opacity)
void
setStyles(java.util.EnumSet<WatermarkTextStyle> styles)
java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-