|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.java4less.j4ldatamatrix.DataMatrix
public class DataMatrix
The class DataMatrix that creates data matrix barcode symbols. Data Matrix is a two-dimensional (2D) matrix symbology which is made up of square modules arranged within a perimeter finder pattern. It can encode up to 3116 characters from the entire 256 byte ASCII character set and it supports advanced encoding error checking and correction algorithms (reed-solomon). This algorithms allow the recognition of barcodes that are up to 60% damaged.
The following example illustrates how to create a bar code:
DataMatrix cb=new DataMatrix();
cb.encoding=cb.E_AUTO; // set type of encoding
cb.code="This is a test";
You can paint the barcode using the DatamatrixCanvas object or call the paint()
method which returns the barcode as an array of integers.
Field Summary | |
---|---|
static int |
C104X104
|
static int |
C10X10
C10x10 to C144x144 are the possible formats of the barcode (see Data Matrix Manual for more information about formats). |
static int |
C120X120
|
static int |
C12X12
|
static int |
C12X26
|
static int |
C12X36
|
static int |
C132X132
|
static int |
C144X144
|
static int |
C14X14
|
static int |
C16X16
|
static int |
C16X36
|
static int |
C16X48
|
static int |
C18X18
|
static int |
C20X20
|
static int |
C22X22
|
static int |
C24X24
|
static int |
C26X26
|
static int |
C32X32
|
static int |
C36X36
|
static int |
C40X40
|
static int |
C44X44
|
static int |
C48X48
|
static int |
C52X52
|
static int |
C64X64
|
static int |
C72X72
|
static int |
C80X80
|
static int |
C88X88
|
static int |
C8X18
|
static int |
C8X32
|
static int |
C96X96
|
java.lang.String |
code
text to be encoded as barcode. |
byte[] |
codeBinary
bytes for binary encoding |
static int |
E_ASCII
ascii encoding (see Data Matrix Manual for more information ). |
static int |
E_AUTO
automatic encoding. |
static int |
E_BASE256
base 256 encoding. |
static int |
E_C40
c40 encoding (see Data Matrix Manual for more information ). |
static int |
E_NONE
|
static int |
E_TEXT
text encoding (see Data Matrix Manual for more information ). |
int |
encoding
selects the encoding you want to use: E_AUTO, E_ASCII (default), E_C40, E_TEXT or E_BASE256. |
int |
preferredFormat
if -1 (default) , the class wil automatically select the format of the symbol. |
boolean |
processTilde
if true (default is false) the class will process the ~ character in the input data (see help file for more information ). |
boolean |
reBuild
set this field to true if you want to redraw the symbol. |
Constructor Summary | |
---|---|
DataMatrix()
|
Method Summary | |
---|---|
int |
getCalculatedFormat()
|
int[][] |
paint()
creates the barcode and return an array where each element is a dot in the matrix. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String code
public boolean processTilde
public boolean reBuild
public byte[] codeBinary
public static final int C10X10
public static final int C12X12
public static final int C14X14
public static final int C16X16
public static final int C18X18
public static final int C20X20
public static final int C22X22
public static final int C24X24
public static final int C26X26
public static final int C32X32
public static final int C36X36
public static final int C40X40
public static final int C44X44
public static final int C48X48
public static final int C52X52
public static final int C64X64
public static final int C72X72
public static final int C80X80
public static final int C88X88
public static final int C96X96
public static final int C104X104
public static final int C120X120
public static final int C132X132
public static final int C144X144
public static final int C8X18
public static final int C8X32
public static final int C12X26
public static final int C12X36
public static final int C16X36
public static final int C16X48
public int encoding
public static int E_ASCII
public static int E_C40
public static int E_TEXT
public static int E_BASE256
public static int E_NONE
public static int E_AUTO
public int preferredFormat
Constructor Detail |
---|
public DataMatrix()
Method Detail |
---|
public int getCalculatedFormat()
public int[][] paint()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |