com.businessrefinery.barcode.linear
Class Linear

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by com.businessrefinery.barcode.linear.Linear
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class Linear
extends java.awt.Canvas
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 boolean autoSize
          If true, it will automatically size the control canvas to fit the barcode at design or runtime; Default =True.
 java.awt.Color backgroundColor
          image background color
 int barcodeType
          barcode type
 java.awt.Color barColor
          The color of the bars in the barcode; Default=black.
 double barHeightCM
          Bar height in CM; If 0 it will be calculated using H; Default=1.
 double bearerBarHori
          The value of the horizontal bearer bar.
 double bearerBarVert
          The value of the vertical bearer bar.
 boolean checkCharacter
          If true, the checksum character will be calculated and appended to the code; Default =True; checksum characters cannot be displayed or disabled for Code 128 and UCC128.
 boolean checkCharacterInText
          If true, the checksum character will be appended to the human readable text; Default =True; checksum characters cannot be displayed or disabled for Code 128 and UCC128.
static int CODABAR
           
 char CODABARStartChar
          The start character for CODABAR; The default is A.
 char CODABARStopChar
          The stop character for CODABAR; The default is B.
 java.lang.String code
          The data to be encoded as a barcode.
static int CODE11
           
static int CODE128
           
 char Code128Set
          The character set to be used in code 128; Possible values are "0 for Automatic", "A", "B" or "C"; The recommended setting and the default is "0" (Automatic)
static int CODE39
           
static int CODE39EXT
           
static int CODE93
           
static int CODE93EXT
           
 java.lang.String codeText
          The text of the barcode after it is created.
static int EAN13
           
static int EAN8
           
 boolean guardBars
          If true (default), guardbars in EAN and UPC codes will be longer than data bars.
 double H
          The height of bars in the barcode as a multiple of X; The default is 0.45.
 int height
          Initial preferred height property of the bean
 double I
          The space between 2 characters in code 39; This a multiple of X; The default is 1.;
static int IND25
           
static int INTERLEAVED25
           
 double L
          The symbol length in CM.
 double leftMarginCM
          The left margin of the barcode (also know as quiet zone); The default is .3 CM.
static int MAT25
           
static int MSI
           
 double N
          The wide to narrow ratio of barcode types that support this setting such as Code 39 and ITF; A value of 2 (default) means that wide bars will be 2*N in width.
static int ONECODE
           
 int pHeight
          The preferred height of the barcode image in pixels after barcode is generated.
static int PLANET
           
static int POSTNET
           
 double postnetHeightShortBar
          Height in CM of POSTNET's short bars; The default is 0.125
 double postnetHeightTallBar
          Height in CM of POSTNET's tall bars; The default is 0.3
 boolean processTilde
          If true, numbers after the Tilde will be processed according to the rules in the user guide; this option is only available when the symbology is Code 128, and the character set is AUTO or 0.
 int pWidth
          The preferred width of the barcode image in pixels after barcode is generated.
 int resolution
          The resolution used to create the X dimension and other measurements in pixels; Default is 38 Pixels Per CM which is about 96 DPI.
 int rotateAngle
          The rotation angle; Valid values are 0 (default), 90, 180 & 270.
 boolean showText
          If true, the human readable text will be displayed with the barcode; Default =true.
 double supHeight
          Height of the supplement; This is a multiplicator of the height of the code; The default is 0.8 (80%).
 java.lang.String supplement
          This is the user defined 2 or 5 digit supplement for EAN or UPC codes.
 double supSeparationCM
          The separation in CM between the barcode and the supplement
 java.awt.Font textFont
          The font of the text in the barcode; Default = Arial.
 java.awt.Color textFontColor
          The color of the text; Default=black.
 double textMarginCM
          The amount of space in CM between the barcode and the human readable text.
 double topMarginCM
          The top margin of the barcode (also know as quiet zone); The default is .2 CM
static int UCC128
           
static int UPCA
           
