Barcode.jar ver 5.0.0
Java 開発者向け バーコード作成ライブラリ(SVG出力・Base64出力対応)
読み取り中…
検索中…
一致する文字列を見つけられません
pao.barcode.EAN128 クラス
pao.barcode.EAN128 の継承関係図
pao.barcode.IBarCode pao.barcode.GS1_128

公開メンバ関数

 EAN128 ()
 EAN128 (Graphics2D g)
 EAN128 (String filePath)
 EAN128 (String imgFormat, boolean useStream)
void SetGraphics (Graphics2D g)
void setTextWrite (boolean value)
boolean getTextWrite ()
void setTextKintou (boolean value)
boolean getTextKintou ()
boolean getTextEvenSpacing ()
void setTextEvenSpacing (boolean value)
void setTextFont (Font value)
Font getTextFont ()
void setRotateAngle (float value)
float getRotateAngle ()
int getKuroBarChousei ()
void setKuroBarChousei (int value)
int getBlackBarAdjusterByDot ()
void setBlackBarAdjusterByDot (int value)
int getShiroBarChousei ()
void setShiroBarChousei (int value)
int getWhiteBarAdjusterByDot ()
void setWhiteBarAdjusterByDot (int value)
int getDPI ()
void setDPI (int dpi)
int getImgMargin ()
void setImgMargin (int value)
ByteArrayOutputStream getImageStream ()
void setImageStream (ByteArrayOutputStream value)
String getImageBase64 ()
String getImageFormat ()
void setImageFormat (String value)
Color getForeColor ()
void setForeColor (Color value)
Color getBackColor ()
void setBackColor (Color value)
boolean getDispStartStopCode ()
void setDispStartStopCode (boolean value)
CodeSet128 getCodeABC ()
void setCodeABC (CodeSet128 _codeABC)
void draw (String code)
void draw (String code, float x, float y, float width, float height)
void draw (String code, float x, float y, float width, float height, String filePath)
void draw (String code, float x, float y, float width, float height, GraphicsUnit gu, int dpi)
void draw (String code, float x, float y, float width, float height, GraphicsUnit gu, int dpi, boolean roundDecimalPoint)
void drawDelicate (String code, float x, float y, float minLineWidth, float height)
void drawDelicate (String code, float x, float y, float minLineWidth, float height, String filePath)
void drawDirect (String code, float x, float y, float width, float height)
void drawDirect (String code, float x, float y, float width, float height, String filePath)
void drawDirect (String code, float x, float y, float width, float height, GraphicsUnit gu, int dpi, boolean roundDecimalPoint)
void drawDirect (String code, float x, float y, float width, float height, GraphicsUnit gu, int dpi)
void drawConvenienceDelicate (String code, float x, float y, float minLineWidth, float height)
void drawConvenience (String code, float x, float y, float width, float height, GraphicsUnit gu, int dpi, boolean roundDecimalPoint)
void drawConvenienceDirect (String code, float x, float y, float width, float height, GraphicsUnit gu, int dpi, boolean roundDecimalPoint)
void pDrawConvenienceDelicate (String code, float mmX, float mmY, float mmHeight)
float getDrawDirectWidth (String code, float width)
float getDrawDelicateWidth (String code, float minLineWidth)
float getDrawConvenienceDelicateWidth (String code, float minLineWidth)
String writeSVGToString (String code, float x, float y, float width, float height)
String writeSVGConvenienceToString (String code, float x, float y, float width, float height)

詳解

EAN128バーコードを生成するためのバーコードライブラリクラス

著者
PAO

構築子と解体子

◆ EAN128() [1/4]

pao.barcode.EAN128.EAN128 ( )

EAN128のインスタンスを作成します。 画像形式はデフォルトでPNGが設定されます。

このコンストラクタは以下の用途で使用できます:

  • SVG出力(writeSVGToStringメソッド等)
  • Base64形式での画像データ取得(getImageBase64メソッド)
  • メモリストリームでの画像データ取得(getImageStreamメソッド)

Graphics2Dやファイルパスを指定せずに、シンプルにバーコードを生成できます。

◆ EAN128() [2/4]

pao.barcode.EAN128.EAN128 ( Graphics2D g)

EAN128のインスタンスを作成します

引数
gバーコードを描画するGraphicsオブジェクト

◆ EAN128() [3/4]

pao.barcode.EAN128.EAN128 ( String filePath)

