![]() |
Barcode.jar ver 5.0.0
Java 開発者向け バーコード作成ライブラリ(SVG出力・Base64出力対応)
|
公開メンバ関数 | |
| YubinCustomer (Graphics2D g) | |
| YubinCustomer (String filepath) | |
| YubinCustomer () | |
| YubinCustomer (String imgFormat, boolean useStream) | |
| float | getRotateAngle () |
| void | setRotateAngle (float value) |
| 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) |
| void | draw (String code) throws ErrYubinBadChar |
| void | draw (String code, float x, float y) throws ErrYubinBadChar |
| void | draw (String code, float x, float y, float height) throws ErrYubinBadChar |
| void | draw (String code, float x, float y, float height, String filePath) throws ErrYubinBadChar |
| float | getDrawWidth (String code, float height) throws ErrYubinBadChar |
| String | writeSVGToString (String code, float x, float y, float height) |
| String | writeSVGToString (String code, float x, float y, float height, float unused) |
郵便カスタマーバーコードを生成するためのバーコードライブラリクラスです。
4ステート3バー方式のバーコードで、郵便番号と住所表示番号をエンコードする。 バーの種類:
寸法比率(日本郵便仕様): ロングバー : タイミングバー : バー幅 : バーピッチ = 6 : 2 : 1 : 2
| pao.barcode.YubinCustomer.YubinCustomer | ( | Graphics2D | g | ) |
郵便カスタマーバーコードのインスタンスを作成します。
| g | バーコードを描画するGraphics2Dオブジェクト |
| pao.barcode.YubinCustomer.YubinCustomer | ( | String | filepath | ) |
郵便カスタマーバーコードのインスタンスを作成します。
| filePath | 出力画像ファイルパス |
| pao.barcode.YubinCustomer.YubinCustomer | ( | ) |
郵便カスタマーバーコードのインスタンスを作成します。 画像形式はデフォルトでPNGが設定されます。
このコンストラクタは以下の用途で使用できます:
Graphics2Dやファイルパスを指定せずに、シンプルにバーコードを生成できます。
| pao.barcode.YubinCustomer.YubinCustomer | ( | String | imgFormat, |
| boolean | useStream ) |
郵便カスタマーバーコードのインスタンスを作成します(メモリストリーム出力用)。
このコンストラクタは、ファイルに保存せずにメモリ上で画像データを取得したい場合に使用します。 生成後、以下のメソッドで画像データを取得できます:
| imgFormat | 出力画像フォーマット("png", "jpeg", "bmp"など)。 nullや空文字、または無効な形式が指定された場合は"png"が使用されます。 |
| useStream | ストリーム出力を使用する場合はtrue。 falseの場合はストリーム機能は無効となり、getImageBase64等は空を返します。 |
| void pao.barcode.YubinCustomer.draw | ( | String | code | ) | throws ErrYubinBadChar |
| void pao.barcode.YubinCustomer.draw | ( | String | code, |
| float | x, | ||
| float | y ) throws ErrYubinBadChar |
| void pao.barcode.YubinCustomer.draw | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | height ) throws ErrYubinBadChar |
バーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| height | バーコードの高さ(ロングバーの長さ、ピクセル単位) |
| ErrYubinBadChar | 不正な文字が含まれている場合 |
heightを基準に全ての寸法が決まる:
| void pao.barcode.YubinCustomer.draw | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | height, | ||
| String | filePath ) throws ErrYubinBadChar |
バーコードを描画します。
| code | バーコードとして生成するテキスト |
| x | バーコードのX座標 |
| y | バーコードのY座標 |
| height | バーコードの高さ(ロングバーの長さ、ピクセル単位) |
| filePath | 出力画像ファイルパス |
| ErrYubinBadChar | 不正な文字が含まれている場合 |
| Color pao.barcode.YubinCustomer.getBackColor | ( | ) |
背景色を取得します。
| float pao.barcode.YubinCustomer.getDrawWidth | ( | String | code, |
| float | height ) throws ErrYubinBadChar |
| Color pao.barcode.YubinCustomer.getForeColor | ( | ) |
バーの色(前景色)を取得します。
| String pao.barcode.YubinCustomer.getImageBase64 | ( | ) |
画像をBase64エンコードした文字列を取得します。
| String pao.barcode.YubinCustomer.getImageFormat | ( | ) |
画像フォーマットを取得します。
| ByteArrayOutputStream pao.barcode.YubinCustomer.getImageStream | ( | ) |
画像ストリームを取得します。
| int pao.barcode.YubinCustomer.getImgMargin | ( | ) |
画像マージンのピクセル数を取得します。
| float pao.barcode.YubinCustomer.getRotateAngle | ( | ) |
バーコードの回転角度を取得します。
| void pao.barcode.YubinCustomer.setBackColor | ( | Color | value | ) |
背景色を設定します。 画像データ保存時のみ有効です。nullを指定すると透明になります。
| value | 背景色 |
| void pao.barcode.YubinCustomer.setForeColor | ( | Color | value | ) |
バーの色(前景色)を設定します。
| value | バーの色 |
| void pao.barcode.YubinCustomer.setImageFormat | ( | String | value | ) |
画像フォーマットを設定します。
| value | 画像フォーマット ("png", "jpeg", "bmp"など) |
| void pao.barcode.YubinCustomer.setImageStream | ( | ByteArrayOutputStream | value | ) |
画像ストリームを設定します。
| value | 画像ストリーム |
| void pao.barcode.YubinCustomer.setImgMargin | ( | int | value | ) |
画像マージンのピクセル数を設定します。
| value | 画像マージンのピクセル数 |
| void pao.barcode.YubinCustomer.setRotateAngle | ( | float | value | ) |
バーコードの回転角度を設定します。
| value | バーコードの回転角度 |
| String pao.barcode.YubinCustomer.writeSVGToString | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | height ) |
バーコードをSVG文字列として生成します。
| code | バーコードとして生成するテキスト |
| x | X座標 |
| y | Y座標 |
| height | バーコードの高さ(ロングバーの長さ、ピクセル単位) |
heightを基準に全ての寸法が決まる:
| String pao.barcode.YubinCustomer.writeSVGToString | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | height, | ||
| float | unused ) |
バーコードをSVG文字列として生成します。 ※このオーバーロードでは第4引数を height として使用します。
| code | バーコードとして生成するテキスト |
| x | X座標 |
| y | Y座標 |
| height | バーコードの高さ(ピクセル単位) |
| unused | 未使用(互換性のため) |