Class QRCode

    • 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-tags
        value - 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 class RenderElement
        Returns:
        JSONObject with the tags for this element for the Cloud Office Print server.