Class BillFormat

  • All Implemented Interfaces:
    java.io.Serializable

    public class BillFormat
    extends java.lang.Object
    implements java.io.Serializable
    Formatting properties for QR bill
    See Also:
    Serialized Form
    • Constructor Detail

      • BillFormat

        public BillFormat()
        Creates a new instance with default values
      • BillFormat

        public BillFormat​(BillFormat format)
        Copy constructor: creates a copy of the specified format
        Parameters:
        format - format to copy
    • Method Detail

      • getOutputSize

        public OutputSize getOutputSize()
        Gets the output size for the generated QR bill

        Defaults to OutputSize.QR_BILL_ONLY, i.e. the QR bill only (about 105 by 210 mm)

        Returns:
        output size
      • setOutputSize

        public void setOutputSize​(OutputSize outputSize)
        Sets the output size for the generated QR bill
        Parameters:
        outputSize - output size
      • getLanguage

        public Language getLanguage()
        Gets the bill language.

        Defaults to EN (English).

        Returns:
        the language
      • setLanguage

        public void setLanguage​(Language language)
        Sets the bill language
        Parameters:
        language - the language
      • setSeparatorType

        public void setSeparatorType​(SeparatorType separatorType)
        Sets the type of separator drawn above and between the payment part and the receipt
        Parameters:
        separatorType - separator type
      • getFontFamily

        public java.lang.String getFontFamily()
        Gets the font family to be used for text

        According to the implementation guidelines Arial, Frutiger, Helvetica and Liberation Sans are the only permitted fonts.

        Two styles of the font are used: normal/regular and bold.

        Defaults to "Helvetica".

        Returns:
        font family name
      • setFontFamily

        public void setFontFamily​(java.lang.String fontFamily)
        Sets the font family to be used for text

        According to the implementation guidelines Arial, Frutiger, Helvetica and Liberation Sans are the only permitted fonts. However, any string is accepted as the font name might be more elaborate such as "Frutiger 55 Regular".

        Two styles of the font are used: normal/regular and bold.

        Defaults to "Helvetica".

        Parameters:
        fontFamily - font family name
      • getGraphicsFormat

        public GraphicsFormat getGraphicsFormat()
        Gets the graphics format for the generated QR bill

        Defaults to SVG.

        Returns:
        graphics format
      • setGraphicsFormat

        public void setGraphicsFormat​(GraphicsFormat graphicsFormat)
        Sets the graphics format for the generated QR bill
        Parameters:
        graphicsFormat - graphics format
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object