static int UPCE
           
 boolean UPCEANSupplement2
          If true, the 2 digit supplement for EAN or UPC codes is processed.
 boolean UPCEANSupplement5
          If true, the 5 digit supplement for EAN or UPC codes is processed.
 char UPCESystem
          The system to be used in UPCE; It can be "0" or "1"; The default is "0".
 int valSpliceText
           
 float whiteBarIncrease
           
 int width
          Initial preferred width property of the bean
 double X
          The size in CM of modules (narrow bars or spaces); The resolution is used to convert to pixels.
 
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
Linear()
           
 
Method Summary
 boolean createBarcodeImage(java.lang.String imageFile)
          Once you set all properties, please call this method to create barcode image.
 boolean getAutoSize()
          If true will automatically size the control canvas to fit the barcode at design or runtime; Default =True.
 java.awt.Color getBackground()
          Gets image background color.
 int getBarcodeType()
          Returns the barcode type; CODE39=0; CODE39EXT=1; INTERLEAVED25=2; CODE11=3; CODABAR=4; MSI=5; UPCA=6; IND25=7; MAT25=8; CODE93=9; EAN13=10; EAN8=11; UPCE=12; CODE128=13; CODE93EXT=14; POSTNET=15; PLANET=16; UCC128=17; the default is CODE128.
 double getBarHeightCM()
          Gets bar height in CM; If 0 it will be calculated using H; Default=1.
 double getBearerBarHorizontal()
          Gets the value of the horizontal bearer bar.
 double getBearerBarVertical()
          Gets the value of the vertical bearer bar.
 int getCharacterGrouping()
          Returns the number of characters that will be grouped together in the human readable text.
 boolean getCheckCharacter()
          If true, the checksum character will be calculated and appended to the code; Default =True; checksum characters cannot be displayed or disabled for Code 128 and UCC128.
 boolean getCheckCharacterInText()
          If true, the checksum character will be appended to the human readable text; Default =True; checksum characters cannot be displayed for Code 128.
 java.lang.String getCODABARStartChar()
          Gets the start character for CODABAR.
 java.lang.String getCODABARStopChar()
          Gets the stop character for CODABAR; The default is B.
 java.lang.String getCode128Set()
          Gets the character set to be used in code 128; Possible values are "0 for AUTO", "A", "B" or "C"; The recommended setting and the default is "0" (Automatic)
 java.lang.String getDataToEncode()
          Gets the data to be encoded as a barcode.
 java.awt.Font getFont()
          Gets the font of the text.
 java.awt.Color getForeground()
          Gets color of the bars; Default=black.
 double getLeftMarginCM()
          Returns the left margin of the barcode (also know as quiet zone); The default is .3 CM.
 java.awt.Dimension getMinimumSize()
           
 double getNarrowToWideRatio()
          Gets the wide to narrow ratio of barcode types that support this setting such as Code 39 and ITF; A value of 2 (default) means that wide bars will be 2*N in width.
 int getPixelsPerCM()
          Gets the resolution used to convert from CM to pixels; Default is 38.
 double getPostnetHeightShort()
          Returns the height in CM of POSTNET's short bars; The default is 0.125
 double getPostnetHeightTall()
          Returns the height in CM of POSTNET's tall bars; The default is 0.3
 java.awt.Dimension getPreferredSize()
          Returns the size in pixels of the Preferred barcode image generated.
 boolean getProcessTilde()
           
 int getRotationAngle()
          Gets the rotation angle; Valid values are 0 (default), 90, 180 & 270.
 boolean getShowText()
          If true, the human readable text will be displayed with the barcode; Default =true.
 java.lang.String getSupplementToEncode()
          Gets the user defined 2 or 5 digit supplement for EAN or UPC codes.
 java.awt.Color getTextFontColor()
          Gets color of the text; Default=black.
 double getTextMarginCM()
          Returns the textMarginCM property value
 double getTopMarginCM()
          Returns the top margin of the barcode (also know as quiet zone); The default is .2 CM
 boolean getUPCEANSupplement2()
          Gets the 2 digit supplement for EAN or UPC codes.
 boolean getUPCEANSupplement5()
          Gets the 5 digit supplement for EAN or UPC codes.
 java.lang.String getUPCESystem()
          Gets the system to be used in UPCE; It can be "0", "1", or "2".
 float getWhiteBarIncrease()
          Gets the WhiteBarIncrease
 double getXDimensionCM()
          Gets the size in CM of modules (narrow bars or spaces); The resolution is used to convert to pixels.
 void paint(java.awt.Graphics g)
          paints the barcode and rotates it if necessary
 void setAutoSize(boolean flag)
          If true will automatically size the control canvas to fit the barcode at design or runtime; Default =True.
 void setBackground(java.awt.Color color)
          Sets the background color.
 void setBarcodeType(int i)
          To change the barcode type: CODE39=0; CODE39EXT=1; INTERLEAVED25=2; CODE11=3; CODABAR=4; MSI=5; UPCA=6; IND25=7; MAT25=8; CODE93=9; EAN13=10; EAN8=11; UPCE=12; CODE128=13; CODE93EXT=14; POSTNET=15; PLANET=16; UCC128=17; the default is CODE128.
 void setBarHeightCM(double d1)
          Sets bar height in CM; If 0 it will be calculated using H; Default=1.
 void setBearerBarHorizontal(double d1)
          Sets the value of the horizontal bearer bar.
 void setBearerBarVertical(double d1)
          Sets the value of the vertical bearer bar.
 void setCharacterGrouping(int i)
          Sets the number of digits to group together in the human readable text.
 void setCheckCharacter(boolean flag)
          If true, the checksum character will be calculated and appended to the code; Default =True; checksum characters cannot be displayed or disabled for Code 128 and UCC128.
 void setCheckCharacterInText(boolean flag)
          If true, the checksum character will be appended to the human readable text; Default =True; checksum characters cannot be displayed or disabled for Code 128 and UCC128.
 void setCODABARStartChar(java.lang.String s)
          Sets the start character for CODABAR; The default is A.
 void setCODABARStopChar(java.lang.String s)
          Sets the stop character for CODABAR; The default is B.
 void setCode128Set(java.lang.String s)
          Sets the character set to be used in code 128; Possible values are "0 for AUTO", "A", "B" or "C"; The recommended setting and the default is "0" (Automatic)
 void setDataToEncode(java.lang.String s)
          Sets the data to be encoded as a barcode.
 void setFont(java.awt.Font font)
          Sets text font.
 void setForeground(java.awt.Color color)
          Sets color of the bars; Default=black.
 void setLeftMarginCM(double d1)
          The left margin of the barcode (also know as quiet zone); The default is .3 CM.
 void setNarrowToWideRatio(double d1)
          Sets the wide to narrow ratio of barcode types that support this setting such as Code 39 and ITF; A value of 2 (default) means that wide bars will be 2*N in width.
 void setPixelsPerCM(int i)
          Sets the resolution used to convert from CM to pixels; Default is 38.
 void setPostnetHeightShort(double d1)
          Height in CM of POSTNET's short bars; The default is 0.125
 void setPostnetHeightTall(double d1)
          Height in CM of POSTNET's tall bars; The default is 0.3
 void setProcessTilde(boolean flag)
           
 void setRotationAngle(int i)
          Sets the rotation angle; Valid values are 0 (default), 90, 180 & 270.
 void setShowText(boolean flag)
          If true, the human readable text will be displayed with the barcode; Default =true.
 void setSupplementToEncode(java.lang.String s)
          Sets the user defined 2 or 5 digit supplement for EAN or UPC codes.
 void setTextFontColor(java.awt.Color color)
          Sets color of the text; Default=black.
 void setTextMarginCM(double d1)
          Sets the textMarginCM property.
 void setTopMarginCM(double d1)
          The top margin of the barcode (also know as quiet zone); The default is .2 CM
 void setUPCEANSupplement2(boolean flag)
          Sets the 2 digit supplement for EAN or UPC codes.
 void setUPCEANSupplement5(boolean flag)
          Sets the 5 digit supplement for EAN or UPC codes.
 void setUPCESystem(java.lang.String s)
          Sets the system to be used in UPCE; It can be "0", "1", or "2"; The default is "0".
 void setWhiteBarIncrease(float f)
          Sets the WhiteBarIncrease
 void setXDimensionCM(double d1)
          Sets the size in CM of modules (narrow bars or spaces); The resolution is used to convert to pixels.
 
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, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFontMetrics, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, 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, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, 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

CODE39

public static final int CODE39
See Also:
Constant Field Values

CODE39EXT

public static final int CODE39EXT
See Also:
Constant Field Values

INTERLEAVED25

public static final int INTERLEAVED25
See Also:
Constant Field Values

CODE11

public static final int CODE11
See Also:
Constant Field Values

CODABAR

public static final int CODABAR
See Also:
Constant Field Values

MSI

public static final int MSI
See Also:
Constant Field Values

UPCA

public static final int UPCA
See Also:
Constant Field Values

IND25

public static final int IND25
See Also:
Constant Field Values

MAT25

public static final int MAT25
See Also:
Constant Field Values

CODE93

public static final int CODE93
See Also:
Constant Field Values

EAN13

public static final int EAN13
See Also:
Constant Field Values

EAN8

public static final int EAN8
See Also:
Constant Field Values

UPCE

public static final int UPCE
See Also:
Constant Field Values

CODE128

public static final int CODE128
See Also:
Constant Field Values

CODE93EXT

public static final int CODE93EXT
See Also:
Constant Field Values

POSTNET

public static final int POSTNET
See Also:
Constant Field Values

PLANET

public static final int PLANET
See Also:
Constant Field Values

UCC128

public static final int UCC128
See Also:
Constant Field Values

ONECODE

public static final int ONECODE
See Also:
Constant Field Values

barcodeType

public int barcodeType
barcode type


code

public java.lang.String code
The data to be encoded as a barcode.


textMarginCM

public double textMarginCM
The amount of space in CM between the barcode and the human readable text.


checkCharacter

public boolean checkCharacter
If true, the checksum character will be calculated and appended to the code; Default =True; checksum characters cannot be displayed or disabled for Code 128 and UCC128.


checkCharacterInText

public boolean checkCharacterInText
If true, the checksum character will be appended to the human readable text; Default =True; checksum characters cannot be displayed or disabled for Code 128 and UCC128.


processTilde

public boolean processTilde
If true, numbers after the Tilde will be processed according to the rules in the user guide; this option is only available when the symbology is Code 128, and the character set is AUTO or 0.


postnetHeightTallBar

public double postnetHeightTallBar
Height in CM of POSTNET's tall bars; The default is 0.3


postnetHeightShortBar

public double postnetHeightShortBar
Height in CM of POSTNET's short bars; The default is 0.125


leftMarginCM

public double leftMarginCM
The left margin of the barcode (also know as quiet zone); The default is .3 CM.


topMarginCM

public double topMarginCM
The top margin of the barcode (also know as quiet zone); The default is .2 CM


supplement

public java.lang.String supplement
This is the user defined 2 or 5 digit supplement for EAN or UPC codes.


guardBars

public boolean guardBars
If true (default), guardbars in EAN and UPC codes will be longer than data bars.


backgroundColor

public java.awt.Color backgroundColor
image background color


codeText

public java.lang.String codeText
The text of the barcode after it is created.


resolution

public int resolution
The resolution used to create the X dimension and other measurements in pixels; Default is 38 Pixels Per CM which is about 96 DPI.


barHeightCM

public double barHeightCM
Bar height in CM; If 0 it will be calculated using H; Default=1.


width

public int width
Initial preferred width property of the bean


height

public int height
Initial preferred height property of the bean


pWidth

public int pWidth
The preferred width of the barcode image in pixels after barcode is generated.


pHeight

