Package net.codecrete.qrbill.generator
Class BillFormat
- java.lang.Object
-
- net.codecrete.qrbill.generator.BillFormat
-
- All Implemented Interfaces:
java.lang.Cloneable
public class BillFormat extends java.lang.Object implements java.lang.CloneableFormatting properties for QR bill
-
-
Constructor Summary
Constructors Constructor Description BillFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Objectclone()protected BillFormatcloneInstance()booleanequals(java.lang.Object o)java.lang.StringgetFontFamily()Gets the font family to be used for textGraphicsFormatgetGraphicsFormat()Gets the graphics format for the generated QR billLanguagegetLanguage()Gets the bill language.OutputSizegetOutputSize()Gets the output size for the generated QR billSeparatorTypegetSeparatorType()Gets the type of separator drawn above and between the payment part and the receiptinthashCode()voidsetFontFamily(java.lang.String fontFamily)Sets the font family to be used for textvoidsetGraphicsFormat(GraphicsFormat graphicsFormat)Sets the graphics format for the generated QR billvoidsetLanguage(Language language)Sets the bill languagevoidsetOutputSize(OutputSize outputSize)Sets the output size for the generated QR billvoidsetSeparatorType(SeparatorType separatorType)Sets the type of separator drawn above and between the payment part and the receiptjava.lang.StringtoString()
-
-
-
Method Detail
-
getOutputSize
public OutputSize getOutputSize()
Gets the output size for the generated QR billDefaults 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
-
getSeparatorType
public SeparatorType getSeparatorType()
Gets the type of separator drawn above and between the payment part and the receiptDefaults to
SeparatorType.SOLID_LINE_WITH_SCISSORS- Returns:
- separator type
-
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 textAccording 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 textAccording 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 billDefaults to SVG.
- Returns:
- graphics format
-
setGraphicsFormat
public void setGraphicsFormat(GraphicsFormat graphicsFormat)
Sets the graphics format for the generated QR bill- Parameters:
graphicsFormat- graphics format
-
clone
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
cloneInstance
protected BillFormat cloneInstance()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-