All names
Class MSBBarCode.BarCode
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----MSBBarCode.BarCode
- public class BarCode
- extends Canvas
Main class. This is a canva object where the barcode will be painted.
backColor
- backgrrund color.
BAR39
BAR39EXT
barColor
- color of the bars.
barHeightCM
- bar height in CM.
barType
- type of barcode.
checkCharacter
- if true, the checksum character will be calculated and appended to
the code.
CODABAR
CODABARStartChar
- start character for CODABAR.
CODABARStopChar
- stop character for CODABAR.
code
- text to be painted as barcode.
CODE11
CODE128
Code128Set
- set of character to be used in code 128.
CODE93
CODE93EXT
codeText
- text after encoding.
EAN13
EAN8
fontColor
- color of the text.
guardBars
- if true (default), guardbars in EAN and UPC codes will be longer than
data bars.
H
- height of bars.
I
- space between 2 characters (code 39).
IND25
INTERLEAVED25
L
- Symbol lentgh in CM.
leftMarginCM
- left margin of the barcode (also know as quite zone).
MAT25
MSI
N
- multiplicator value for width bars.
PDF417
POSTNET
postnetHeightShortBar
- height in CM of POSTNET's short bars.
postnetHeightTallBar
- height in CM of POSTNET's tall bars.
resolution
- resolution used to convert from CM to pixels.
rotate
- rotation angle.
supHeight
- height of the supplement.
supplement
supSeparationCM
- Separation in CN between the barcode and the supplement
textFont
- font of the text.
topMarginCM
- top margin of the barcode (also know as quite zone).
UPCA
UPCE
UPCEANSupplement2
- 2 digit supplement for EAN or UPC codes.
UPCEANSupplement5
- 5 digit supplement for EAN or UPC codes.
UPCESytem
- system to be used in UPCE.
X
- size in CM of modules (narrow bars or spaces).
BarCode()
paint(Graphics)
- paints the barcode and rotates it if necessary
BAR39
public static final int BAR39
BAR39EXT
public static final int BAR39EXT
INTERLEAVED25
public static final int INTERLEAVED25
CODE11
public static final int CODE11
CODABAR
public static final int CODABAR
MSI
public static final int MSI
UPCA
public static final int UPCA
IND25
public static final int IND25
MAT25
public static final int MAT25
CODE93
public static final int CODE93
EAN13
public static final int EAN13
EAN8
public static final int EAN8
UPCE
public static final int UPCE
CODE128
public static final int CODE128
CODE93EXT
public static final int CODE93EXT
POSTNET
public static final int POSTNET
PDF417
public static final int PDF417
barType
public int barType
- type of barcode.
code
public String code
- text to be painted as barcode.
checkCharacter
public boolean checkCharacter
- if true, the checksum character will be calculated and appended to
the code.
postnetHeightTallBar
public double postnetHeightTallBar
- height in CM of POSTNET's tall bars. The default is 0,25
postnetHeightShortBar
public double postnetHeightShortBar
- height in CM of POSTNET's short bars. The default is 0,125
leftMarginCM
public double leftMarginCM
- left margin of the barcode (also know as quite zone). The default is
05. CM.
topMarginCM
public double topMarginCM
- top margin of the barcode (also know as quite zone). The default is
05. CM.
supplement
public String supplement
guardBars
public boolean guardBars
- if true (default), guardbars in EAN and UPC codes will be longer than
data bars.
backColor
public Color backColor
- backgrrund color.
codeText
public String codeText
- text after encoding. It will contain the appenden checksum, if calculated.
resolution
public int resolution
- resolution used to convert from CM to pixels. The value is pixels/CM.
The default is the resolution of the screen.
barHeightCM
public double barHeightCM
- bar height in CM. If 0 it will be calculated using H.
textFont
public Font textFont
- font of the text.
fontColor
public Color fontColor
- color of the text.
barColor
public Color barColor
- color of the bars.
UPCESytem
public char UPCESytem
- system to be used in UPCE. It can be "0" or "1".
The default is "1".
CODABARStartChar
public char CODABARStartChar
- start character for CODABAR. The default is A.
CODABARStopChar
public char CODABARStopChar
- stop character for CODABAR. The default is B.
UPCEANSupplement2
public boolean UPCEANSupplement2
- 2 digit supplement for EAN or UPC codes.
UPCEANSupplement5
public boolean UPCEANSupplement5
- 5 digit supplement for EAN or UPC codes.
Code128Set
public char Code128Set
- set of character to be used in code 128. Possible values are "A",
"B" or "C" (only for numeric codes). The default is
"B"
X
public double X
- size in CM of modules (narrow bars or spaces). The resolution is used
to converto to pixels.
N
public double N
- multiplicator value for width bars. A value of 2 (default) means that
wide bars will be 2*N CM width.
I
public double I
- space between 2 characters (code 39). This a multiplicator of X. The
default is 1.
H
public double H
- height of bars. This a multiplicator of X. The default is 0.45.
L
public double L
- Symbol lentgh in CM. This is calculated by RBarcode and the user can
read it.
rotate
public int rotate
- rotation angle. Valid values are 0 (default),90,180 and 270.
supSeparationCM
public double supSeparationCM
- Separation in CN between the barcode and the supplement
supHeight
public double supHeight
- height of the supplement. This is a multiplicator of the height of
the code. The default is 0.8 (80%).
BarCode
public BarCode()
paint
public void paint(Graphics g2)
- paints the barcode and rotates it if necessary
- Overrides:
- paint in
class Canvas