EAN128のインスタンスを作成します

引数
filePath出力画像ファイルパス

◆ EAN128() [4/4]

pao.barcode.EAN128.EAN128 ( String imgFormat,
boolean useStream )

EAN128のインスタンスを作成します(メモリストリーム出力用)。

このコンストラクタは、ファイルに保存せずにメモリ上で画像データを取得したい場合に使用します。 生成後、以下のメソッドで画像データを取得できます:

引数
imgFormat出力画像フォーマット("png", "jpeg", "bmp"など)。 nullや空文字、または無効な形式が指定された場合は"png"が使用されます。
useStreamストリーム出力を使用する場合はtrue。 falseの場合はストリーム機能は無効となり、getImageBase64等は空を返します。

メソッド詳解

◆ draw() [1/5]

void pao.barcode.EAN128.draw ( String code)

バーコードを描画します

引数
codeバーコードとして生成するテキスト

pao.barcode.IBarCodeを実装しています。

◆ draw() [2/5]

void pao.barcode.EAN128.draw ( String code,
float x,
float y,
float width,
float height )

バーコードを描画します

引数
codeバーコードとして生成するテキスト
xバーコードのX座標
yバーコードのY座標
widthバーコードの幅
heightバーコードの高さ

pao.barcode.IBarCodeを実装しています。

◆ draw() [3/5]

void pao.barcode.EAN128.draw ( String code,
float x,
float y,
float width,
float height,
GraphicsUnit gu,
int dpi )

バーコードを描画します

引数
codeバーコードとして生成するテキスト
xバーコードのX座標
yバーコードのY座標
widthバーコードの幅
heightバーコードの高さ
gu座標単位(mm、Inch、Point、Pixel)
dpi出力デバイスのDPI

pao.barcode.IBarCodeを実装しています。

◆ draw() [4/5]

void pao.barcode.EAN128.draw ( String code,
float x,
float y,
float width,
float height,
GraphicsUnit gu,
int dpi,
boolean roundDecimalPoint )

バーコードを描画します

引数
codeバーコードとして生成するテキスト
xバーコードのX座標
yバーコードのY座標
widthバーコードの幅
heightバーコードの高さ
gu座標単位(mm、Inch、Point、Pixel)
dpi出力デバイスのDPI
roundDecimalPoint小数点を丸めるかどうか

◆ draw() [5/5]

void pao.barcode.EAN128.draw ( String code,
float x,
float y,
float width,
float height,
String filePath )

バーコードを描画します

引数
codeバーコードとして生成するテキスト
xバーコードのX座標
yバーコードのY座標
widthバーコードの幅
heightバーコードの高さ
filePath出力画像ファイルパス

◆ drawConvenience()

void pao.barcode.EAN128.drawConvenience ( String code,
float x,
float y,
float width,
float height,
GraphicsUnit gu,
int dpi,
boolean roundDecimalPoint )

Probably only use at convenience stores in Japan. draw 1 point line

引数
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

◆ drawConvenienceDelicate()

void pao.barcode.EAN128.drawConvenienceDelicate ( String code,
float x,
float y,
float minLineWidth,
float height )

Probably only use at convenience stores in Japan. draw 1 point line

引数
codeText to be generated as barcode
xPosition of barcode (X axis)
yPosition of barcode (Y axis)
minLineWidthMinimum line width(dot) of barcode
heightHeight of barcode

◆ drawConvenienceDirect()

void pao.barcode.EAN128.drawConvenienceDirect ( String code,
float x,
float y,
float width,
float height,
GraphicsUnit gu,
int dpi,
boolean roundDecimalPoint )

Probably only use at convenience stores in Japan. draw 1 point line

引数
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

◆ drawDelicate() [1/2]

void pao.barcode.EAN128.drawDelicate ( String code,
float x,
float y,
float minLineWidth,
float height )

最小線幅を指定してバーコードを描画します

引数
codeバーコードとして生成するテキスト
xバーコードのX座標
yバーコードのY座標
minLineWidthバーコードの最小線幅
heightバーコードの高さ

pao.barcode.IBarCodeを実装しています。

◆ drawDelicate() [2/2]

void pao.barcode.EAN128.drawDelicate ( String code,
float x,
float y,
float minLineWidth,
float height,
String filePath )

最小線幅を指定してバーコードを描画します

引数
codeバーコードとして生成するテキスト
xバーコードのX座標
yバーコードのY座標
minLineWidthバーコードの最小線幅
heightバーコードの高さ
filePath出力画像ファイルパス

◆ drawDirect() [1/4]

void pao.barcode.EAN128.drawDirect ( String code,
float x,
float y,
float width,
float height )

ピクセル単位で直接バーコードを描画します Drawメソッドより精度と速度が優れていますが、幅を固定することはできません。

引数
codeバーコードとして生成するテキスト
xバーコードのX座標
yバーコードのY座標
widthバーコードの幅
heightバーコードの高さ

pao.barcode.IBarCodeを実装しています。

◆ drawDirect() [2/4]

void pao.barcode.EAN128.drawDirect ( String code,
float x,
float y,
float width,
float height,
GraphicsUnit gu,
int dpi )

ピクセル単位で直接バーコードを描画します Drawメソッドより精度と速度が優れていますが、幅を固定することはできません。

引数
codeバーコードとして生成するテキスト
xバーコードのX座標
yバーコードのY座標
widthバーコードの幅
heightバーコードの高さ
gu座標単位(mm、Inch、Point、Pixel)
dpi出力デバイスのDPI

pao.barcode.IBarCodeを実装しています。

◆ drawDirect() [3/4]

void pao.barcode.EAN128.drawDirect ( String code,
float x,
float y,
float width,
float height,
GraphicsUnit gu,
int dpi,
boolean roundDecimalPoint )

ピクセル単位で直接バーコードを描画します Drawメソッドより精度と速度が優れていますが、幅を固定することはできません。

引数
codeバーコードとして生成するテキスト
xバーコードのX座標
yバーコードのY座標
widthバーコードの幅
heightバーコードの高さ
gu座標単位(mm、Inch、Point、Pixel)
dpi出力デバイスのDPI
roundDecimalPoint小数点を丸めるかどうか

pao.barcode.IBarCodeを実装しています。

◆ drawDirect() [4/4]

void pao.barcode.EAN128.drawDirect ( String code,
float x,
float y,
float width,
float height,
String filePath )

ピクセル単位で直接バーコードを描画します Drawメソッドより精度と速度が優れていますが、幅を固定することはできません。

引数
codeバーコードとして生成するテキスト
xバーコードのX座標
yバーコードのY座標
widthバーコードの幅
heightバーコードの高さ
filePath出力画像ファイルパス

◆ getBackColor()

Color pao.barcode.EAN128.getBackColor ( )

背景色を取得します。

戻り値
背景色(デフォルト: null = 透明)

pao.barcode.IBarCodeを実装しています。

◆ getBlackBarAdjusterByDot()

int pao.barcode.EAN128.getBlackBarAdjusterByDot ( )

黒バーの微調整ドット数を取得します(getKuroBarChouseiのエイリアス)

戻り値
黒バーの微調整ドット数

pao.barcode.IBarCodeを実装しています。

◆ getCodeABC()

CodeSet128 pao.barcode.EAN128.getCodeABC ( )

CODE128のCODE-SET(AUTO、A、B、C)を取得します

戻り値
CODE-SET(AUTO、A、B、C)

◆ getDispStartStopCode()

boolean pao.barcode.EAN128.getDispStartStopCode ( )

スタート・ストップコードを表示するかどうかを取得します

戻り値
スタート・ストップコードを表示する場合はtrue、それ以外はfalse

pao.barcode.IBarCodeを実装しています。

◆ getDPI()

int pao.barcode.EAN128.getDPI ( )

黒バー微調整用のDPIを取得します

戻り値
DPI

pao.barcode.IBarCodeを実装しています。

◆ getDrawDelicateWidth()

float pao.barcode.EAN128.getDrawDelicateWidth ( String code,
float minLineWidth )

DrawDelicate時のバーコード幅を取得します

引数
codeバーコードとして生成するテキスト
minLineWidthバーコードの最小線幅
戻り値
DrawDelicate時のバーコード幅

pao.barcode.IBarCodeを実装しています。

◆ getDrawDirectWidth()

float pao.barcode.EAN128.getDrawDirectWidth ( String code,
float width )
引数
point
戻り値
DrawDirect時のバーコード幅を取得します
引数
codeバーコードとして生成するテキスト
widthバーコードの幅
戻り値
DrawDirect時のバーコード幅

pao.barcode.IBarCodeを実装しています。

