Class WatermarkText

java.lang.Object
com.saperion.connector.options.WatermarkText
All Implemented Interfaces:
Serializable

public class WatermarkText extends Object implements Serializable
A text to use as watermark on a rendition.
Author:
cmerkel
See Also:
  • Constructor Details

    • WatermarkText

      public WatermarkText(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(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 text
      fontName - the name of the font to use
      fontSize - the font-size in pt to use
      opacity - the opacity of the watermark
      styles - the styles to use for the text
  • Method Details

    • getText

      public String getText()
      Returns:
      the content of the text
    • getFontName

      public String getFontName()
      Returns:
      the name of the font to use
    • setFontName

      public void setFontName(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 EnumSet<WatermarkTextStyle> getStyles()
      Returns:
      the styles to use for the text
    • getStylesAsString

      public 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(EnumSet<WatermarkTextStyle> styles)
      Parameters:
      styles - the styles to use for the text
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object