|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Canvas
com.java4less.rbarcode.BarCode
com.java4less.rdatamatrix.RDataMatrix
public class RDataMatrix
The class RDataMatrix is a subclass of BarCode (which is a subclass of
java.awt.Canvas) 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.
Other features are:
All sizes and formats (from 10x10 till 144x144)
Ascii, text , C40 and Base256 (for binary data) encoding.
The "Extended Channel Interpretation and Structured append
Configuration of colors and size of modules (points).
The following example illustrates how to create a bar code:
RDataMatrix cb=new RDataMatrix();
cb.dotPixels=4; // set size of the square modules, in pixels
cb.encoding=cb.E_AUTO; // set type of encoding
cb.barColor=java.awt.Color.red; // set color of bacode
cb.code="This is a test";
myForm.add(cb); // add the barcode to your form or container
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
|
byte[] |
codeBinary
bytes for binary encoding |
int |
dotPixels
Size in pixels of the square modules that made up the symbol. |
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 |
margin
margin in pixels of the symbol |
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. |
Fields inherited from class com.java4less.rbarcode.BarCode |
---|
backColor, BAR39, BAR39EXT, barColor, barHeightCM, barType, checkCharacter, CODABAR, CODABARStartChar, CODABARStopChar, code, CODE11, CODE128, Code128Set, CODE93, CODE93EXT, codeText, DATAMATRIX, EAN128, EAN13, EAN8, fontColor, guardBars, H, I, IND25, INTERLEAVED25, L, leftMarginCM, MAT25, MSI, MSI_CHECKSUM_10, MSI_CHECKSUM_10_10, MSI_CHECKSUM_11, MSI_CHECKSUM_11_10, MSIChecksum, N, PDF417, POSTNET, postnetHeightShortBar, postnetHeightTallBar, resolution, rotate, supHeight, supplement, supSeparationCM, textFont, textOnTop, topMarginCM, UPCA, UPCE, UPCEANSupplement2, UPCEANSupplement5, UPCESytem, X |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
RDataMatrix()
|
Method Summary | |
---|---|
int[][] |
getBarcodeAsArray()
returns the barcode as an array where the values=0 are white dots and the values !=0 are black dots |
int |
getCalculatedFormat()
|
int |
getPaintedHeight()
|
int |
getPaintedWidth()
|
Methods inherited from class com.java4less.rbarcode.BarCode |
---|
getAiLen, getEAN128Text, getFixedFieldLen, getPaintedArea, paint, print |
Methods inherited from class java.awt.Canvas |
---|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int dotPixels
public int margin
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 RDataMatrix()
Method Detail |
---|
public int getCalculatedFormat()
public int getPaintedWidth()
public int getPaintedHeight()
public int[][] getBarcodeAsArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |