Package com.storedobject.common
Class Barcode
java.lang.Object
com.storedobject.common.Barcode
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBarcode()Constructor (Size will be 100x100).Barcode(Barcode.Format format, String data) Constructor (Size will be 100x100).Barcode(Barcode.Format format, String data, int width, int height) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic BarcodeCreate a bar code from an image.getData()Get data containing in this barcode.final Barcode.FormatGet the barcode format.intGet the height of hte barcode image.getImage()Get the image of the barcode.intgetWidth()Get the width of the barcode image.booleanCheck whether barcode data will be printed at the bottom of the image or not.static StringRead data from a barcode image.voidSet data to the barcode.final voidsetFormat(Barcode.Format format) Set the barcode format.voidsetHeight(int height) Set the height of hte barcode image.voidsetPrintText(boolean printText) Set totruefor printing barcode data at the bottom of the image.voidsetWidth(int width) Set the width of the barcode image.
-
Constructor Details
-
Barcode
public Barcode()Constructor (Size will be 100x100). -
Barcode
Constructor (Size will be 100x100).- Parameters:
format- Formatdata- Barcode data
-
Barcode
Constructor.- Parameters:
format- Formatdata- Barcode datawidth- Image widthheight- Image height
-
-
Method Details
-
getData
-
setData
-
getFormat
-
setFormat
Set the barcode format.- Parameters:
format- Format to set
-
getWidth
public int getWidth()Get the width of the barcode image.- Returns:
- Width.
-
setWidth
public void setWidth(int width) Set the width of the barcode image.- Parameters:
width- Width
-
getHeight
public int getHeight()Get the height of hte barcode image.- Returns:
- Height.
-
setHeight
public void setHeight(int height) Set the height of hte barcode image.- Parameters:
height- Height.
-
getImage
Get the image of the barcode.- Returns:
- Image of the barcode.
- Throws:
Exception- If any error occurs.
-
isPrintText
public boolean isPrintText()Check whether barcode data will be printed at the bottom of the image or not.- Returns:
- True or false.
-
setPrintText
public void setPrintText(boolean printText) Set totruefor printing barcode data at the bottom of the image. (Barcode data will not be printed for the following formats, irrespective of this setting: QR_CODE, DATA_MATRIX, PDF_417 and AZTEC).- Parameters:
printText- True or false
-
read
-
create
-