Class TextWatermark


  • public class TextWatermark
    extends ImageWatermark
    A TextWatermark represents a string of text to be used to watermark an underlying image.
    While actually applying the watermark effect, the styled text is converted to an image so that the effect is uniform.
    • Constructor Detail

      • TextWatermark

        public TextWatermark​(java.lang.String text)
      • TextWatermark

        public TextWatermark​(java.lang.String text,
                             Font font)
      • TextWatermark

        public TextWatermark​(Location position,
                             double orientation,
                             float opacity,
                             java.lang.String text,
                             Font font)
      • TextWatermark

        public TextWatermark​(int top,
                             int left,
                             double orientation,
                             float opacity,
                             java.lang.String text,
                             Font font)
      • TextWatermark

        public TextWatermark​(Location position,
                             java.lang.String text,
                             Font font)
      • TextWatermark

        public TextWatermark​(int top,
                             int left,
                             java.lang.String text,
                             Font font)
    • Method Detail

      • getText

        public java.lang.String getText()
      • setText

        public void setText​(java.lang.String text)
      • getFont

        public Font getFont()
      • setFont

        public void setFont​(Font font)
      • getImage

        public java.awt.image.BufferedImage getImage()
        Generates a transparent image representing the text of this watermark. Text in the image will abide by the font specifications.
        Overrides:
        getImage in class ImageWatermark
        Returns:
        the BufferedImage object thus produced
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Watermark
      • isVertical

        public boolean isVertical()
      • setVertical

        public void setVertical​(boolean vertical)