c2of5.java
来自「遗传算法改进神经网络源程序 该小程序可以添加条形码功能到你的网页或者applet」· Java 代码 · 共 76 行
JAVA
76 行
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 2007-11-23 16:17:23
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: C2of5.java
package com.bokai.barcodes;
// Referenced classes of package com.bokai.barcodes:
// BarcodeSpec, Barcode, CharDef
class C2of5 extends BarcodeSpec
{
C2of5()
{
super.bdType = 7;
super.bdTypeName = "2 of 5";
super.bdStyle = 24;
super.bdLongBars = 0;
super.bdCharBitNum = 9;
super.bdCharNum = 10;
super.bdTextLen = 0;
super.bdCentralCharInd = 0;
super.bdBarExtNum = 2;
super.bdBarExt = (new byte[] {
1, 3, 0, 0
});
super.bdSpaceExtNum = 1;
super.bdSpaceExt = (new byte[] {
1, 0, 0, 0
});
super.bdInterCharExt = 1;
super.bdLeftMargin = 6;
super.bdTopMargin = 1;
super.bdRightMargin = 6;
super.bdBottomMargin = 1;
super.bdCentralMargin = 0;
super.bdCharset = (new CharDef[][] {
_chardef_2of5, null, null
});
super.bdCharsetSel = null;
super.bdStyle2 = 0;
super.bdTextLen2 = 0;
super.bdCharset2 = null;
super.bdCharsetSel2 = null;
}
static int _BCM25(int i)
{
return (i & 1) << 1 | 1 | (i & 2) << 4 | 0x10 | (i & 4) << 7 | 0x100 | (i & 8) << 10 | 0x1000 | (i & 0x10) << 13 | 0x10000;
}
CharDef calcCharDef(CharDef achardef[][], byte abyte0[], char ac[], int i)
{
if(i < 0 && i >= -3)
{
i = -i - 1;
return achardef[0][i];
}
if(i >= ac.length)
return null;
char c = ac[i];
if(c >= '0' && c <= '9')
return achardef[0][(c - 48) + 5];
else
return null;
}
static final CharDef _chardef_2of5[] = {
new CharDef(5, 817), new CharDef(0, 0), new CharDef(5, 787), new CharDef(0, 0), new CharDef(0, 0), new CharDef('0', _BCM25(6)), new CharDef('1', _BCM25(17)), new CharDef('2', _BCM25(9)), new CharDef('3', _BCM25(24)), new CharDef('4', _BCM25(5)),
new CharDef('5', _BCM25(20)), new CharDef('6', _BCM25(12)), new CharDef('7', _BCM25(3)), new CharDef('8', _BCM25(18)), new CharDef('9', _BCM25(10))
};
static final String name = "2 of 5";
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?