Barcode.jar  ver 3.0.0
Java 開発者向け バーコード作成ライブラリ
公開メンバ関数 | 全メンバ一覧
pao.barcode.QRCode クラス

公開メンバ関数

 QRCode (Graphics2D g)
 
 QRCode (String filepath)
 
String getStringEncoding () throws Exception
 
void setStringEncoding (String value) throws Exception
 
String getErrorCorrect ()
 
void setErrorCorrect (String value)
 
int getVersion ()
 
void setVersion (int value)
 
String getEncodeMode ()
 
void setEncodeMode (String value)
 
float getRotateAngle ()
 
int getImgMargin ()
 
void setImgMargin (int value)
 
void draw (String code, float x, float y, float width, float height) throws Exception
 
void draw (String code, float x, float y, float width, float height, String filePath) throws Exception
 
void draw (byte code[], float x, float y, float width, float height) throws Exception
 
void drawDelicate (String code, float x, float y, float minLinePitch) throws Exception
 
void drawDelicate (String code, float x, float y, float minLinePitch, String filePath) throws Exception
 
void drawDelicate (byte code[], float x, float y, float minLinePitch) throws Exception
 
void drawDirect (String code, float x, float y, float width) throws Exception
 
void drawDirect (String code, float x, float y, float width, String filePath) throws Exception
 
void drawDirect (byte code[], float x, float y, float width) throws Exception
 
void WriteSVG (String code, float x, float y, float minLinePitch, String filePath) throws Exception
 
void WriteSVG (byte code[], float x, float y, float minLinePitch, String filePath) throws Exception
 
float getDrawDelicateWidth (String code, float minLinePitch) throws Exception
 
float getDrawDelicateWidth (byte code[], float minLinePitch) throws Exception
 
float getDrawDirectWidth (String code, float width) throws Exception
 
float getDrawDirectWidth (byte code[], float width) throws Exception
 

詳解

Class QRCode is a two-dimensional barcode library used to generate barcode with QRCode method.

QR Code is capable of handling all types of data, such as numeric and alphabetic characters, Kanji, Kana, Hiragana, symbols, binary, and control codes. Up to 7,089 characters can be encoded in one symbol.

The capacity differs from each encode mode: Numeric only Max. 7,089 characters Alphanumeric Max. 4,296 characters Binary (8 bits) Max. 2,953 bytes Kanji, full-width Kana Max. 1,817 characters

Class QRCode supports 3 encode mode: Numeric, Alphanumeric, and Binary 8 bit

著者
PAO

構築子と解体子

pao.barcode.QRCode.QRCode ( Graphics2D  g)

Creates a new instance for QRCode

引数
gGraphics where the two-dimensional barcode is going to be generated in
pao.barcode.QRCode.QRCode ( String  filepath)

Creates a new instance for QRCode

引数
filePathoutput image file path

メソッド詳解

void pao.barcode.QRCode.draw ( String  code,
float  x,
float  y,
float  width,
float  height 
) throws Exception

Draws barcode with specific position, minimum line width, and height

引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
widthWidth of barcode
heightHeight of barcode
例外
Exceptionnone
void pao.barcode.QRCode.draw ( String  code,
float  x,
float  y,
float  width,
float  height,
String  filePath 
) throws Exception

Draws barcode with specific position, minimum line width, and height

引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
widthWidth of barcode
heightHeight of barcode
filePathimage file path
例外
Exceptionnone
void pao.barcode.QRCode.draw ( byte  code[],
float  x,
float  y,
float  width,
float  height 
) throws Exception

Draws barcode with specific position, minimum line width, and height

引数
codebyte array to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
widthWidth of barcode
heightHeight of barcode
例外
Exceptionnone
void pao.barcode.QRCode.drawDelicate ( String  code,
float  x,
float  y,
float  minLinePitch 
) throws Exception

Draws barcode with specific position, minimum line width, and height