◆ getForeColor()

Color pao.barcode.EAN128.getForeColor ( )

バーの色(前景色)を取得します。

戻り値
バーの色(デフォルト: 黒)

pao.barcode.IBarCodeを実装しています。

◆ getImageBase64()

String pao.barcode.EAN128.getImageBase64 ( )

画像をBase64エンコードした文字列を取得します。

戻り値
Base64エンコードされた画像データ

pao.barcode.IBarCodeを実装しています。

◆ getImageFormat()

String pao.barcode.EAN128.getImageFormat ( )

画像フォーマットを取得します。

戻り値
画像フォーマット

◆ getImageStream()

ByteArrayOutputStream pao.barcode.EAN128.getImageStream ( )

画像ストリームを取得します。

戻り値
画像ストリーム

◆ getImgMargin()

int pao.barcode.EAN128.getImgMargin ( )

画像マージンのピクセル数を取得します

戻り値
画像マージンのピクセル数

pao.barcode.IBarCodeを実装しています。

◆ getKuroBarChousei()

int pao.barcode.EAN128.getKuroBarChousei ( )

黒バーの微調整ドット数を取得します

戻り値
黒バーの微調整ドット数

pao.barcode.IBarCodeを実装しています。

◆ getRotateAngle()

float pao.barcode.EAN128.getRotateAngle ( )

バーコードの回転角度を取得します

戻り値
バーコードの回転角度

pao.barcode.IBarCodeを実装しています。

◆ getShiroBarChousei()

int pao.barcode.EAN128.getShiroBarChousei ( )

白バーの微調整ドット数を取得します

戻り値
白バーの微調整ドット数

◆ getTextEvenSpacing()

boolean pao.barcode.EAN128.getTextEvenSpacing ( )

テキスト均等配置設定を取得します(getTextKintouのエイリアス)

戻り値
true: バーコード全体の幅に均等配置、false: 対応するバーの下に配置

pao.barcode.IBarCodeを実装しています。

◆ getTextFont()

Font pao.barcode.EAN128.getTextFont ( )

テキスト描画に使用するフォントを取得します

戻り値
テキスト描画に使用するフォント

pao.barcode.IBarCodeを実装しています。

◆ getTextKintou()

boolean pao.barcode.EAN128.getTextKintou ( )

テキスト均等配置設定を取得します

戻り値
true: バーコード全体の幅に均等配置、false: 対応するバーの下に配置

pao.barcode.IBarCodeを実装しています。

◆ getTextWrite()

boolean pao.barcode.EAN128.getTextWrite ( )

バーコードと一緒にテキストを出力するかどうかを取得します

戻り値
テキストを出力する場合はtrue、それ以外はfalse

pao.barcode.IBarCodeを実装しています。

◆ getWhiteBarAdjusterByDot()

int pao.barcode.EAN128.getWhiteBarAdjusterByDot ( )

白バーの微調整ドット数を取得します(getShiroBarChouseiのエイリアス)

戻り値
白バーの微調整ドット数

◆ pDrawConvenienceDelicate()

void pao.barcode.EAN128.pDrawConvenienceDelicate ( String code,
float mmX,
float mmY,
float mmHeight )

Probably only use at convenience stores in Japan.

引数
codeText to be generated as barcode
mmXPosition of barcode (X axis)
mmYPosition of barcode (Y axis)
mmHeightHeight of barcode

◆ setBackColor()

void pao.barcode.EAN128.setBackColor ( Color value)

背景色を設定します。 画像データ保存時のみ有効です。直接描画する場合、背景色は透明になります。 nullを指定すると透明になります。

引数
value背景色

pao.barcode.IBarCodeを実装しています。

◆ setBlackBarAdjusterByDot()

void pao.barcode.EAN128.setBlackBarAdjusterByDot ( int value)

黒バーの微調整ドット数を設定します(setKuroBarChouseiのエイリアス)

引数
value黒バーの微調整ドット数

pao.barcode.IBarCodeを実装しています。

◆ setCodeABC()

void pao.barcode.EAN128.setCodeABC ( CodeSet128 _codeABC)

CODE128のCODE-SET(AUTO、A、B、C)を設定します

引数
_codeABCCODE-SET(AUTO、A、B、C)

◆ setDispStartStopCode()

void pao.barcode.EAN128.setDispStartStopCode ( boolean value)

スタート・ストップコードを表示するかどうかを設定します

引数
valueスタート・ストップコードを表示する場合はtrue、それ以外はfalse

pao.barcode.IBarCodeを実装しています。

◆ setDPI()

void pao.barcode.EAN128.setDPI ( int dpi)

黒バー微調整用のDPIを設定します

引数
dpiDPI

pao.barcode.IBarCodeを実装しています。

◆ setForeColor()

void pao.barcode.EAN128.setForeColor ( Color value)

バーの色(前景色)を設定します。 テキストがある場合、テキストの色にも適用されます。

引数
valueバーの色

pao.barcode.IBarCodeを実装しています。

◆ SetGraphics()

void pao.barcode.EAN128.SetGraphics ( Graphics2D g)

set graphics

引数
gGraphics where the barcode

◆ setImageFormat()

void pao.barcode.EAN128.setImageFormat ( String value)

画像フォーマットを設定します。

引数
value画像フォーマット ("png", "jpeg", "bmp"など)

◆ setImageStream()

void pao.barcode.EAN128.setImageStream ( ByteArrayOutputStream value)

画像ストリームを設定します。

引数
value画像ストリーム

◆ setImgMargin()

void pao.barcode.EAN128.setImgMargin ( int value)

画像マージンのピクセル数を設定します

引数
value画像マージンのピクセル数

pao.barcode.IBarCodeを実装しています。

◆ setKuroBarChousei()

void pao.barcode.EAN128.setKuroBarChousei ( int value)

黒バーの微調整ドット数を設定します

引数
value黒バーの微調整ドット数

pao.barcode.IBarCodeを実装しています。

◆ setRotateAngle()

void pao.barcode.EAN128.setRotateAngle ( float value)

バーコードの回転角度を設定します

引数
valueバーコードの回転角度

pao.barcode.IBarCodeを実装しています。

◆ setShiroBarChousei()

void pao.barcode.EAN128.setShiroBarChousei ( int value)

白バーの微調整ドット数を設定します

引数
value白バーの微調整ドット数

◆ setTextEvenSpacing()

void pao.barcode.EAN128.setTextEvenSpacing ( boolean value)

テキスト均等配置設定を設定します(setTextKintouのエイリアス)

引数
valuetrue: バーコード全体の幅に均等配置、false: 対応するバーの下に配置

pao.barcode.IBarCodeを実装しています。

◆ setTextFont()

void pao.barcode.EAN128.setTextFont ( Font value)

テキスト描画に使用するフォントを設定します

引数
valueテキスト描画に使用するフォント

pao.barcode.IBarCodeを実装しています。

◆ setTextKintou()

void pao.barcode.EAN128.setTextKintou ( boolean value)

テキスト均等配置設定を設定します

引数
valuetrue: バーコード全体の幅に均等配置、false: 対応するバーの下に配置

pao.barcode.IBarCodeを実装しています。

◆ setTextWrite()

void pao.barcode.EAN128.setTextWrite ( boolean value)

バーコードと一緒にテキストを出力するかどうかを設定します

引数
valueテキストを出力する場合はtrue、それ以外はfalse

pao.barcode.IBarCodeを実装しています。

◆ setWhiteBarAdjusterByDot()

void pao.barcode.EAN128.setWhiteBarAdjusterByDot ( int value)

白バーの微調整ドット数を設定します(setShiroBarChouseiのエイリアス)

引数
value白バーの微調整ドット数

◆ writeSVGConvenienceToString()

String pao.barcode.EAN128.writeSVGConvenienceToString ( String code,
float x,
float y,
float width,
float height )

Generates a convenience store payment barcode as an SVG string. Text is displayed in 2 lines in a specific format (not evenly spaced, left-aligned). コンビニ収納代行バーコードをSVG文字列として生成します。 テキストは均等割り付けではなく、2行に分けて左詰めで表示します。

引数
codeBarcode code ({FNC1} + 44 digits including check digit, or {FNC1} + 43 digits)
xX position
yY position
widthWidth of barcode
heightHeight of barcode (bars only, text area is added below)
戻り値
SVG string

◆ writeSVGToString()

String pao.barcode.EAN128.writeSVGToString ( String code,
float x,
float y,
float width,
float height )

Writes barcode as SVG string

引数
codeText to be generated as barcode
xX position
yY position
widthWidth of barcode
heightHeight of barcode
戻り値
SVG string

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