DynamicPDF by ceTe Software

com.cete.dynamicpdf.pageelements
Class TextWatermark

java.lang.Object
  extended by com.cete.dynamicpdf.PageElement
      extended by com.cete.dynamicpdf.pageelements.TaggablePageElement
          extended by com.cete.dynamicpdf.pageelements.Watermark
              extended by com.cete.dynamicpdf.pageelements.TextWatermark
All Implemented Interfaces:
IAnnotation

public class TextWatermark
extends Watermark

This class can be used to place a TextWatermark on the page.

Licensing:
This is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:

View Example


Constructor Summary
TextWatermark(java.lang.String text)
          Creates a new instance of TextWatermark.
TextWatermark(java.lang.String text, Font font)
          Creates a new instance of TextWatermark.
TextWatermark(java.lang.String text, Font font, float fontSize)
          Creates a new instance of TextWatermark.
 
Method Summary
 void draw(PageWriter writer)
          Draws the Text Watermark to the given PageWriter object.
 void drawAnnotation(DocumentWriter writer)
          Draws the Text Watermark to the given DocumentWriter object.
 boolean getAutoScale()
          Gets the Auto Scale property of the watermark.
 Font getFont()
          Gets the Font object to use for the text of the watermark.
 float getFontSize()
          Gets the font size for the text of the watermark.
 int getScalingPercentage()
          Gets the Scaling Percentage of the watermark.
 boolean getStrikethrough()
          Gets the strikeThrough for the text outline of the watermark..
 java.lang.String getText()
          Gets the Text of the watermark.
 Color getTextColor()
          Gets the Color object to use for the text of the watermark.
 Color getTextOutlineColor()
          Gets the Color object to use for the text outline of the watermark.
 float getTextOutlineWidth()
          Gets the line width to use for the text outline of the watermark..
 boolean getUnderline()
          Gets a value indicating if the watermark is underlined.
 void setAutoScale(boolean value)
          Sets the Auto Scale property of the watermark.
 void setFont(Font value)
          Sets the Font object to use for the text of the watermark.
 void setFontSize(float value)
          Sets the font size for the text of the watermark.
 void setScalingPercentage(int value)
          Sets the Scaling Percentage of the watermark.
 void setStrikethrough(boolean value)
          Sets the strikeThrough for the text outline of the watermark..
 void setText(java.lang.String value)
          Sets the Text of the watermark.
 void setTextColor(Color value)
          Sets the Color object to use for the text of the watermark.
 void setTextOutlineColor(Color value)
          Sets the Color object to use for the text outline of the watermark.
 void setTextOutlineWidth(float value)
          Sets the line width to use for the text outline of the watermark..
 void setUnderline(boolean value)
          Sets a value indicating if the watermark is underlined.
 
Methods inherited from class com.cete.dynamicpdf.pageelements.Watermark
getAlternateName, getAngle, getName, getOpacity, getPosition, getXOffset, getYOffset, setAlternateName, setAngle, setName, setOpacity, setPosition, setXOffset, setYOffset
 
Methods inherited from class com.cete.dynamicpdf.pageelements.TaggablePageElement
getTag, getTagOrder, setTag, setTagOrder
 
Methods inherited from class com.cete.dynamicpdf.PageElement
getRequiredLicenseLevel, getStrID, setRequiredLicenseLevel, setStrID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextWatermark

public TextWatermark(java.lang.String text)
Creates a new instance of TextWatermark.

Parameters:
text - Text to display in the textWatermark.

TextWatermark

public TextWatermark(java.lang.String text,
                     Font font)
Creates a new instance of TextWatermark.

Parameters:
text - Text to display in the textWatermark.
font - Font for the text of the textWatermark.

TextWatermark

public TextWatermark(java.lang.String text,
                     Font font,
                     float fontSize)
Creates a new instance of TextWatermark.

Parameters:
text - Text to display in the textWatermark.
font - Font for the text of the textWatermark.
fontSize - Font size of the text of the textWatermark.
Method Detail

getText

public java.lang.String getText()
Gets the Text of the watermark.

Returns:
the Text of the watermark.

setText

public void setText(java.lang.String value)
Sets the Text of the watermark.

Parameters:
value - the Text of the watermark.

getFont

public Font getFont()
Gets the Font object to use for the text of the watermark.

Returns:
the text font of the watermark.
See Also:
Font

setFont

public void setFont(Font value)
Sets the Font object to use for the text of the watermark.

Parameters:
value - the text font of the watermark.
See Also:
Font

getFontSize

public float getFontSize()
Gets the font size for the text of the watermark.

Returns:
the font size for the text of the watermark.

setFontSize

public void setFontSize(float value)
Sets the font size for the text of the watermark.

Parameters:
value - the font size for the text of the watermark.

getScalingPercentage

public int getScalingPercentage()
Gets the Scaling Percentage of the watermark.

Returns:
the Scaling Percentage of the watermark.

setScalingPercentage

public void setScalingPercentage(int value)
Sets the Scaling Percentage of the watermark.

Parameters:
value - the Scaling Percentage of the watermark.

getAutoScale

public boolean getAutoScale()
Gets the Auto Scale property of the watermark.

Returns:
the Auto Scale property of the watermark.

setAutoScale

public void setAutoScale(boolean value)
Sets the Auto Scale property of the watermark.

Parameters:
value - the Auto Scale property of the watermark.

getTextColor

public Color getTextColor()
Gets the Color object to use for the text of the watermark.

Returns:
the text color of the watermark.
See Also:
Color

setTextColor

public void setTextColor(Color value)
Sets the Color object to use for the text of the watermark.

Parameters:
value - the text color of the watermark.
See Also:
Color

getTextOutlineColor

public Color getTextOutlineColor()
Gets the Color object to use for the text outline of the watermark.

Returns:
the text color of the text outline of the watermark.
See Also:
Color

setTextOutlineColor

public void setTextOutlineColor(Color value)
Sets the Color object to use for the text outline of the watermark.

Parameters:
value - the text color of the text outline of the watermark.
See Also:
Color

getTextOutlineWidth

public float getTextOutlineWidth()
Gets the line width to use for the text outline of the watermark..

Returns:
the text width of the text outline of the watermark.

setTextOutlineWidth

public void setTextOutlineWidth(float value)
Sets the line width to use for the text outline of the watermark..

Parameters:
value - the text width of the text outline of the watermark.

getStrikethrough

public boolean getStrikethrough()
Gets the strikeThrough for the text outline of the watermark..

Returns:
the strikeThrough of the text outline of the watermark.

setStrikethrough

public void setStrikethrough(boolean value)
Sets the strikeThrough for the text outline of the watermark..

Parameters:
value - the strikeThrough of the text outline of the watermark.

getUnderline

public boolean getUnderline()
Gets a value indicating if the watermark is underlined.

Returns:
underline property of the watermark.

setUnderline

public void setUnderline(boolean value)
Sets a value indicating if the watermark is underlined.

Parameters:
value - underline property of the watermark.

draw

public void draw(PageWriter writer)
Draws the Text Watermark to the given PageWriter object.

Overrides:
draw in class Watermark
Parameters:
writer - PageWriter object to receive the Text Watermark's output.
See Also:
PageWriter

drawAnnotation

public void drawAnnotation(DocumentWriter writer)
Draws the Text Watermark to the given DocumentWriter object.

Specified by:
drawAnnotation in interface IAnnotation
Overrides:
drawAnnotation in class Watermark
Parameters:
writer - DocumentWriter object to receive the Text Watermark's output.
See Also:
DocumentWriter

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.04 for Java generated on September 25, 2019
© Copyright 2019, ceTe Software