Class 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 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 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 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 class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object