Class QRCode

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, Serializable

    public class QRCode
    extends AbstractBarcodeEncoder
    Draws a QR code at a specified location and size.



    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -x <int> (property: x)
        X position of the top-left corner.
        default: 1
        minimum: 1
     
    -y <int> (property: y)
        Y position of the top-left corner.
        default: 1
        minimum: 1
     
    -width <int> (property: width)
        Width of the barcode in pixels.
        default: 100
        minimum: 1
     
    -height <int> (property: height)
        Height of the barcode in pixels.
        default: 100
        minimum: 1
     
    -margin <int> (property: margin)
        White margin surrounding the barcode.
        default: 5
        minimum: 0
     
    -text <java.lang.String> (property: text)
        Text to be encoded.
        default: foobar
     
    -errorCorrectionLevel <L|M|Q|H> (property: errorCorrectionLevel)
        Error correction level.
        default: L
     
    Version:
    $Revision$
    Author:
    lx51 (lx51 at students dot waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_ErrorCorrectionLevel

        protected com.google.zxing.qrcode.decoder.ErrorCorrectionLevel m_ErrorCorrectionLevel
        Error correction level.
      • m_Text

        protected String m_Text
        Text to be encoded.
    • Constructor Detail

      • QRCode

        public QRCode()
    • Method Detail

      • getText

        public String getText()
        Returns the text to be encoded in the QR code.
        Returns:
        the text
      • setText

        public void setText​(String value)
        Sets the text to be encoded in the QR code.
        Parameters:
        value - the text
      • textTipText

        public String textTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setErrorCorrectionLevel

        public void setErrorCorrectionLevel​(com.google.zxing.qrcode.decoder.ErrorCorrectionLevel value)
        Returns the error correction level of the QR code.
        Parameters:
        value - the error correction level
      • getErrorCorrectionLevel

        public com.google.zxing.qrcode.decoder.ErrorCorrectionLevel getErrorCorrectionLevel()
        Sets the error correction level of the QR code.
        Returns:
        the error correction level
      • errorCorrectionLevelTipText

        public String errorCorrectionLevelTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.