引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
minLinePitchMinimum line pitch of barcode
例外
Exceptionnone
void pao.barcode.QRCode.drawDelicate ( String  code,
float  x,
float  y,
float  minLinePitch,
String  filePath 
) throws Exception

Draws barcode with specific position, minimum line width, and height

引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
minLinePitchMinimum line pitch of barcode
filePathimage file path
例外
Exceptionnone
void pao.barcode.QRCode.drawDelicate ( byte  code[],
float  x,
float  y,
float  minLinePitch 
) throws Exception

Draws barcode with specific position, minimum line width, and height

引数
codebyte array to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
minLinePitchMinimum line pitch of barcode
例外
Exceptionnone
void pao.barcode.QRCode.drawDirect ( String  code,
float  x,
float  y,
float  width 
) throws Exception

Draws barcode with specific position, minimum line width, and height

引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
widthWidth of barcode
例外
Exceptionnone
void pao.barcode.QRCode.drawDirect ( String  code,
float  x,
float  y,
float  width,
String  filePath 
) throws Exception

Draws barcode with specific position, minimum line width, and height

引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
widthWidth of barcode
filePathimage file path
例外
Exceptionnone
void pao.barcode.QRCode.drawDirect ( byte  code[],
float  x,
float  y,
float  width 
) throws Exception

Draws barcode with specific position, minimum line width, and height

引数
codebyte array to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
widthWidth of barcode
例外
Exceptionnone
String pao.barcode.QRCode.getEncodeMode ( )

Returns encode mode

戻り値
Encode mode ("A" for Aplhanumeric, "N" for numeric, and other for binary 8-bits)
String pao.barcode.QRCode.getErrorCorrect ( )

Sets error correct level

引数
valueError correct level ("L"/"Q"/"H"/other) "L": Approx. 7% of codewords can be restored "Q": Approx. 25% of codewords can be restored "H": Approx. 30% of codewords can be restored other: Approx. 15% of codewords can be restored
int pao.barcode.QRCode.getImgMargin ( )

Get Pixel of Image Margin

  • 戻り値
    Pixel of Image Margin
float pao.barcode.QRCode.getRotateAngle ( )

Returns barcode angle

戻り値
barcode angle
String pao.barcode.QRCode.getStringEncoding ( ) throws Exception

全角文字コード getBytes()の引数は受け付けます。 規定値:"SJIS" 例:"UTF-8" ...等...

int pao.barcode.QRCode.getVersion ( )

Returns barcode version

戻り値
Barcode version (ranged from 1 to 40)
void pao.barcode.QRCode.setEncodeMode ( String  value)

Sets encode mode

引数
valueEncode mode ("A" for Aplhanumeric, "N" for numeric, and other for binary 8-bits)
void pao.barcode.QRCode.setErrorCorrect ( String  value)

エラー訂正レベルを設定

引数
valueエラー訂正レベル ("L"/"Q"/"H"/other) "L": Approx. 7% of codewords can be restored "Q": Approx. 25% of codewords can be restored "H": Approx. 30% of codewords can be restored other: Approx. 15% of codewords can be restored
void pao.barcode.QRCode.setImgMargin ( int  value)

Set Pixel of Image Margin

引数
valuePixelof Image Margin
void pao.barcode.QRCode.setVersion ( int  value)

Sets barcode version

引数
valueBarcode version (ranged from 0 to 40, put 0 to select version automatically)
void pao.barcode.QRCode.WriteSVG ( String  code,
float  x,
float  y,
float  minLinePitch,
String  filePath 
) throws Exception
引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
minLinePitchMinimum line pitch of barcode
filePathSVG file pathname
例外
Exceptionnone
void pao.barcode.QRCode.WriteSVG ( byte  code[],
float  x,
float  y,
float  minLinePitch,
String  filePath 
) throws Exception
引数
codebyte array to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
minLinePitchMinimum line pitch of barcode
filePathSVG file pathname
例外
Exceptionnone

このクラス詳解は次のファイルから抽出されました: