Class Watermark
- java.lang.Object
-
- com.cloudofficeprint.RenderElements.RenderElement
-
- com.cloudofficeprint.RenderElements.Watermark
-
public class Watermark extends RenderElement
-
-
Constructor Summary
Constructors Constructor Description Watermark(java.lang.String name, java.lang.String text)
Represents a watermark.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getColor()
java.lang.String
getFont()
java.lang.String
getHeight()
com.google.gson.JsonObject
getJSON()
java.lang.Float
getOpacity()
java.lang.Integer
getRotation()
java.util.Set<java.lang.String>
getTemplateTags()
java.lang.String
getWidth()
void
setColor(java.lang.String color)
Default :"silver".void
setFont(java.lang.String font)
Default : Calibri.void
setHeight(java.lang.String height)
Default : automatically determined by Cloud Office Print.void
setOpacity(java.lang.Float opacity)
Default: 1.void
setRotation(java.lang.Integer rotation)
Default : calculated to lie along the bottom-left to top-right diagonal.void
setWidth(java.lang.String width)
Default : automatically determined by Cloud Office Print.-
Methods inherited from class com.cloudofficeprint.RenderElements.RenderElement
getName, getValue, setName, setValue
-
-
-
-
Method Detail
-
getFont
public java.lang.String getFont()
- Returns:
- Font of the text.
-
setFont
public void setFont(java.lang.String font)
Default : Calibri.- Parameters:
font
- Font of the text.
-
getColor
public java.lang.String getColor()
- Returns:
- Color of the text, in CSS format.
-
setColor
public void setColor(java.lang.String color)
Default :"silver".- Parameters:
color
- Color of the text, in CSS format.
-
getWidth
public java.lang.String getWidth()
- Returns:
- Width to scale the watermark text to.
-
setWidth
public void setWidth(java.lang.String width)
Default : automatically determined by Cloud Office Print.- Parameters:
width
- Width + unit (px, pt, in, cm or em) e.g. : 10 cm.
-
getHeight
public java.lang.String getHeight()
- Returns:
- Height to scale the watermark text to.
-
setHeight
public void setHeight(java.lang.String height)
Default : automatically determined by Cloud Office Print.- Parameters:
height
- Height + unit (px, pt, in, cm or em) e.g. : 10 cm.
-
getOpacity
public java.lang.Float getOpacity()
- Returns:
- Opacity of the watermark text.
-
setOpacity
public void setOpacity(java.lang.Float opacity)
Default: 1.- Parameters:
opacity
- Opacity of the watermark text. Decimal between 0 and 1.
-
getRotation
public java.lang.Integer getRotation()
- Returns:
- Rotation of the watermark text (integer to be interpreted in degrees).
-
setRotation
public void setRotation(java.lang.Integer rotation)
Default : calculated to lie along the bottom-left to top-right diagonal.- Parameters:
rotation
- Rotation of the watermark text (integer to be interpreted in degrees).
-
getJSON
public com.google.gson.JsonObject getJSON()
- Specified by:
getJSON
in classRenderElement
- Returns:
- JSONObject with the tags for this element for the Cloud Office Print server.
-
getTemplateTags
public java.util.Set<java.lang.String> getTemplateTags()
- Specified by:
getTemplateTags
in classRenderElement
- Returns:
- An immutable set containing all available template tags this element can replace.
-
-