Class QRCode
- java.lang.Object
-
- com.cloudofficeprint.RenderElements.RenderElement
-
- com.cloudofficeprint.RenderElements.Codes.Code
-
- com.cloudofficeprint.RenderElements.Codes.QRCode
-
- Direct Known Subclasses:
EmailQRCode
,EventQRCode
,GeolocationQRCode
,MECardQRCode
,SMSQRCode
,TelephoneNumberQRCode
,URLQRCode
,VCardQRCode
,WifiQRCode
public class QRCode extends Code
This class is a subclass of Code and serves as a superclass for the different types of QR-codes. It contains all the styling options of the QR codes.
-
-
Constructor Summary
Constructors Constructor Description QRCode(java.lang.String name, java.lang.String type, java.lang.String value)
This class is a subclass of Code and serves as a superclass for the different types of QR-codes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
getAutoColor()
java.lang.String
getAutoColorDark()
java.lang.String
getAutoColorLight()
java.lang.String
getBackGroundImage()
java.lang.Double
getBackgroundImageAlpha()
java.lang.String
getColorDark()
java.lang.String
getColorLight()
java.lang.Integer
getDotScale()
java.lang.Integer
getHeightLogo()
com.google.gson.JsonObject
getJSON()
java.lang.String
getLogo()
java.lang.String
getLogoBackGroundColor()
java.lang.String
getPiBLColor()
java.lang.String
getPiColor()
java.lang.String
getPiTLColor()
java.lang.String
getPiTRColor()
java.lang.String
getPoBLColor()
java.lang.String
getPoColor()
java.lang.String
getPoTLColor()
java.lang.String
getPoTRColor()
java.lang.Integer
getQuietZone()
java.lang.String
getQuietZoneColor()
java.lang.String
getTimingColor()
java.lang.String
getTimingHColor()
java.lang.String
getTimingVColor()
java.lang.Integer
getWidthLogo()
void
setAutoColor(java.lang.Boolean autoColor)
void
setAutoColorDark(java.lang.String autoColorDark)
void
setAutoColorLight(java.lang.String autoColorLight)
void
setBackGroundImage(java.lang.String backGroundImage)
void
setBackgroundImageAlpha(java.lang.Double backgroundImageAlpha)
void
setBackGroundImageFromLocalFile(java.lang.String filePath)
Sets the background image of the QR code to the given image from the path.void
setColorDark(java.lang.String colorDark)
void
setColorLight(java.lang.String colorLight)
void
setDotScale(java.lang.Integer dotScale)
void
setHeightLogo(java.lang.Integer heightLogo)
void
setLogo(java.lang.String logo)
void
setLogoBackGroundColor(java.lang.String logoBackGroundColor)
void
setLogoFromLocalFile(java.lang.String filePath)
Sets the logo to the given image from the path.void
setPiBLColor(java.lang.String piBLColor)
void
setPiColor(java.lang.String piColor)
void
setPiTLColor(java.lang.String piTLColor)
void
setPiTRColor(java.lang.String piTRColor)
void
setPoBLColor(java.lang.String poBLColor)
void
setPoColor(java.lang.String poColor)
void
setPoTLColor(java.lang.String poTLColor)
void
setPoTRColor(java.lang.String poTRColor)
void
setQuietZone(java.lang.Integer quietZone)
void
setQuietZoneColor(java.lang.String quietZoneColor)
void
setTimingColor(java.lang.String timingColor)
void
setTimingHColor(java.lang.String timingHColor)
void
setTimingVColor(java.lang.String timingVColor)
void
setWidthLogo(java.lang.Integer widthLogo)
-
Methods inherited from class com.cloudofficeprint.RenderElements.Codes.Code
getTemplateTags, getType, setType
-
Methods inherited from class com.cloudofficeprint.RenderElements.RenderElement
getName, getValue, setName, setValue
-
-
-
-
Constructor Detail
-
QRCode
public QRCode(java.lang.String name, java.lang.String type, java.lang.String value)
This class is a subclass of Code and serves as a superclass for the different types of QR-codes. It contains all the styling options of the QR codes.- Parameters:
name
- Name of this code for the tag.type
- Type of code required. The options can be found on: http://www.cloudofficeprint.com/docs/#barcode-qrcode-tagsvalue
- Data to create the code from.
-
-
Method Detail
-
getDotScale
public java.lang.Integer getDotScale()
- Returns:
- For body block, must be greater than 0, less than or equal to 1. default is 1.
-
setDotScale
public void setDotScale(java.lang.Integer dotScale)
- Parameters:
dotScale
- For body block, must be greater than 0, less than or equal to 1. default is 1
-
getLogo
public java.lang.String getLogo()
- Returns:
- Logo image of the QR code base64 or URL.
-
setLogo
public void setLogo(java.lang.String logo)
- Parameters:
logo
- Logo image of the QR code, base64 or URL.
-
setLogoFromLocalFile
public void setLogoFromLocalFile(java.lang.String filePath) throws java.io.IOException
Sets the logo to the given image from the path.- Parameters:
filePath
- Path of the local file.- Throws:
java.io.IOException
- If file not found.
-
getBackGroundImage
public java.lang.String getBackGroundImage()
- Returns:
- Background image of the QR code, base64 or URL.
-
setBackGroundImage
public void setBackGroundImage(java.lang.String backGroundImage)
- Parameters:
backGroundImage
- Background image of the QR code, base64 or URL.
-
setBackGroundImageFromLocalFile
public void setBackGroundImageFromLocalFile(java.lang.String filePath) throws java.io.IOException
Sets the background image of the QR code to the given image from the path.- Parameters:
filePath
- Path of the local file.- Throws:
java.io.IOException
- If file not found.
-
getColorDark
public java.lang.String getColorDark()
- Returns:
- Dark color of the QR code.
-
setColorDark
public void setColorDark(java.lang.String colorDark)
- Parameters:
colorDark
- Dark color of the QR code.
-
getColorLight
public java.lang.String getColorLight()
- Returns:
- Light color of the QR code.
-
setColorLight
public void setColorLight(java.lang.String colorLight)
- Parameters:
colorLight
- Light color of the QR code.
-
getWidthLogo
public java.lang.Integer getWidthLogo()
- Returns:
- Width of the logo in px.
-
setWidthLogo
public void setWidthLogo(java.lang.Integer widthLogo)
- Parameters:
widthLogo
- Width of the logo in px.
-
getHeightLogo
public java.lang.Integer getHeightLogo()
- Returns:
- Height of the logo in px.
-
setHeightLogo
public void setHeightLogo(java.lang.Integer heightLogo)
- Parameters:
heightLogo
- Height of the logo in px.
-
getLogoBackGroundColor
public java.lang.String getLogoBackGroundColor()
- Returns:
- Background color of the QR code.
-
setLogoBackGroundColor
public void setLogoBackGroundColor(java.lang.String logoBackGroundColor)
- Parameters:
logoBackGroundColor
- Background color of the QR code.
-
getQuietZone
public java.lang.Integer getQuietZone()
- Returns:
- Padding around the QR code.
-
setQuietZone
public void setQuietZone(java.lang.Integer quietZone)
- Parameters:
quietZone
- Padding around the QR code.
-
getQuietZoneColor
public java.lang.String getQuietZoneColor()
- Returns:
- Color of the padding area.
-
setQuietZoneColor
public void setQuietZoneColor(java.lang.String quietZoneColor)
- Parameters:
quietZoneColor
- Color of the padding area.
-
getBackgroundImageAlpha
public java.lang.Double getBackgroundImageAlpha()
- Returns:
- Background image transparency, value between 0 and 1. default is 1
-
setBackgroundImageAlpha
public void setBackgroundImageAlpha(java.lang.Double backgroundImageAlpha)
- Parameters:
backgroundImageAlpha
- Background image transparency, value between 0 and 1. default is 1
-
getPoColor
public java.lang.String getPoColor()
- Returns:
- Global Position Outer color. If not set, the defaut is `colorDark`.
-
setPoColor
public void setPoColor(java.lang.String poColor)
- Parameters:
poColor
- Global Position Inner color. If not set, the defaut is `colorDark`.
-
getPiColor
public java.lang.String getPiColor()
- Returns:
- Position Inner color - Top Left.
-
setPiColor
public void setPiColor(java.lang.String piColor)
- Parameters:
piColor
- Position Inner color - Top Left.
-
getPoTLColor
public java.lang.String getPoTLColor()
- Returns:
- Position Outer color - Top Left.
-
setPoTLColor
public void setPoTLColor(java.lang.String poTLColor)
- Parameters:
poTLColor
- Position Outer color - Top Left.
-
getPiTLColor
public java.lang.String getPiTLColor()
- Returns:
- Position Inner color - Top Left.
-
setPiTLColor
public void setPiTLColor(java.lang.String piTLColor)
- Parameters:
piTLColor
- Position Inner color - Top Left.
-
getPoTRColor
public java.lang.String getPoTRColor()
- Returns:
- Position Outer color - Top Right.
-
setPoTRColor
public void setPoTRColor(java.lang.String poTRColor)
- Parameters:
poTRColor
- Position Outer color - Top Right.
-
getPiTRColor
public java.lang.String getPiTRColor()
- Returns:
- Position Inner color - Top Right.
-
setPiTRColor
public void setPiTRColor(java.lang.String piTRColor)
- Parameters:
piTRColor
- Position Inner color - Top Right.
-
getPoBLColor
public java.lang.String getPoBLColor()
- Returns:
- Position Outer color - Bottom Left.
-
setPoBLColor
public void setPoBLColor(java.lang.String poBLColor)
- Parameters:
poBLColor
- Position Outer color - Bottom Left.
-
getPiBLColor
public java.lang.String getPiBLColor()
- Returns:
- Position Inner color - Bottom Left.
-
setPiBLColor
public void setPiBLColor(java.lang.String piBLColor)
- Parameters:
piBLColor
- Position Inner color - Bottom Left.
-
getTimingVColor
public java.lang.String getTimingVColor()
- Returns:
- Vertical timing color.
-
setTimingVColor
public void setTimingVColor(java.lang.String timingVColor)
- Parameters:
timingVColor
- Vertical timing color.
-
getTimingHColor
public java.lang.String getTimingHColor()
- Returns:
- Horizontal timing color.
-
setTimingHColor
public void setTimingHColor(java.lang.String timingHColor)
- Parameters:
timingHColor
- Horizontal timing color.
-
getTimingColor
public java.lang.String getTimingColor()
- Returns:
- Global timing color.
-
setTimingColor
public void setTimingColor(java.lang.String timingColor)
- Parameters:
timingColor
- Global timing color.
-
getAutoColor
public java.lang.Boolean getAutoColor()
- Returns:
- Automatic color adjustment(for data block) (default is false) (set to false if using background images).
-
setAutoColor
public void setAutoColor(java.lang.Boolean autoColor)
- Parameters:
autoColor
- Automatic color adjustment(for data block) (default is false) (set to false if using background images).
-
getAutoColorDark
public java.lang.String getAutoColorDark()
- Returns:
- Automatic color: dark CSS color (only required when qr_auto_color is set true) (dark color preferred, otherwise may lead to undetectable QR).
-
setAutoColorDark
public void setAutoColorDark(java.lang.String autoColorDark)
- Parameters:
autoColorDark
- Automatic color: dark CSS color (only required when qr_auto_color is set true) (dark color preferred, otherwise may lead to undetectable QR).
-
getAutoColorLight
public java.lang.String getAutoColorLight()
- Returns:
- Automatic color: light CSS color (only required when qr_auto_color is set true).
-
setAutoColorLight
public void setAutoColorLight(java.lang.String autoColorLight)
- Parameters:
autoColorLight
- Automatic color: light CSS color (only required when qr_auto_color is set true).
-
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.
-
-