public int pHeight
The preferred height of the barcode image in pixels after barcode is generated.


autoSize

public boolean autoSize
If true, it will automatically size the control canvas to fit the barcode at design or runtime; Default =True.


showText

public boolean showText
If true, the human readable text will be displayed with the barcode; Default =true.


textFont

public java.awt.Font textFont
The font of the text in the barcode; Default = Arial.


textFontColor

public java.awt.Color textFontColor
The color of the text; Default=black.


barColor

public java.awt.Color barColor
The color of the bars in the barcode; Default=black.


UPCESystem

public char UPCESystem
The system to be used in UPCE; It can be "0" or "1"; The default is "0".


CODABARStartChar

public char CODABARStartChar
The start character for CODABAR; The default is A.


CODABARStopChar

public char CODABARStopChar
The stop character for CODABAR; The default is B.


UPCEANSupplement2

public boolean UPCEANSupplement2
If true, the 2 digit supplement for EAN or UPC codes is processed.


UPCEANSupplement5

public boolean UPCEANSupplement5
If true, the 5 digit supplement for EAN or UPC codes is processed.


Code128Set

public char Code128Set
The character set to be used in code 128; Possible values are "0 for Automatic", "A", "B" or "C"; The recommended setting and the default is "0" (Automatic)


X

public double X
The size in CM of modules (narrow bars or spaces); The resolution is used to convert to pixels.


N

public double N
The wide to narrow ratio of barcode types that support this setting such as Code 39 and ITF; A value of 2 (default) means that wide bars will be 2*N in width.


I

public double I
The space between 2 characters in code 39; This a multiple of X; The default is 1.;


H

public double H
The height of bars in the barcode as a multiple of X; The default is 0.45.


L

public double L
The symbol length in CM.


rotateAngle

public int rotateAngle
The rotation angle; Valid values are 0 (default), 90, 180 & 270.


supSeparationCM

public double supSeparationCM
The separation in CM 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%).


whiteBarIncrease

public float whiteBarIncrease

valSpliceText

public int valSpliceText

bearerBarVert

public double bearerBarVert
The value of the vertical bearer bar.


bearerBarHori

public double bearerBarHori
The value of the horizontal bearer bar.

Constructor Detail

Linear

public Linear()
Method Detail

createBarcodeImage

public boolean createBarcodeImage(java.lang.String imageFile)
Once you set all properties, please call this method to create barcode image. return true, if create barcode image successfully, otherwise return false.


setBarcodeType

public void setBarcodeType(int i)
To change the barcode type: CODE39=0; CODE39EXT=1; INTERLEAVED25=2; CODE11=3; CODABAR=4; MSI=5; UPCA=6; IND25=7; MAT25=8; CODE93=9; EAN13=10; EAN8=11; UPCE=12; CODE128=13; CODE93EXT=14; POSTNET=15; PLANET=16; UCC128=17; the default is CODE128.


getBarcodeType

public int getBarcodeType()
Returns the barcode type; CODE39=0; CODE39EXT=1; INTERLEAVED25=2; CODE11=3; CODABAR=4; MSI=5; UPCA=6; IND25=7; MAT25=8; CODE93=9; EAN13=10; EAN8=11; UPCE=12; CODE128=13; CODE93EXT=14; POSTNET=15; PLANET=16; UCC128=17; the default is CODE128.


setDataToEncode

public void setDataToEncode(java.lang.String s)
Sets the data to be encoded as a barcode.


getDataToEncode

public java.lang.String getDataToEncode()
Gets the data to be encoded as a barcode.


setTextMarginCM

public void setTextMarginCM(double d1)
Sets the textMarginCM property.


getTextMarginCM

public double getTextMarginCM()
Returns the textMarginCM property value


setCheckCharacter

public void setCheckCharacter(boolean flag)
If true, the checksum character will be calculated and appended to the code; Default =True; checksum characters cannot be displayed or disabled for Code 128 and UCC128.


getCheckCharacter

public boolean getCheckCharacter()
If true, the checksum character will be calculated and appended to the code; Default =True; checksum characters cannot be displayed or disabled for Code 128 and UCC128.


setCheckCharacterInText

public void setCheckCharacterInText(boolean flag)
If true, the checksum character will be appended to the human readable text; Default =True; checksum characters cannot be displayed or disabled for Code 128 and UCC128.


getCheckCharacterInText

public boolean getCheckCharacterInText()
If true, the checksum character will be appended to the human readable text; Default =True; checksum characters cannot be displayed for Code 128.


getProcessTilde

public boolean getProcessTilde()

setProcessTilde

public void setProcessTilde(boolean flag)

setPostnetHeightTall

public void setPostnetHeightTall(double d1)
Height in CM of POSTNET's tall bars; The default is 0.3


getPostnetHeightTall

public double getPostnetHeightTall()
Returns the height in CM of POSTNET's tall bars; The default is 0.3


setPostnetHeightShort

public void setPostnetHeightShort(double d1)
Height in CM of POSTNET's short bars; The default is 0.125


getPostnetHeightShort

public double getPostnetHeightShort()
Returns the height in CM of POSTNET's short bars; The default is 0.125


setLeftMarginCM

public void setLeftMarginCM(double d1)
The left margin of the barcode (also know as quiet zone); The default is .3 CM.


getLeftMarginCM

public double getLeftMarginCM()
Returns the left margin of the barcode (also know as quiet zone); The default is .3 CM.


setTopMarginCM

public void setTopMarginCM(double d1)
The top margin of the barcode (also know as quiet zone); The default is .2 CM


getTopMarginCM

public double getTopMarginCM()
Returns the top margin of the barcode (also know as quiet zone); The default is .2 CM


setSupplementToEncode

public void setSupplementToEncode(java.lang.String s)
Sets the user defined 2 or 5 digit supplement for EAN or UPC codes.


getSupplementToEncode

public java.lang.String getSupplementToEncode()
Gets the user defined 2 or 5 digit supplement for EAN or UPC codes.


setBackground

public void setBackground(java.awt.Color color)
Sets the background color.

Overrides:
setBackground in class java.awt.Component

getBackground

public java.awt.Color getBackground()
Gets image background color.

Overrides:
getBackground in class java.awt.Component

setPixelsPerCM

public void setPixelsPerCM(int i)
Sets the resolution used to convert from CM to pixels; Default is 38.


getPixelsPerCM

public int getPixelsPerCM()
Gets the resolution used to convert from CM to pixels; Default is 38.


setBarHeightCM

public void setBarHeightCM(double d1)
Sets bar height in CM; If 0 it will be calculated using H; Default=1.


getBarHeightCM

public double getBarHeightCM()
Gets bar height in CM; If 0 it will be calculated using H; Default=1.


setAutoSize

public void setAutoSize(boolean flag)
If true will automatically size the control canvas to fit the barcode at design or runtime; Default =True.


getAutoSize

public boolean getAutoSize()
If true will automatically size the control canvas to fit the barcode at design or runtime; Default =True.


getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the size in pixels of the Preferred barcode image generated.

Overrides:
getPreferredSize in class java.awt.Component

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class java.awt.Component

setShowText

public void setShowText(boolean flag)
If true, the human readable text will be displayed with the barcode; Default =true.


getShowText

public boolean getShowText()
If true, the human readable text will be displayed with the barcode; Default =true.


setFont

public void setFont(java.awt.Font font)
Sets text font.

Overrides:
setFont in class java.awt.Component

getFont

public java.awt.Font getFont()
Gets the font of the text.

Specified by:
getFont in interface java.awt.MenuContainer
Overrides:
getFont in class java.awt.Component

setTextFontColor

public void setTextFontColor(java.awt.Color color)
Sets color of the text; Default=black.


getTextFontColor

public java.awt.Color getTextFontColor()
Gets color of the text; Default=black.


setForeground

public void setForeground(java.awt.Color color)
Sets color of the bars; Default=black.

