📄 codabar.java
字号:
// 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: Codabar.java
package com.bokai.barcodes;
// Referenced classes of package com.bokai.barcodes:
// BarcodeSpec, Barcode, CharDef
class Codabar extends BarcodeSpec
{
Codabar()
{
super.bdType = 5;
super.bdTypeName = name;
super.bdStyle = 0;
super.bdLongBars = 0;
super.bdCharBitNum = 7;
super.bdCharNum = 24;
super.bdTextLen = 0;
super.bdCentralCharInd = 0;
super.bdBarExtNum = 2;
super.bdBarExt = (new byte[] {
1, 3, 0, 0
});
super.bdSpaceExtNum = 2;
super.bdSpaceExt = (new byte[] {
1, 3, 0, 0
});
super.bdInterCharExt = 2;
super.bdLeftMargin = 10;
super.bdTopMargin = 1;
super.bdRightMargin = 10;
super.bdBottomMargin = 1;
super.bdCentralMargin = 0;
super.bdCharset = (new CharDef[][] {
_chardef_codabar, null, null
});
super.bdCharsetSel = null;
super.bdStyle2 = 0;
super.bdTextLen2 = 0;
super.bdCharset2 = null;
super.bdCharsetSel2 = null;
}
static int _BCMCAB(int i, int j)
{
return (i & 1) << 1 | 1 | (j & 1) << 3 | (i & 2) << 4 | 0x10 | (j & 2) << 6 | (i & 4) << 7 | 0x100 | (j & 4) << 9 | (i & 8) << 10 | 0x1000;
}
CharDef calcCharDef(CharDef achardef[][], byte abyte0[], char ac[], int i)
{
if(i < 0 || i >= ac.length)
return null;
char c = ac[i];
if(c >= '0' && c <= '9')
return achardef[0][(c - 48) + 5];
if(c >= 'A' && c <= 'D')
c = (char)((c - 65) + 97);
switch(c)
{
case 84: // 'T'
case 116: // 't'
c = 'a';
break;
case 78: // 'N'
case 110: // 'n'
c = 'b';
break;
case 42: // '*'
c = 'c';
break;
case 69: // 'E'
case 101: // 'e'
c = 'd';
break;
}
if(c >= 'a' && c <= 'd')
return achardef[0][(c - 97) + 15];
for(int j = 19; j <= 24; j++)
if(achardef[0][j]._BCGETCHARCODE() == c)
return achardef[0][j];
return null;
}
static final CharDef _chardef_codabar[] = {
new CharDef(0, 0), new CharDef(0, 0), new CharDef(0, 0), new CharDef(0, 0), new CharDef(0, 0), new CharDef('0', _BCMCAB(1, 1)), new CharDef('1', _BCMCAB(2, 1)), new CharDef('2', _BCMCAB(1, 2)), new CharDef('3', _BCMCAB(8, 4)), new CharDef('4', _BCMCAB(4, 1)),
new CharDef('5', _BCMCAB(8, 1)), new CharDef('6', _BCMCAB(1, 4)), new CharDef('7', _BCMCAB(2, 4)), new CharDef('8', _BCMCAB(4, 4)), new CharDef('9', _BCMCAB(8, 2)), new CharDef('a', _BCMCAB(4, 3)), new CharDef('b', _BCMCAB(1, 6)), new CharDef('c', _BCMCAB(1, 3)), new CharDef('d', _BCMCAB(2, 3)), new CharDef('-', _BCMCAB(2, 2)),
new CharDef('$', _BCMCAB(4, 2)), new CharDef(':', _BCMCAB(11, 0)), new CharDef('/', _BCMCAB(13, 0)), new CharDef('.', _BCMCAB(14, 0)), new CharDef('+', _BCMCAB(7, 0)), new CharDef('t', _BCMCAB(4, 3)), new CharDef('n', _BCMCAB(1, 6)), new CharDef('*', _BCMCAB(1, 3)), new CharDef('e', _BCMCAB(2, 3))
};
static String name = "Codabar";
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -