com.java4less.rbarcode
Class BarCodeBean

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by com.java4less.rbarcode.BarCode
              extended by com.java4less.rbarcode.BarCodeBean
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class BarCodeBean
extends BarCode

Bean implementation of BarCode that provides getter and setter methods.

See Also:
Serialized Form

Field Summary
 
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, processTilde, 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
BarCodeBean()
           
 
Method Summary
 boolean getAddCheckCharacter()
          if true, the checksum character will be calculated and appended to the code.
 java.awt.Color getBackColor()
          background color.
 java.awt.Color getBarColor()
          color of the bars.
 double getBarHeightCM()
          bar height in CM.
 java.lang.String getBarType()
          Symbology to be used.
 java.lang.String getCODABARStartChar()
          start character for CODABAR.
 java.lang.String getCODABARStopChar()
          stop character for CODABAR.
 java.lang.String getCode()
          text to be encoded as barcode.
 java.lang.String getCode128Set()
          set of character to be used in code 128.
 java.lang.String getCodeText()
          text after encoding.
 java.awt.Color getFontColor()
          color of the text.
 boolean getGuardBars()
          if true (default), guardbars in EAN and UPC codes will be longer than data bars.
 double getH()
          height of bars.
 double getI()
          space between 2 characters (code 39).
 double getL()
          Symbol lentgh in CM.
 double getLeftMarginCM()
          left margin of the barcode (also know as quite zone).
 double getN()
          multiplicator value for width bars.
 java.lang.String getName()
          Returns "RBarCode".
 double getPostnetHeightShortBar()
          height in CM of POSTNET's short bars.
 double getPostnetHeightTallBar()
          height in CM of POSTNET's tall bars.
 boolean getProcessTilde()
          process ~ in code?
 int getResolution()
           resolution used to convert from CM to pixels.
 int getRotate()
          rotation angle.
 double getSizeX()
          size in CM of modules (narrow bars or spaces).
 double getSupHeight()
          height of the supplement.
 java.lang.String getSuplement()
          user defined 2 or 5 digit supplement for EAN or UPC codes.
 double getSupSeparationCM()
          Separation in CM between the barcode and the supplement
 java.awt.Font getTextFont()
          font of the text.
 boolean getTextOnTop()
          put text on the top of the barcode
 double getTopMarginCM()
          top margin of the barcode (also know as quite zone).
 boolean getUPCEANSupplement2()
          use 2 digit supplement for EAN or UPC codes.
 boolean getUPCEANSupplement5()
          use 5 digit supplement for EAN or UPC codes.
 java.lang.String getUPCESytem()
          system to be used in UPCE.
 void setAddCheckCharacter(boolean b)
          if true, the checksum character will be calculated and appended to the code.
 void setBackColor(java.awt.Color c)
          background color.
 void setBarColor(java.awt.Color c)
          color of the bars.
 void setBarHeightCM(double d)
          bar height in CM.
 void setBarType(java.lang.String t)
          Symbology to be used.
 void setCODABARStartChar(java.lang.String d)
          start character for CODABAR.
 void setCODABARStopChar(java.lang.String d)
          stop character for CODABAR.
 void setCode(java.lang.String c)
          text to be encoded as barcode.
 void setCode128Set(java.lang.String d)
          set of character to be used in code 128.
 void setFontColor(java.awt.Color c)
          color of the text.
 void setGuardBars(boolean b)
          if true (default), guardbars in EAN and UPC codes will be longer than data bars.
 void setH(double d)
          height of bars.
 void setI(double d)
          space between 2 characters (code 39).
 void setL(double d)
          Symbol lentgh in CM.
 void setLeftMarginCM(double d)
          left margin of the barcode (also know as quite zone).
 void setN(double d)
          multiplicator value for width bars.
 void setPostnetHeightShortBar(double d)
          height in CM of POSTNET's short bars.
 void setPostnetHeightTallBar(double d)
          height in CM of POSTNET's tall bars.
 void setProcessTilde(boolean pt)
          process ~ in code?
 void setResolution(int i)
           resolution used to convert from CM to pixels.
 void setRotate(int i)
          rotation angle.
 void setSizeX(double d)
          size in CM of modules (narrow bars or spaces).
 void setSupHeight(double d)
          height of the supplement.
 void setSuplement(java.lang.String c)
          user defined 2 or 5 digit supplement for EAN or UPC codes.
 void setSupSeparationCM(double d)
          Separation in CM between the barcode and the supplement
 void setTextFont(java.awt.Font f)
          font of the text.
 void setTextOnTop(boolean b)
          put text on the top of the barcode
 void setTopMarginCM(double d)
          top margin of the barcode (also know as quite zone).
 void setUPCEANSupplement2(boolean b)
          use 2 digit supplement for EAN or UPC codes.
 void setUPCEANSupplement5(boolean b)
          use 5 digit supplement for EAN or UPC codes.
 void setUPCESytem(java.lang.String d)
          system to be used in UPCE.
 
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, 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
 

Constructor Detail

BarCodeBean

public BarCodeBean()
Method Detail

getTextOnTop

public boolean getTextOnTop()
put text on the top of the barcode


setTextOnTop

public void setTextOnTop(boolean b)
put text on the top of the barcode


getBarType

public java.lang.String getBarType()
Symbology to be used. Default is BAR39


setBarType

public void setBarType(java.lang.String t)
Symbology to be used. Default is BAR39


getCode

public java.lang.String getCode()
text to be encoded as barcode.


setCode

public void setCode(java.lang.String c)
text to be encoded as barcode.


getAddCheckCharacter

public boolean getAddCheckCharacter()
if true, the checksum character will be calculated and appended to the code. Default value is true.


setAddCheckCharacter

public void setAddCheckCharacter(boolean b)
if true, the checksum character will be calculated and appended to the code. Default value is true.


getPostnetHeightTallBar

public double getPostnetHeightTallBar()
height in CM of POSTNET's tall bars. The default is 0.25


setPostnetHeightTallBar

public void setPostnetHeightTallBar(double d)
height in CM of POSTNET's tall bars. The default is 0.25


getPostnetHeightShortBar

public double getPostnetHeightShortBar()
height in CM of POSTNET's short bars. The default is 0.125


setPostnetHeightShortBar

public void setPostnetHeightShortBar(double d)
height in CM of POSTNET's short bars. The default is 0.125


getLeftMarginCM

public double getLeftMarginCM()
left margin of the barcode (also know as quite zone). The default is 0.5 CM.


setLeftMarginCM

public void setLeftMarginCM(double d)
left margin of the barcode (also know as quite zone). The default is 0.5 CM.


getTopMarginCM

public double getTopMarginCM()
top margin of the barcode (also know as quite zone). The default is 0.5 CM.


setTopMarginCM

public void setTopMarginCM(double d)
top margin of the barcode (also know as quite zone). The default is 0.5 CM.


getSuplement

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


setSuplement

public void setSuplement(java.lang.String c)
user defined 2 or 5 digit supplement for EAN or UPC codes.


getGuardBars

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


setGuardBars

public void setGuardBars(boolean b)
if true (default), guardbars in EAN and UPC codes will be longer than data bars.


getBackColor

public java.awt.Color getBackColor()
background color.


setBackColor

public void setBackColor(java.awt.Color c)
background color.


getCodeText

public java.lang.String getCodeText()
text after encoding. It will contain the appenden checksum, if calculated.


getResolution

public int getResolution()
 
 resolution used to convert from CM to pixels. The value is pixels/CM. The default is 96 dpi.
 If you set the resolution to 1 then all units are pixels.
 


setResolution

public void setResolution(int i)
 
 resolution used to convert from CM to pixels. The value is pixels/CM. The default is 96 dpi.
 If you set the resolution to 1 then all units are pixels.
 


getBarHeightCM