Overrides:
setForeground in class java.awt.Component

getForeground

public java.awt.Color getForeground()
Gets color of the bars; Default=black.

Overrides:
getForeground in class java.awt.Component

setUPCESystem

public void setUPCESystem(java.lang.String s)
Sets the system to be used in UPCE; It can be "0", "1", or "2"; The default is "0".


getUPCESystem

public java.lang.String getUPCESystem()
Gets the system to be used in UPCE; It can be "0", "1", or "2".


setCODABARStartChar

public void setCODABARStartChar(java.lang.String s)
Sets the start character for CODABAR; The default is A.


getCODABARStartChar

public java.lang.String getCODABARStartChar()
Gets the start character for CODABAR.


setCODABARStopChar

public void setCODABARStopChar(java.lang.String s)
Sets the stop character for CODABAR; The default is B.


getCODABARStopChar

public java.lang.String getCODABARStopChar()
Gets the stop character for CODABAR; The default is B.


setUPCEANSupplement2

public void setUPCEANSupplement2(boolean flag)
Sets the 2 digit supplement for EAN or UPC codes.


getUPCEANSupplement2

public boolean getUPCEANSupplement2()
Gets the 2 digit supplement for EAN or UPC codes.


setUPCEANSupplement5

public void setUPCEANSupplement5(boolean flag)
Sets the 5 digit supplement for EAN or UPC codes.


getUPCEANSupplement5

public boolean getUPCEANSupplement5()
Gets the 5 digit supplement for EAN or UPC codes.


setCode128Set

public void setCode128Set(java.lang.String s)
Sets the character set to be used in code 128; Possible values are "0 for AUTO", "A", "B" or "C"; The recommended setting and the default is "0" (Automatic)


getCode128Set

public java.lang.String getCode128Set()
Gets the character set to be used in code 128; Possible values are "0 for AUTO", "A", "B" or "C"; The recommended setting and the default is "0" (Automatic)


setXDimensionCM

public void setXDimensionCM(double d1)
Sets the size in CM of modules (narrow bars or spaces); The resolution is used to convert to pixels.


getXDimensionCM

public double getXDimensionCM()
Gets the size in CM of modules (narrow bars or spaces); The resolution is used to convert to pixels.


setNarrowToWideRatio

public void setNarrowToWideRatio(double d1)
Sets the wide to narrow ratio of barcode types that support this setting such as Code 39 and ITF; A value of 2 (default) means that wide bars will be 2*N in width.


getNarrowToWideRatio

public double getNarrowToWideRatio()
Gets the wide to narrow ratio of barcode types that support this setting such as Code 39 and ITF; A value of 2 (default) means that wide bars will be 2*N in width.


setRotationAngle

public void setRotationAngle(int i)
Sets the rotation angle; Valid values are 0 (default), 90, 180 & 270.


getRotationAngle

public int getRotationAngle()
Gets the rotation angle; Valid values are 0 (default), 90, 180 & 270.


setWhiteBarIncrease

public void setWhiteBarIncrease(float f)
Sets the WhiteBarIncrease


getWhiteBarIncrease

public float getWhiteBarIncrease()
Gets the WhiteBarIncrease


setCharacterGrouping

public void setCharacterGrouping(int i)
Sets the number of digits to group together in the human readable text.


getCharacterGrouping

public int getCharacterGrouping()
Returns the number of characters that will be grouped together in the human readable text.


setBearerBarVertical

public void setBearerBarVertical(double d1)
Sets the value of the vertical bearer bar.


getBearerBarVertical

public double getBearerBarVertical()
Gets the value of the vertical bearer bar.


setBearerBarHorizontal

public void setBearerBarHorizontal(double d1)
Sets the value of the horizontal bearer bar.


getBearerBarHorizontal

public double getBearerBarHorizontal()
Gets the value of the horizontal bearer bar.


paint

public void paint(java.awt.Graphics g)
paints the barcode and rotates it if necessary

Overrides:
paint in class java.awt.Canvas