[]
        
首页
开发者学堂
文档
论坛
市场
生态机会
活动
立即试用
(Showing Draft Content)

EccMode

Enum Class EccMode

java.lang.Object
java.lang.Enum<EccMode>
com.grapecity.documents.excel.EccMode
All Implemented Interfaces:
Serializable, Comparable<EccMode>, Constable

public enum EccMode extends Enum<EccMode>
指定 DataMatrix 条形码使用的纠错模式。

此枚举确定如何保护条形码数据以防错误。不同模式提供不同级别的纠错能力,并可能影响生成的符号大小。例如, ECC000 仅使用 CRC 校验和,通常生成最小的符号大小;而 ECC200 是推荐模式,使用 Reed-Solomon 纠错算法。


 worksheet.getRange("A1").setValue("Test");
 worksheet.getRange("B1").setFormula("=BC_DATAMATRIX(A1,\"rgb(0, 0, 0)\",\"rgb(255, 255, 255)\",\"" + EccMode.ECC200.name() + "\",\"squareAuto\",\"auto\",\"auto\",FALSE,0,0,4,4,4,4)");
 IDataMatrix dataMatrix = (IDataMatrix) worksheet.getRange("B1").getValue();
 EccMode eccMode = dataMatrix.getEccMode();
 
  • Enum Constant Details

    • ECC000

      public static final EccMode ECC000
      ECC000。此模式仅使用 CRC 校验和对数据进行编码,不包含额外的错误检查位。

      使用此 ECC 模式编码的数据通常需要最小的符号大小。

    • ECC050

      public static final EccMode ECC050
      指定 Data Matrix 条形码的 ECC050 模式。

      此值选择旧版 ECC000-140 纠错模式之一。

    • ECC080

      public static final EccMode ECC080
      指定 DataMatrix 条形码的 ECC080 模式。

      此值选择旧版 ECC000-140 错误校正模式之一。

    • ECC100

      public static final EccMode ECC100
      指定 DataMatrix 条形码的 ECC100 模式。

      此值选择旧版 ECC000-140 错误校正模式之一。

    • ECC140

      public static final EccMode ECC140
      指定 DataMatrix 条形码的 ECC140 模式。

      此值选择旧版 ECC000-140 错误校正模式之一。

    • ECC200

      public static final EccMode ECC200
      ECC200。这是建议使用的 ECC 模式。

      使用此 ECC 模式编码的数据受 Reed-Solomon 错误检查和校正算法保护。

  • Method Details

    • values

      public static EccMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EccMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null