|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.java4less.j4lqrcode.QRCode
public class QRCode
This class creates QR Code symbols
Barcodes can be created with the following code:
QRCode barcode=new QRCode();
barcode.setCode("ABC");
You can paint the barcode using the QRCodeCanvas object or call the paint()
method which returns the barcode as an array of integers.
Field Summary | |
---|---|
static int |
CORRECTION_LEVEL_H
|
static int |
CORRECTION_LEVEL_L
|
static int |
CORRECTION_LEVEL_M
|
static int |
CORRECTION_LEVEL_Q
|
static int |
ENC_ALPHA
|
static int |
ENC_AUTO
|
static int |
ENC_BYTE
|
static int |
ENC_KANJI
|
static int |
ENC_NUMERIC
|
static int |
FNC1_MODE_FIRST
|
static int |
FNC1_MODE_NO
|
static int |
FNC1_MODE_SECOND
|
Constructor Summary | |
---|---|
QRCode()
|
Method Summary | |
---|---|
byte |
getApplicationIndicator()
application indicator if Fnc1Mode is FNC1_MODE_SECOND |
boolean |
getAutoConfigurate()
allow automatic selection of a larger configuration (than the preferred) if code is too large. |
java.lang.String |
getCode()
text to be painted as barcode. |
int[] |
getCodeBinary()
bytes to be painted as barcode. |
int |
getECI()
Extended Channel Interpretation. |
int |
getEncoding()
Encoding mode (default is AUTO). |
int |
getErrorCorrectionLevel()
Error correction level. |
int |
getFnc1Mode()
get FNC1 mode (FNC1_MODE_NO, FNC1_MODE_FIRST or FNC1_MODE_SECOND) |
java.lang.String |
getName()
Returns "QRCode". |
int |
getPreferredVersion()
use this configuration if possible. |
boolean |
getProcessTilde()
process tilde. |
boolean |
getRedraw()
Redraw symbol |
boolean |
getStructuredAppend()
activate structured append |
int |
getStructuredAppendCounter()
number of symbols in structured append (value 1 to 16) |
int |
getStructuredAppendIndex()
current symbol in structured append (value 1 to 16) |
int[][] |
paint()
paints the symbol and return array of pixels (0-white, 1-black) |
void |
setApplicationIndicator(byte b)
application indicator if Fnc1Mode is FNC1_MODE_SECOND |
void |
setAutoConfigurate(boolean pt)
allow automatic selection of a larger configuration (than the preferred) if code is too large. |
void |
setCode(int[] c)
bytes to be painted as barcode. |
void |
setCode(java.lang.String c)
text to be painted as barcode. |
void |
setECI(int v)
Extended Channel Interpretation. |
void |
setEncoding(int d)
Encoding mode (default is AUTO). |
void |
setErrorCorrectionLevel(int d)
Error correction level. |
void |
setFnc1Mode(int mode)
sets the FNC1 mode (FNC1_MODE_NO, FNC1_MODE_FIRST or FNC1_MODE_SECOND) |
void |
setPreferredVersion(int r)
use this configuration if possible. |
void |
setProcessTilde(boolean pt)
process tilde. if true (default) the tilde character (~) will be processed like this: ~~: will be replaced with ~ ~dxxx: will be replaced by the character whose ascii code is xxx. |
void |
setRedraw(boolean b)
Redraw symbol. |
void |
setStructuredAppend(boolean b)
activate structured append |
void |
setStructuredAppendCounter(int i)
number of symbols in structured append (value 1 to 16) |
void |
setStructuredAppendIndex(int i)
current symbol in structured append (value 1 to 16) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ENC_ALPHA
public static final int ENC_BYTE
public static final int ENC_NUMERIC
public static final int ENC_KANJI
public static final int ENC_AUTO
public static final int FNC1_MODE_NO
public static final int FNC1_MODE_FIRST
public static final int FNC1_MODE_SECOND
public static int CORRECTION_LEVEL_L
public static int CORRECTION_LEVEL_M
public static int CORRECTION_LEVEL_Q
public static int CORRECTION_LEVEL_H
Constructor Detail |
---|
public QRCode()
Method Detail |
---|
public int getPreferredVersion()
public void setPreferredVersion(int r)
public java.lang.String getCode()
public void setCode(java.lang.String c)
public int getECI()
public void setECI(int v)
public int[] getCodeBinary()
public void setCode(int[] c)
public int getEncoding()
Encoding mode (default is AUTO). Valid values are:
public void setEncoding(int d)
Encoding mode (default is AUTO). Valid values are:
public java.lang.String getName()
public int getErrorCorrectionLevel()
Error correction level. Valid values are:
public void setErrorCorrectionLevel(int d)
Error correction level. Valid values are:
public boolean getProcessTilde()
public void setProcessTilde(boolean pt)
public boolean getRedraw()
public void setRedraw(boolean b)
public int getFnc1Mode()
public void setFnc1Mode(int mode)
public byte getApplicationIndicator()
public void setApplicationIndicator(byte b)
public boolean getAutoConfigurate()
public void setAutoConfigurate(boolean pt)
public void setStructuredAppend(boolean b)
public boolean getStructuredAppend()
public void setStructuredAppendCounter(int i)
public int getStructuredAppendCounter()
public void setStructuredAppendIndex(int i)
public int getStructuredAppendIndex()
public int[][] paint()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |