![]() |
Barcode.jar ver 5.0.0
Java 開発者向け バーコード作成ライブラリ(SVG出力・Base64出力対応)
|
公開メンバ関数 | |
| DataMatrix (Graphics2D g) | |
| DataMatrix (String filepath) | |
| DataMatrix () | |
| DataMatrix (String imgFormat, boolean useStream) | |
| String | getStringEncoding () throws Exception |
| void | setStringEncoding (String value) throws Exception |
| DxCodeSize | getCodeSize () throws Exception |
| void | setCodeSize (DxCodeSize value) throws Exception |
| float | getRotateAngle () |
| 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 (byte[] data, float x, float y, float width, float height) throws Exception |
| void | draw (byte[] data, float x, float y, float width, float height, String imgFilePath) throws Exception |
| 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 | drawDelicate (byte[] data, float x, float y, float minLinePitch) throws Exception |
| void | drawDelicate (byte[] data, float x, float y, float minLinePitch, String imgFilePath) 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 | drawDirect (byte[] data, float x, float y, float width, float height) throws Exception |
| void | drawDirect (byte[] data, float x, float y, float width, float height, String imgFilePath) throws Exception |
| void | drawDirect (String code, float x, float y, float width, float height) throws Exception |
| void | drawDirect (String code, float x, float y, float width, float height, String filePath) throws Exception |
| void | WriteSVG (String code, float x, float y, float minLinePitch, String filePath) throws Exception |
| void | WriteSVG (byte data[], 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 |
| String | writeSVGToString (String code, float x, float y, float width, float height) throws Exception |
| String | writeSVGToString (byte[] code, float x, float y, float width, float height) throws Exception |
DataMatrixを生成する2次元バーコードライブラリです。数字、英数字、漢字、かな、ひらがな、記号、バイナリ、制御コードなど、あらゆる種類のデータを扱えます。
| pao.barcode.DataMatrix.DataMatrix | ( | Graphics2D | g | ) |
Byte Data DataMatrixのインスタンスを作成します。
| g | バーコードを描画するGraphics2D |
| pao.barcode.DataMatrix.DataMatrix | ( | String | filepath | ) |
DataMatrixのインスタンスを作成します。
| filePath | 出力画像ファイルパス |
| pao.barcode.DataMatrix.DataMatrix | ( | ) |
DataMatrixのインスタンスを作成します。 画像形式はデフォルトでPNGが設定されます。
このコンストラクタは以下の用途で使用できます:
Graphics2Dやファイルパスを指定せずに、シンプルにバーコードを生成できます。
| pao.barcode.DataMatrix.DataMatrix | ( | String | imgFormat, |
| boolean | useStream ) |
DataMatrixのインスタンスを作成します(メモリストリーム出力用)。
このコンストラクタは、ファイルに保存せずにメモリ上で画像データを取得したい場合に使用します。 生成後、以下のメソッドで画像データを取得できます:
| imgFormat | 出力画像フォーマット("png", "jpeg", "bmp"など)。 nullや空文字、または無効な形式が指定された場合は"png"が使用されます。 |
| useStream | ストリーム出力を使用する場合はtrue。 falseの場合はストリーム機能は無効となり、getImageBase64等は空を返します。 |
| void pao.barcode.DataMatrix.draw | ( | byte[] | data, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
バーコードを描画します。
| data | バーコードに格納するデータをバイト配列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| width | バーコードの全体の幅を指定 |
| height | バーコードのバーの高さを指定 |
| void pao.barcode.DataMatrix.draw | ( | byte[] | data, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height, | ||
| String | imgFilePath ) throws Exception |
バーコードを描画します。 コンストラクタでImageFormat指定時、画像ファイルに描画する。
| data | バーコードに格納するデータをバイト配列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| width | バーコードの全体の幅を指定 |
| height | バーコードのバーの高さを指定 |
| imgFilePath | 画像ファイルパス |
| void pao.barcode.DataMatrix.draw | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
バーコードを描画します。
| code | 描画を行うバーコードのコードを文字列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| width | バーコードの全体の幅を指定 |
| height | バーコードのバーの高さを指定 |
| void pao.barcode.DataMatrix.draw | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height, | ||
| String | filePath ) throws Exception |
バーコードを描画します。 コンストラクタでImageFormat指定時、画像ファイルに描画する。
| code | 描画を行うバーコードのコードを文字列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| width | バーコードの全体の幅を指定 |
| height | バーコードのバーの高さを指定 |
| imgFilePath | 画像ファイルパス |
| void pao.barcode.DataMatrix.drawDelicate | ( | byte[] | data, |
| float | x, | ||
| float | y, | ||
| float | minLinePitch ) throws Exception |
最小ピッチを指定してバーコードを描画します。
| data | バーコードに格納するデータをバイト配列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| minLinePitch | バーコードを描画する間隔の最小幅の値を指定 |
| void pao.barcode.DataMatrix.drawDelicate | ( | byte[] | data, |
| float | x, | ||
| float | y, | ||
| float | minLinePitch, | ||
| String | imgFilePath ) throws Exception |
最小ピッチを指定してバーコードを描画します。 コンストラクタでImageFormat指定時、画像ファイルに描画する。
| data | バーコードに格納するデータをバイト配列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| minLinePitch | バーコードを描画するバーの最小ピッチの値を指定 |
| imgFilePath | 画像ファイルパス |
| void pao.barcode.DataMatrix.drawDelicate | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | minLinePitch ) throws Exception |
最小ピッチを指定してバーコードを描画します。
| code | 描画を行うバーコードのコードを文字列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| minLinePitch | バーコードを描画する間隔の最小幅の値を指定 |
| void pao.barcode.DataMatrix.drawDelicate | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | minLinePitch, | ||
| String | filePath ) throws Exception |
最小ピッチを指定してバーコードを描画します。 コンストラクタでImageFormat指定時、画像ファイルに描画する。
| code | 描画を行うバーコードのコードを文字列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| minLinePitch | バーコードを描画するバーの最小ピッチの値を指定 |
| filePath | 画像ファイルパス |
| void pao.barcode.DataMatrix.drawDirect | ( | byte[] | data, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
ピクセル単位で直接バーコードを描画します。
| data | バーコードに格納するデータをバイト配列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| width | バーコードの全体の幅を指定 |
| height | バーコードのバーの高さを指定 |
| void pao.barcode.DataMatrix.drawDirect | ( | byte[] | data, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height, | ||
| String | imgFilePath ) throws Exception |
ピクセル単位で直接バーコードを描画します。 コンストラクタでImageFormat指定時、画像ファイルに描画する。
| data | バーコードに格納するデータをバイト配列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| width | バーコードの全体の幅を指定 |
| height | バーコードのバーの高さを指定 |
| imgFilePath | 画像ファイルパス |
| void pao.barcode.DataMatrix.drawDirect | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
ピクセル単位で直接バーコードを描画します。
| code | 描画を行うバーコードのコードを文字列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| width | バーコードの全体の幅を指定 |
| height | バーコードのバーの高さを指定 |
| void pao.barcode.DataMatrix.drawDirect | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height, | ||
| String | filePath ) throws Exception |
ピクセル単位で直接バーコードを描画します。 コンストラクタでImageFormat指定時、画像ファイルに描画する。
| code | 描画を行うバーコードのコードを文字列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| width | バーコードの全体の幅を指定 |
| height | バーコードのバーの高さを指定 |
| filePath | 画像ファイルパス |
| Color pao.barcode.DataMatrix.getBackColor | ( | ) |
背景色を取得します。
| DxCodeSize pao.barcode.DataMatrix.getCodeSize | ( | ) | throws Exception |
シンボルコードサイズを取得します。
| float pao.barcode.DataMatrix.getDrawDelicateWidth | ( | byte | code[], |
| float | minLinePitch ) throws Exception |
描画時のバーコード幅を取得します。
| code | バーコードに格納するデータのバイト配列 |
| minLinePitch | バーコードを描画する間隔の最小幅の値 |
| Exception | 例外 |
| float pao.barcode.DataMatrix.getDrawDelicateWidth | ( | String | code, |
| float | minLinePitch ) throws Exception |
描画時のバーコード幅を取得します。
| code | バーコードに格納するコード文字列 |
| minLinePitch | バーコードを描画する間隔の最小幅の値 |
| Exception | 例外 |
| float pao.barcode.DataMatrix.getDrawDirectWidth | ( | byte | code[], |
| float | width ) throws Exception |
描画時のバーコード幅を取得します。
| code | バーコードに格納するデータのバイト配列 |
| width | バーコードの全体の幅 |
| Exception | 例外 |
| float pao.barcode.DataMatrix.getDrawDirectWidth | ( | String | code, |
| float | width ) throws Exception |
描画時のバーコード幅を取得します。
| code | バーコードに格納するコード文字列 |
| width | バーコードの全体の幅 |
| Exception | 例外 |
| Color pao.barcode.DataMatrix.getForeColor | ( | ) |
バーの色(前景色)を取得します。
| String pao.barcode.DataMatrix.getImageBase64 | ( | ) |
画像をBase64エンコードした文字列を取得します。
| String pao.barcode.DataMatrix.getImageFormat | ( | ) |
画像フォーマットを取得します。
| ByteArrayOutputStream pao.barcode.DataMatrix.getImageStream | ( | ) |
画像ストリームを取得します。
| int pao.barcode.DataMatrix.getImgMargin | ( | ) |
画像マージンのピクセル数を取得します。
| float pao.barcode.DataMatrix.getRotateAngle | ( | ) |
バーコードの回転角度を取得します。
| String pao.barcode.DataMatrix.getStringEncoding | ( | ) | throws Exception |
文字エンコーディングを取得します。
| void pao.barcode.DataMatrix.setBackColor | ( | Color | value | ) |
背景色を設定します。 画像データ保存時のみ有効です。nullを指定すると透明になります。
| value | 背景色 |
| void pao.barcode.DataMatrix.setCodeSize | ( | DxCodeSize | value | ) | throws Exception |
シンボルコードサイズを設定します。
| value | シンボルコードサイズ |
| void pao.barcode.DataMatrix.setForeColor | ( | Color | value | ) |
バーの色(前景色)を設定します。
| value | バーの色 |
| void pao.barcode.DataMatrix.setImageFormat | ( | String | value | ) |
画像フォーマットを設定します。
| value | 画像フォーマット ("png", "jpeg", "bmp"など) |
| void pao.barcode.DataMatrix.setImageStream | ( | ByteArrayOutputStream | value | ) |
画像ストリームを設定します。
| value | 画像ストリーム |
| void pao.barcode.DataMatrix.setImgMargin | ( | int | value | ) |
画像マージンのピクセル数を設定します。
| value | 画像マージンのピクセル数 |
| void pao.barcode.DataMatrix.setStringEncoding | ( | String | value | ) | throws Exception |
文字エンコーディングを設定します。
| value | 文字エンコーディング |
| void pao.barcode.DataMatrix.WriteSVG | ( | byte | data[], |
| float | x, | ||
| float | y, | ||
| float | minLinePitch, | ||
| String | filePath ) throws Exception |
SVG形式でバーコードを出力します。
| data | バーコードに格納するデータをバイト配列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| minLinePitch | バーコードを描画する間隔の最小幅の値を指定 |
| filePath | SVGファイルのファイル名をフルパスで指定 |
| void pao.barcode.DataMatrix.WriteSVG | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | minLinePitch, | ||
| String | filePath ) throws Exception |
SVG形式でバーコードを出力します。
| code | 描画を行うバーコードのコードを文字列で指定 |
| x | 描画位置の始点(左上)のX座標を指定 |
| y | 描画位置の始点(左上)のY座標を指定 |
| minLinePitch | バーコードを描画する間隔の最小幅の値を指定 |
| filePath | SVGファイルのファイル名をフルパスで指定 |
| String pao.barcode.DataMatrix.writeSVGToString | ( | byte[] | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
SVG形式でバーコードを出力します。
| code | バーコードに格納するデータのバイト配列 |
| x | 描画位置の始点(左上)のX座標 |
| y | 描画位置の始点(左上)のY座標 |
| width | バーコードの全体の幅 |
| height | バーコードの高さ |
| Exception | 例外 |
| String pao.barcode.DataMatrix.writeSVGToString | ( | String | code, |
| float | x, | ||
| float | y, | ||
| float | width, | ||
| float | height ) throws Exception |
SVG形式でバーコードを出力します。
| code | バーコードに格納するコード文字列 |
| x | 描画位置の始点(左上)のX座標 |
| y | 描画位置の始点(左上)のY座標 |
| width | バーコードの全体の幅 |
| height | バーコードの高さ |
| Exception | 例外 |