public double getBarHeightCM()
bar height in CM. If 0 it will be calculated using H.


setBarHeightCM

public void setBarHeightCM(double d)
bar height in CM. If 0 it will be calculated using H.


getTextFont

public java.awt.Font getTextFont()
font of the text. The default is Arial, size 11.


setTextFont

public void setTextFont(java.awt.Font f)
font of the text. The default is Arial, size 11.


getFontColor

public java.awt.Color getFontColor()
color of the text.


setFontColor

public void setFontColor(java.awt.Color c)
color of the text.


getBarColor

public java.awt.Color getBarColor()
color of the bars. The default value is Color.black.


setBarColor

public void setBarColor(java.awt.Color c)
color of the bars. The default value is Color.black.


getUPCESytem

public java.lang.String getUPCESytem()
system to be used in UPCE. It can be "0" or "1". The default is "1".


setUPCESytem

public void setUPCESytem(java.lang.String d)
system to be used in UPCE. It can be "0" or "1". The default is "1".


getCODABARStartChar

public java.lang.String getCODABARStartChar()
start character for CODABAR. The default is A.


setCODABARStartChar

public void setCODABARStartChar(java.lang.String d)
start character for CODABAR. The default is A.


getCODABARStopChar

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


setCODABARStopChar

public void setCODABARStopChar(java.lang.String d)
stop character for CODABAR. The default is B.


getUPCEANSupplement2

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


setUPCEANSupplement2

public void setUPCEANSupplement2(boolean b)
use 2 digit supplement for EAN or UPC codes.


getUPCEANSupplement5

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


setUPCEANSupplement5

public void setUPCEANSupplement5(boolean b)
use 5 digit supplement for EAN or UPC codes.


getCode128Set

public java.lang.String getCode128Set()
set of character to be used in code 128. Possible values are "A", "B" or "C" (only for numeric codes). The default is "B"


setCode128Set

public void setCode128Set(java.lang.String d)
set of character to be used in code 128. Possible values are "A", "B" or "C" (only for numeric codes). The default is "B"


getSizeX

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


setSizeX

public void setSizeX(double d)
size in CM of modules (narrow bars or spaces). The resolution is used to converto to pixels.


getN

public double getN()
multiplicator value for width bars. A value of 2 (default) means that wide bars will be 2*N CM width.


setN

public void setN(double d)
multiplicator value for width bars. A value of 2 (default) means that wide bars will be 2*N CM width.


getI

public double getI()
space between 2 characters (code 39). This a multiplicator of X. The default is 1.


setI

public void setI(double d)
space between 2 characters (code 39). This a multiplicator of X. The default is 1.


getH

public double getH()
height of bars. This a multiplicator of X. The default is 0.45.


setH

public void setH(double d)
height of bars. This a multiplicator of X. The default is 0.45.


getL

public double getL()
Symbol lentgh in CM. This is calculated by RBarcode and the user can read it.


setL

public void setL(double d)
Symbol lentgh in CM. This is calculated by RBarcode and the user can read it.


getRotate

public int getRotate()
rotation angle. Valid values are 0 (default),90,180 and 270.


setRotate

public void setRotate(int i)
rotation angle. Valid values are 0 (default),90,180 and 270.


getSupSeparationCM

public double getSupSeparationCM()
Separation in CM between the barcode and the supplement


setSupSeparationCM

public void setSupSeparationCM(double d)
Separation in CM between the barcode and the supplement


getSupHeight

public double getSupHeight()
height of the supplement. This is a multiplicator of the height of the code. The default is 0.8 (80%).


setSupHeight

public void setSupHeight(double d)
height of the supplement. This is a multiplicator of the height of the code. The default is 0.8 (80%).


getName

public java.lang.String getName()
Returns "RBarCode".

Overrides:
getName in class java.awt.Component

getProcessTilde

public boolean getProcessTilde()
process ~ in code?

Returns:

setProcessTilde

public void setProcessTilde(boolean pt)
process ~ in code?

Parameters:
pt -