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

pao.barcode.IBarCodeを継承しています。

公開メンバ関数

 UpcA (Graphics2D g)
 
 UpcA (String filePath)
 
boolean getTextWrite ()
 
void setTextWrite (boolean value)
 
boolean getTextKintou ()
 
void setTextKintou (boolean value)
 
Font getTextFont ()
 
void setTextFont (Font value)
 
float getRotateAngle ()
 
void setRotateAngle (float value)
 
int getKuroBarChousei ()
 
void setKuroBarChousei (int value)
 
int getDPI ()
 
void setDPI (int dpi)
 
int getImgMargin ()
 
void setImgMargin (int value)
 
boolean getDispStartStopCode ()
 
void setDispStartStopCode (boolean value)
 
void draw (String code) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
void draw (String code, float x, float y, float width, float height) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
void draw (String code, float x, float y, float width, float height, String filePath) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
void draw (String code, float x, float y, float width, float height, GraphicsUnit gu, int dpi) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
void draw (String code, float x, float y, float width, float height, GraphicsUnit gu, int dpi, boolean roundDecimalPoint) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
void drawDelicate (String code, float x, float y, float minLineWidth, float height) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
void drawDelicate (String code, float x, float y, float minLineWidth, float height, String filePath) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
void drawDirect (String code, float x, float y, float width, float height) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
void drawDirect (String code, float x, float y, float width, float height, String filePath) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
void drawDirect (String code, float x, float y, float width, float height, GraphicsUnit gu, int dpi, boolean roundDecimalPoint) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
void drawDirect (String code, float x, float y, float width, float height, GraphicsUnit gu, int dpi) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
float getDrawDirectWidth (String code, float width) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 
float getDrawDelicateWidth (String code, float minLineWidth) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen
 

詳解

Class UpcA is a barcode library used to generate barcode with UpcA(Ean Code) method

著者
PAO

構築子と解体子

pao.barcode.UpcA.UpcA ( Graphics2D  g)

Creates a new instance for UPC-A

引数
gGraphics where the barcode is going to be generated in
pao.barcode.UpcA.UpcA ( String  filePath)

Creates a new instance for UPC-A

引数
filePathoutput image file path

メソッド詳解

void pao.barcode.UpcA.draw ( String  code) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen

Draws barcode without specific position, width, and height

引数
codeText to be generated as barcode
例外
ErrUpcABadCharif code contains non-numerical value
ErrUpcABadLenif length of code is other than 11 or 12
ErrCheckDigitBadCharif code cannot be calculated with CheckDigit
ErrUpcACheckDigitif check digit in code does not match Check Digit's calculation バーコードの描画を行います。
引数
Stringcode 描画を行うバーコードのコードを文字列で指定します。
例外
ErrUpcABadChar数字以外の文字が使用されました。使用できる文字は数字のみです。
ErrCheckDigitBadChar数字以外の文字が使用されました。使用できる文字は数字のみです。
ErrUpcACheckDigitコード末尾のチェックデジットが誤っています。
ErrUpcABadLenコードの桁数は、12桁か、11桁を指定してください。11桁の場合チェックキャラクタを自動付与します。
void pao.barcode.UpcA.draw ( String  code,
float  x,
float  y,
float  width,
float  height 
) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen

Draws barcode with specific position, 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
例外
ErrUpcABadCharif code contains non-numerical value
ErrCheckDigitBadCharif check digit in code does not match Check Digit's calculation
ErrUpcACheckDigitif code cannot be calculated with CheckDigit
ErrUpcABadLenif length of code is other than 11 or 12
void pao.barcode.UpcA.draw ( String  code,
float  x,
float  y,
float  width,
float  height,
String  filePath 
) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen

Draws barcode with specific position, 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
例外
ErrUpcABadCharif code contains non-numerical value
ErrCheckDigitBadCharif check digit in code does not match Check Digit's calculation
ErrUpcACheckDigitif code cannot be calculated with CheckDigit
ErrUpcABadLenif length of code is other than 11 or 12
void pao.barcode.UpcA.draw ( String  code,
float  x,
float  y,
float  width,
float  height,
GraphicsUnit  gu,
int  dpi 
) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen

Draws barcode with specific position, 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
guGraphics Unit (mm, Inch, Point, Pixel)
dpiOutput Device dpi
例外
ErrUpcABadChar,ErrCheckDigitBadChar,ErrUpcACheckDigit,ErrUpcABadLenif code contains unknown character
void pao.barcode.UpcA.draw ( String  code,
float  x,
float  y,
float  width,
float  height,
GraphicsUnit  gu,
int  dpi,
boolean  roundDecimalPoint 
) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen

Barcode is directly drawn within the width set in pixel. Accuracy and speed are better than Draw method, although the width cannot be fixed.

引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
widthWidth of barcode
heightHeight of barcode
guGraphics Unit (mm, Inch, Point, Pixel)
dpiOutput Device dpi
roundDecimalRounding a decimal point
例外
ErrUpcABadChar,ErrCheckDigitBadChar,ErrUpcACheckDigit,ErrUpcABadLenif code contains unknown character
void pao.barcode.UpcA.drawDelicate ( String  code,
float  x,
float  y,
float  minLineWidth,
float  height 
) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen

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)
minLineWidthMinimum line width of barcode
heightHeight of barcode
例外
ErrUpcABadCharif code contains non-numerical value
ErrCheckDigitBadCharif check digit in code does not match Check Digit's calculation
ErrUpcACheckDigitif code cannot be calculated with CheckDigit
ErrUpcABadLenif length of code is other than 11 or 12
void pao.barcode.UpcA.drawDelicate ( String  code,
float  x,
float  y,
float  minLineWidth,
float  height,
String  filePath 
) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen

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)
minLineWidthMinimum line width of barcode
heightHeight of barcode
filePathimage file path
例外
ErrUpcABadCharif code contains non-numerical value
ErrCheckDigitBadCharif check digit in code does not match Check Digit's calculation
ErrUpcACheckDigitif code cannot be calculated with CheckDigit
ErrUpcABadLenif length of code is other than 11 or 12
void pao.barcode.UpcA.drawDirect ( String  code,
float  x,
float  y,
float  width,
float  height 
) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen

Barcode is directly drawn within the width set in pixel. Accuracy and speed are better than Draw method, although the width cannot be fixed.

引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
widthWidth of barcode
heightHeight of barcode
例外
ErrUpcABadCharif code contains non-numerical value
ErrCheckDigitBadCharif check digit in code does not match Check Digit's calculation
ErrUpcACheckDigitif code cannot be calculated with CheckDigit
ErrUpcABadLenif length of code is other than 11 or 12
void pao.barcode.UpcA.drawDirect ( String  code,
float  x,
float  y,
float  width,
float  height,
String  filePath 
) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen

Barcode is directly drawn within the width set in pixel. Accuracy and speed are better than Draw method, although the width cannot be fixed.

引数
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
例外
ErrUpcABadCharif code contains non-numerical value
ErrCheckDigitBadCharif check digit in code does not match Check Digit's calculation
ErrUpcACheckDigitif code cannot be calculated with CheckDigit
ErrUpcABadLenif length of code is other than 11 or 12
void pao.barcode.UpcA.drawDirect ( String  code,
float  x,
float  y,
float  width,
float  height,
GraphicsUnit  gu,
int  dpi,
boolean  roundDecimalPoint 
) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen

Barcode is directly drawn within the width set in pixel. Accuracy and speed are better than Draw method, although the width cannot be fixed.

引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
widthWidth of barcode
heightHeight of barcode
guGraphics Unit (mm, Inch, Point, Pixel)
dpiOutput Device dpi
roundDecimalRounding a decimal point
例外
ErrUpcABadChar,ErrCheckDigitBadChar,ErrUpcACheckDigit,ErrUpcABadLenif code contains unknown character
void pao.barcode.UpcA.drawDirect ( String  code,
float  x,
float  y,
float  width,
float  height,
GraphicsUnit  gu,
int  dpi 
) throws ErrUpcABadChar, ErrCheckDigitBadChar, ErrUpcACheckDigit, ErrUpcABadLen

Barcode is directly drawn within the width set in pixel. Accuracy and speed are better than Draw method, although the width cannot be fixed.

引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
widthWidth of barcode
heightHeight of barcode
例外
ErrUpcABadChar,ErrCheckDigitBadChar,ErrUpcACheckDigit,ErrUpcABadLenif code contains unknown character
boolean pao.barcode.UpcA.getDispStartStopCode ( )

Returns true if start-stop-code will be generated along with barcode (dummy for interface)

戻り値
true if start-stop-code will be generated along with barcode, false otherwise
int pao.barcode.UpcA.getDPI ( )

Get DPI for fine adjustment of black bars.(The defined value is 600DPI.)

戻り値
DPI
int pao.barcode.UpcA.getImgMargin ( )

Get Pixel of Image Margin

  • 戻り値
    Pixel of Image Margin
int pao.barcode.UpcA.getKuroBarChousei ( )

Set number of dot for fine adjustment of black bars.(The defined value of dot is 0.)

引数
valueThe number of dot for fine adjustment of black bars.
float pao.barcode.UpcA.getRotateAngle ( )

Returns barcode angle

戻り値
Barcode angle
Font pao.barcode.UpcA.getTextFont ( )

Gets the font used in writing text

戻り値
Font used in writing text
boolean pao.barcode.UpcA.getTextKintou ( )

Get drawing position drawing position (to fit a barcode to set width).

戻り値
true: Draw barcode within an overall width by equal spacing, false: Draw barcode at a bar meaning a code (default)
boolean pao.barcode.UpcA.getTextWrite ( )

Returns true if text will be generated along with the barcode

戻り値
true if text will be generated along with the barcode, false otherwise
void pao.barcode.UpcA.setDispStartStopCode ( boolean  value)

Enables or disables start-stop-code (dummy for interface)

引数
valuetrue to enable start-stop-code, false to disable it
void pao.barcode.UpcA.setDPI ( int  dpi)

Set DPI for fine adjustment of black bars.(The defined value is 600DPI.)

引数
dpiDPI
void pao.barcode.UpcA.setImgMargin ( int  value)

Set Pixel of Image Margin

引数
valuePixelof Image Margin
void pao.barcode.UpcA.setKuroBarChousei ( int  value)

Set number of dot for fine adjustment of black bars.(The defined value of dot is 0.)

引数
valueThe number of dot for fine adjustment of black bars.
void pao.barcode.UpcA.setRotateAngle ( float  value)

Sets barcode angle

引数
valueBarcode angle
void pao.barcode.UpcA.setTextFont ( Font  value)

Sets the font used in writing text

引数
valueFont used in writing text
void pao.barcode.UpcA.setTextKintou ( boolean  value)

Set drawing position drawing position (to fit a barcode to set width).

引数
valuetrue: Draw barcode within an overall width by equal spacing, false: Draw barcode at a bar meaning a code (default)
void pao.barcode.UpcA.setTextWrite ( boolean  value)

Enables or disables text writing

引数
valuetrue to enable text writing, false to disable it

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