The dFontDM Java class may be used to return strings that contain rows of characters that, when displayed in the AZT font form a DataMatrix symbol. The class may be used directly or through the dFontDM.jar provided.
The class is instantiated with the new command:
dFontDM dm1=new dFontDM();
and the required properties set using the setModeType() and setLevel() methods. The data is supplied to the class using the setCaption() methods and the update) method called to generated the barcode characters.
The number of rows of characters in the resulting barcode may be obtained from the getNStrings() method, and each line of the barcode returned using getBarcodeString(i), eg.
//g is output graphics – screen or printer
// ht is the
chose font height in points
//x and y are the top left coordinated required
for the symbol
n=dm1.getNStrings();
for (i=0; i<n; i++)
{
g.drawString(dm1.getBarcodeString(i),x,(y+i*ht)); }
Details of the properties and methods implemented in the java class are given in the Common Java class Features section
More: