⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modulefactory.java

📁 这是个国外JAVA爱好者写的条形码生成器
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
        /*CAN*/	A_KEYS.add("\030"); A_SET.put("\030", new Module(new int[] {4, 2, 1, 2, 1, 1}));
        /*EM*/	A_KEYS.add("\031"); A_SET.put("\031", new Module(new int[] {2, 1, 2, 1, 4, 1}));
        /*SUB*/	A_KEYS.add("\032"); A_SET.put("\032", new Module(new int[] {2, 1, 4, 1, 2, 1}));
        /*ESC*/	A_KEYS.add("\033"); A_SET.put("\033", new Module(new int[] {4, 1, 2, 1, 2, 1}));
        /*FS*/	A_KEYS.add("\034"); A_SET.put("\034", new Module(new int[] {1, 1, 1, 1, 4, 3}));
        /*GS*/	A_KEYS.add("\035"); A_SET.put("\035", new Module(new int[] {1, 1, 1, 3, 4, 1}));
        /*RS*/	A_KEYS.add("\036"); A_SET.put("\036", new Module(new int[] {1, 3, 1, 1, 4, 1}));
        /*US*/	A_KEYS.add("\037"); A_SET.put("\037", new Module(new int[] {1, 1, 4, 1, 1, 3}));
        A_KEYS.add("\304"); A_SET.put("\304", new Module(new int[] {1, 1, 4, 3, 1, 1})); // FNC3
        A_KEYS.add("\305"); A_SET.put("\305", new Module(new int[] {4, 1, 1, 1, 1, 3})); // FNC2
        A_KEYS.add("\306"); A_SET.put("\306", new ShiftModule(new int[] {4, 1, 1, 3, 1, 1})); // SHIFT
        A_KEYS.add("\307");
        A_SET.put("\307", new CodeChangeModule(new int[] {1, 1, 3, 1, 4, 1}, Code128Barcode.C)); // CODE C
        A_KEYS.add("\310");
        A_SET.put("\310", new CodeChangeModule(new int[] {1, 1, 4, 1, 3, 1}, Code128Barcode.B)); // CODE B
        A_KEYS.add("\311");
        A_SET.put("\311", new Module(new int[] {3, 1, 1, 1, 4, 1})); // FNC4
        A_KEYS.add("\312");
        A_SET.put("\312", new Module(new int[] {4, 1, 1, 1, 3, 1})); // FNC1
    }
    
    /**
     * Initialise the module definitions.
     */
    private static void initB() {
        B_KEYS.add(" "); B_SET.put(" ", new Module(new int[] {2, 1, 2, 2, 2, 2}));
        B_KEYS.add("!"); B_SET.put("!", new Module(new int[] {2, 2, 2, 1, 2, 2}));
        B_KEYS.add("\""); B_SET.put("\"", new Module(new int[] {2, 2, 2, 2, 2, 1}));
        B_KEYS.add("#"); B_SET.put("#", new Module(new int[] {1, 2, 1, 2, 2, 3}));
        B_KEYS.add("$"); B_SET.put("$", new Module(new int[] {1, 2, 1, 3, 2, 2}));
        B_KEYS.add("%"); B_SET.put("%", new Module(new int[] {1, 3, 1, 2, 2, 2}));
        B_KEYS.add("&"); B_SET.put("&", new Module(new int[] {1, 2, 2, 2, 1, 3}));
        B_KEYS.add("'"); B_SET.put("'", new Module(new int[] {1, 2, 2, 3, 1, 2}));
        B_KEYS.add("("); B_SET.put("(", new Module(new int[] {1, 3, 2, 2, 1, 2}));
        B_KEYS.add(")"); B_SET.put(")", new Module(new int[] {2, 2, 1, 2, 1, 3}));
        B_KEYS.add("*"); B_SET.put("*", new Module(new int[] {2, 2, 1, 3, 1, 2}));
        B_KEYS.add("+"); B_SET.put("+", new Module(new int[] {2, 3, 1, 2, 1, 2}));
        B_KEYS.add(","); B_SET.put(",", new Module(new int[] {1, 1, 2, 2, 3, 2}));
        B_KEYS.add("-"); B_SET.put("-", new Module(new int[] {1, 2, 2, 1, 3, 2}));
        B_KEYS.add("."); B_SET.put(".", new Module(new int[] {1, 2, 2, 2, 3, 1}));
        B_KEYS.add("/"); B_SET.put("/", new Module(new int[] {1, 1, 3, 2, 2, 2}));
        B_KEYS.add("0"); B_SET.put("0", new Module(new int[] {1, 2, 3, 1, 2, 2}));
        B_KEYS.add("1"); B_SET.put("1", new Module(new int[] {1, 2, 3, 2, 2, 1}));
        B_KEYS.add("2"); B_SET.put("2", new Module(new int[] {2, 2, 3, 2, 1, 1}));
        B_KEYS.add("3"); B_SET.put("3", new Module(new int[] {2, 2, 1, 1, 3, 2}));
        B_KEYS.add("4"); B_SET.put("4", new Module(new int[] {2, 2, 1, 2, 3, 1}));
        B_KEYS.add("5"); B_SET.put("5", new Module(new int[] {2, 1, 3, 2, 1, 2}));
        B_KEYS.add("6"); B_SET.put("6", new Module(new int[] {2, 2, 3, 1, 1, 2}));
        B_KEYS.add("7"); B_SET.put("7", new Module(new int[] {3, 1, 2, 1, 3, 1}));
        B_KEYS.add("8"); B_SET.put("8", new Module(new int[] {3, 1, 1, 2, 2, 2}));
        B_KEYS.add("9"); B_SET.put("9", new Module(new int[] {3, 2, 1, 1, 2, 2}));
        B_KEYS.add(":"); B_SET.put(":", new Module(new int[] {3, 2, 1, 2, 2, 1}));
        B_KEYS.add(";"); B_SET.put(";", new Module(new int[] {3, 1, 2, 2, 1, 2}));
        B_KEYS.add("<"); B_SET.put("<", new Module(new int[] {3, 2, 2, 1, 1, 2}));
        B_KEYS.add("="); B_SET.put("=", new Module(new int[] {3, 2, 2, 2, 1, 1}));
        B_KEYS.add(">"); B_SET.put(">", new Module(new int[] {2, 1, 2, 1, 2, 3}));
        B_KEYS.add("?"); B_SET.put("?", new Module(new int[] {2, 1, 2, 3, 2, 1}));
        B_KEYS.add("@"); B_SET.put("@", new Module(new int[] {2, 3, 2, 1, 2, 1}));
        B_KEYS.add("A"); B_SET.put("A", new Module(new int[] {1, 1, 1, 3, 2, 3}));
        B_KEYS.add("B"); B_SET.put("B", new Module(new int[] {1, 3, 1, 1, 2, 3}));
        B_KEYS.add("C"); B_SET.put("C", new Module(new int[] {1, 3, 1, 3, 2, 1}));
        B_KEYS.add("D"); B_SET.put("D", new Module(new int[] {1, 1, 2, 3, 1, 3}));
        B_KEYS.add("E"); B_SET.put("E", new Module(new int[] {1, 3, 2, 1, 1, 3}));
        B_KEYS.add("F"); B_SET.put("F", new Module(new int[] {1, 3, 2, 3, 1, 1}));
        B_KEYS.add("G"); B_SET.put("G", new Module(new int[] {2, 1, 1, 3, 1, 3}));
        B_KEYS.add("H"); B_SET.put("H", new Module(new int[] {2, 3, 1, 1, 1, 3}));
        B_KEYS.add("I"); B_SET.put("I", new Module(new int[] {2, 3, 1, 3, 1, 1}));
        B_KEYS.add("J"); B_SET.put("J", new Module(new int[] {1, 1, 2, 1, 3, 3}));
        B_KEYS.add("K"); B_SET.put("K", new Module(new int[] {1, 1, 2, 3, 3, 1}));
        B_KEYS.add("L"); B_SET.put("L", new Module(new int[] {1, 3, 2, 1, 3, 1}));
        B_KEYS.add("M"); B_SET.put("M", new Module(new int[] {1, 1, 3, 1, 2, 3}));
        B_KEYS.add("N"); B_SET.put("N", new Module(new int[] {1, 1, 3, 3, 2, 1}));
        B_KEYS.add("O"); B_SET.put("O", new Module(new int[] {1, 3, 3, 1, 2, 1}));
        B_KEYS.add("P"); B_SET.put("P", new Module(new int[] {3, 1, 3, 1, 2, 1}));
        B_KEYS.add("Q"); B_SET.put("Q", new Module(new int[] {2, 1, 1, 3, 3, 1}));
        B_KEYS.add("R"); B_SET.put("R", new Module(new int[] {2, 3, 1, 1, 3, 1}));
        B_KEYS.add("S"); B_SET.put("S", new Module(new int[] {2, 1, 3, 1, 1, 3}));
        B_KEYS.add("T"); B_SET.put("T", new Module(new int[] {2, 1, 3, 3, 1, 1}));
        B_KEYS.add("U"); B_SET.put("U", new Module(new int[] {2, 1, 3, 1, 3, 1}));
        B_KEYS.add("V"); B_SET.put("V", new Module(new int[] {3, 1, 1, 1, 2, 3}));
        B_KEYS.add("W"); B_SET.put("W", new Module(new int[] {3, 1, 1, 3, 2, 1}));
        B_KEYS.add("X"); B_SET.put("X", new Module(new int[] {3, 3, 1, 1, 2, 1}));
        B_KEYS.add("Y"); B_SET.put("Y", new Module(new int[] {3, 1, 2, 1, 1, 3}));
        B_KEYS.add("Z"); B_SET.put("Z", new Module(new int[] {3, 1, 2, 3, 1, 1}));
        B_KEYS.add("["); B_SET.put("[", new Module(new int[] {3, 3, 2, 1, 1, 1}));
        B_KEYS.add("\\"); B_SET.put("\\", new Module(new int[] {3, 1, 4, 1, 1, 1}));
        B_KEYS.add("]"); B_SET.put("]", new Module(new int[] {2, 2, 1, 4, 1, 1}));
        B_KEYS.add("^"); B_SET.put("^", new Module(new int[] {4, 3, 1, 1, 1, 1}));
        B_KEYS.add("_"); B_SET.put("_", new Module(new int[] {1, 1, 1, 2, 2, 4}));
        B_KEYS.add("`"); B_SET.put("`", new Module(new int[] {1, 1, 1, 4, 2, 2}));
        B_KEYS.add("a"); B_SET.put("a", new Module(new int[] {1, 2, 1, 1, 2, 4}));
        B_KEYS.add("b"); B_SET.put("b", new Module(new int[] {1, 2, 1, 4, 2, 1}));
        B_KEYS.add("c"); B_SET.put("c", new Module(new int[] {1, 4, 1, 1, 2, 2}));
        B_KEYS.add("d"); B_SET.put("d", new Module(new int[] {1, 4, 1, 2, 2, 1}));
        B_KEYS.add("e"); B_SET.put("e", new Module(new int[] {1, 1, 2, 2, 1, 4}));
        B_KEYS.add("f"); B_SET.put("f", new Module(new int[] {1, 1, 2, 4, 1, 2}));
        B_KEYS.add("g"); B_SET.put("g", new Module(new int[] {1, 2, 2, 1, 1, 4}));
        B_KEYS.add("h"); B_SET.put("h", new Module(new int[] {1, 2, 2, 4, 1, 1}));
        B_KEYS.add("i"); B_SET.put("i", new Module(new int[] {1, 4, 2, 1, 1, 2}));
        B_KEYS.add("j"); B_SET.put("j", new Module(new int[] {1, 4, 2, 2, 1, 1}));
        B_KEYS.add("k"); B_SET.put("k", new Module(new int[] {2, 4, 1, 2, 1, 1}));
        B_KEYS.add("l"); B_SET.put("l", new Module(new int[] {2, 2, 1, 1, 1, 4}));
        B_KEYS.add("m"); B_SET.put("m", new Module(new int[] {4, 1, 3, 1, 1, 1}));
        B_KEYS.add("n"); B_SET.put("n", new Module(new int[] {2, 4, 1, 1, 1, 2}));
        B_KEYS.add("o"); B_SET.put("o", new Module(new int[] {1, 3, 4, 1, 1, 1}));
        B_KEYS.add("p"); B_SET.put("p", new Module(new int[] {1, 1, 1, 2, 4, 2}));
        B_KEYS.add("q"); B_SET.put("q", new Module(new int[] {1, 2, 1, 1, 4, 2}));
        B_KEYS.add("r"); B_SET.put("r", new Module(new int[] {1, 2, 1, 2, 4, 1}));
        B_KEYS.add("s"); B_SET.put("s", new Module(new int[] {1, 1, 4, 2, 1, 2}));
        B_KEYS.add("t"); B_SET.put("t", new Module(new int[] {1, 2, 4, 1, 1, 2}));
        B_KEYS.add("u"); B_SET.put("u", new Module(new int[] {1, 2, 4, 2, 1, 1}));
        B_KEYS.add("v"); B_SET.put("v", new Module(new int[] {4, 1, 1, 2, 1, 2}));
        B_KEYS.add("w"); B_SET.put("w", new Module(new int[] {4, 2, 1, 1, 1, 2}));
        B_KEYS.add("x"); B_SET.put("x", new Module(new int[] {4, 2, 1, 2, 1, 1}));
        B_KEYS.add("y"); B_SET.put("y", new Module(new int[] {2, 1, 2, 1, 4, 1}));
        B_KEYS.add("z"); B_SET.put("z", new Module(new int[] {2, 1, 4, 1, 2, 1}));
        B_KEYS.add("{"); B_SET.put("{", new Module(new int[] {4, 1, 2, 1, 2, 1}));
        B_KEYS.add("|"); B_SET.put("|", new Module(new int[] {1, 1, 1, 1, 4, 3}));
        B_KEYS.add("}"); B_SET.put("}", new Module(new int[] {1, 1, 1, 3, 4, 1}));
        B_KEYS.add("~"); B_SET.put("~", new Module(new int[] {1, 3, 1, 1, 4, 1}));
        B_KEYS.add("\303"); B_SET.put("\303", new Module(new int[] {1, 1, 4, 1, 1, 3})); // DEL 10111101000
        B_KEYS.add("\304"); B_SET.put("\304", new Module(new int[] {1, 1, 4, 3, 1, 1}));
        B_KEYS.add("\305"); B_SET.put("\305", new Module(new int[] {4, 1, 1, 1, 1, 3}));
        B_KEYS.add("\306");
        B_SET.put("\306", new ShiftModule(new int[] {4, 1, 1, 3, 1, 1})); // SHIFT
        B_KEYS.add("\307");
        B_SET.put("\307", new CodeChangeModule(new int[] {1, 1, 3, 1, 4, 1}, Code128Barcode.C)); // CODE C
        B_KEYS.add("\310");
        B_SET.put("\310", new Module(new int[] {1, 1, 4, 1, 3, 1}));
        B_KEYS.add("\311");
        B_SET.put("\311", new CodeChangeModule(new int[] {3, 1, 1, 1, 4, 1}, Code128Barcode.A)); // CODE A
        B_KEYS.add("\312");
        B_SET.put("\312", new Module(new int[] {4, 1, 1, 1, 3, 1}));
    }
    
    /**
     * Initialise the module definitions.
     */
    private static void initC() {
        C_KEYS.add("00"); C_SET.put("00", new Module(new int[] {2, 1, 2, 2, 2, 2}));
        C_KEYS.add("01"); C_SET.put("01", new Module(new int[] {2, 2, 2, 1, 2, 2}));
        C_KEYS.add("02"); C_SET.put("02", new Module(new int[] {2, 2, 2, 2, 2, 1}));
        C_KEYS.add("03"); C_SET.put("03", new Module(new int[] {1, 2, 1, 2, 2, 3}));
        C_KEYS.add("04"); C_SET.put("04", new Module(new int[] {1, 2, 1, 3, 2, 2}));
        C_KEYS.add("05"); C_SET.put("05", new Module(new int[] {1, 3, 1, 2, 2, 2}));
        C_KEYS.add("06"); C_SET.put("06", new Module(new int[] {1, 2, 2, 2, 1, 3}));
        C_KEYS.add("07"); C_SET.put("07", new Module(new int[] {1, 2, 2, 3, 1, 2}));
        C_KEYS.add("08"); C_SET.put("08", new Module(new int[] {1, 3, 2, 2, 1, 2}));
        C_KEYS.add("09"); C_SET.put("09", new Module(new int[] {2, 2, 1, 2, 1, 3}));
        C_KEYS.add("10"); C_SET.put("10", new Module(new int[] {2, 2, 1, 3, 1, 2}));
        C_KEYS.add("11"); C_SET.put("11", new Module(new int[] {2, 3, 1, 2, 1, 2}));
        C_KEYS.add("12"); C_SET.put("12", new Module(new int[] {1, 1, 2, 2, 3, 2}));
        C_KEYS.add("13"); C_SET.put("13", new Module(new int[] {1, 2, 2, 1, 3, 2}));
        C_KEYS.add("14"); C_SET.put("14", new Module(new int[] {1, 2, 2, 2, 3, 1}));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -