com.aspose.j2me.barcode.generation
Class BarCodeBuilder

java.lang.Object
  extended bycom.aspose.j2me.barcode.generation.BarCodeBuilder

public final class BarCodeBuilder
extends java.lang.Object

Backend barcode image renderer which could render to file, to Graphics and to serverlet HttpServletResponse. Supported BarCode symmbologies:

 Codabar, Code11, Code128, Code39, Code39 extended, Code93, Code93 extended
 Interleaved 2of5, Standard2of5, MSI, UPCA, UPCE ... and more
 

Example

 	public void paint(Graphics g)
 	{
 		BarCodeBuilder b = new BarCodeBuilder();
 		b.setSymbology(Symbology.CODE128);
 		b.setCodeText("12345678");
 		b.render(g);
 	}
 


Field Summary
static char EAN128FNC1
          FNC1 character value for EAN128 BarCode
 
Constructor Summary
BarCodeBuilder()
          Constructs x BarCodeBuilder
BarCodeBuilder(long symbology, java.lang.String codeText)
          Constructs x BarCodeBuilder with specific Symbology and CodeText
 
Method Summary
 int getAustraliaPostFormatControlCode()
           
 boolean getAutoSize()
          

Gets whether auto sizing the barcode image or not.

 int getAztecErrorLevel()
          Gets Aztec barcode's error correction level
 int getBackColor()
          

Gets the background color of the barcode image, default to white

 float getBarHeight()
          

Gets the bar's height for 1D barcodes, measured in com.aspose.barcode.GraphicsUnit

 int getBorderColor()
          

Gets border's color of the barcode image

 boolean getBorderVisible()
          

Gets whether to draw the border or not

 float getBorderWidth()
          

Gets border's width of x barcode image.

 int getCodabarStartSymbol()
          

Gets the start symbol for codabar types of barcode

 int getCodabarStopSymbol()
          

Gets the stop symbol of codabar types of barcode

 int getCode128Set()
          

Gets code set for code128 types of barcode

 java.lang.String getCodeText()
          

Gets the code text of the barcode, code text is the data encoded into the barcode image Some barcode symbologies may require certain types of code text, such as UPCA and UPCE require numbers only

 int getCodeTextColor()
          

Gets the human readable code text's color

 javax.microedition.lcdui.Font getCodeTextFont()
          

Gets the code text's font of x barcode.

 boolean getCodeTextVisible()
          

Gets whether or not to show the human readable code text

 int getDataMatrixMode()
          Gets Datamatrix barcode's encode mode.
 boolean getEnableChecksum()
          

Gets whether checksum is enabled.

 int getForeColor()
          

Gets the foreground color of the barcode image, if it's for web servlet render caption's color and code text's color may be all reduced to one color

 int getGraphicsUnit()
          

Gets the measurement of graphics unit, default to millimeter

 float getHeight()
          

Gets the height of x barcode image.

 int getITF14BorderType()
          

Gets ITF14 barcode's border type

 int getMacroPDF417FileID()
          Gets macro pdf417 barcode's file ID.
 boolean getMacroPDF417LastSegment()
          Gets whether this macro pdf417 barcode is the last segment.
 int getMacroPDF417SegmentID()
          Gets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
 Margins getMargins()
          

Gets the marginal size of an barcode image, the area around the barcode.

 float getPDF417AspectRatio()
          Gets PDF417 barcode's module height to width ratio
 int getPDF417Columns()
          Gets columns of PDF417 barcode, illegal settings will be ignored
 int getPDF417CompactMode()
          

Gets compaction mode of PDF417 barcode, available modes are PDF417CompactMode.AUTO, PDF417CompactMode.BINARY, PDF417CompactMode.NUMERIC, PDF417CompactMode.TEXT

 int getPDF417ErrorLevel()
          

Gets error correction level of PDF417 barcode, from LEVEL0 to LEVEL8, LEVEL 0 for no error correction, LEVEL8 for max error correction.

 int getPDF417Rows()
          Gets rows of PDF417 barcode, illegal settings will be ignored
 boolean getPDF417Truncated()
          Gets whether PDF417 barcode is truncated, that is, the right guard area om
 float getPlanetShortBarHeight()
          Gets the short bar's height of Planet type of barcode, to set up tall bar's height, use setBarHeight and getBarHeight.
 float getPostnetShortBarHeight()
          Gets the short bar's height of Postnet type of barcode, to set up tall bar's height, use setBarHeight and getBarHeight.
 int getQRErrorLevel()
          Gets QR barcode's error correction level.
 Resolution getResolution()
          

Gets the resolution of the barcode image

 float getSupplementSpace()
          Gets the space between main barcode and the supplement barcode
 java.lang.String getSupplementText()
          Gets the supplement barcode's code text.
 long getSymbology()
          

Gets the symbology of BarCodeBuilder.

 float getWideNarrowRatio()
          

Gets wide bars to narrow bars ratio for some types of one dimensional barcode

 float getWidth()
          

Gets the width of x barcode image.

 float getXDimension()
          

Gets the width of x smallest bar, or the smallest module's width of 2D barcodes measured in GraphicsUnit

 float getYDimension()
          

Gets the height of x smallest module of 2D barcodes.

 void render(javax.microedition.lcdui.Graphics g)
          

Renders barcode by Graphics g

 void setAustraliaPostFormatControlCode(int australiaPostFormatControlCode)
           
 void setAutoSize(boolean value)
          

Sets whether auto sizing the barcode image or not.

 void setAztecErrorLevel(int value)
          Sets Aztec barcode's error correction level
 void setBackColor(int value)
          

Sets the background color of the barcode image, default to white

 void setBarHeight(float value)
          

Sets the bar's height for 1D barcodes, measured in com.aspose.barcode.GraphicsUnit

 void setBorderColor(int value)
          

Sets border's color of the barcode image

 void setBorderVisible(boolean value)
          

Sets whether to draw the border or not

 void setBorderWidth(float value)
          

Sets border's width of x barcode image.

 void setCodabarStartSymbol(int value)
          

Sets the start symbol for codabar types of barcode

 void setCodabarStopSymbol(int value)
          

Sets the stop symbol of codabar types of barcode

 void setCode128Set(int value)
          

Sets code set for code128 types of barcode

 void setCodeText(java.lang.String value)
          

Sets the code text of the barcode, code text is the data encoded into the barcode image If code text is null or empty, exception will be thrown.

 void setCodeTextColor(int value)
          

Sets the human readable code text's color

 void setCodeTextFont(javax.microedition.lcdui.Font value)
          

Sets the code text's font of x barcode.

 void setCodeTextVisible(boolean value)
          

Sets whether or not to show the human readable code text, some symbologies of barcode may ignore this setting

 void setDataMatrixMode(int value)
          Sets Datamatrix barcode's encode mode
 void setEnableChecksum(boolean value)
          

Sets wether checksum is enabled.

 void setForeColor(int value)
          

Gets the foreground color of the barcode image, if it's for web servlet render caption's color and code text's color may be all reduced to one color

 void setGraphicsUnit(int value)
          

Sets the measurement of graphics unit, default to millimeter

 void setHeight(float value)
          

Sets the height of x barcode image, if auto size is set to true, Width and Height settings will be ignored

 void setITF14BorderType(int value)
          

Sets ITF14 barcode's border type

 void setMacroPDF417FileID(int macroPDF417FileID)
          Sets macro pdf417 barcode's file ID.
 void setMacroPDF417LastSegment(boolean isMacroPDF417LastSegment)
          Getswhether this macro pdf417 barcode is the last segment.
 void setMacroPDF417SegmentID(int macroPDF417SegmentID)
          Sets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
 void setMargins(Margins value)
          

Sets the marginal size of an barcode image, the area around the barcode.

 void setPDF417AspectRatio(float value)
          Sets PDF417 barcode's module height to width ratio
 void setPDF417Columns(int value)
          Sets columns of PDF417 barcode, illegal settings will be ignored
 void setPDF417CompactMode(int value)
          Sets compaction mode of PDF417 barcode, available modes are PDF417CompactMode.AUTO, PDF417CompactMode.BINARY, PDF417CompactMode.NUMERIC, PDF417CompactMode.TEXT
 void setPDF417ErrorLevel(int value)
          

Sets error correction level of PDF417 barcode, from LEVEL0 to LEVEL8, LEVEL 0 for no error correction, LEVEL8 for max error correction.

 void setPDF417Rows(int value)
          Sets rows of PDF417 barcode, illegal settings will be ignored
 void setPDF417Truncated(boolean value)
          Sets whether PDF417 barcode is truncated.
 void setPlanetShortBarHeight(float value)
          Sets the short bar's height of Planet type of barcode, to set up tall bar's height, use setBarHeight and getBarHeight.
 void setPostnetShortBarHeight(float value)
          Sets the short bar's height of Postnet type of barcode, to set up tall bar's height, use setBarHeight and getBarHeight method.
 void setQRErrorLevel(int value)
          Sets QR barcode's error correction level.
 void setResolution(Resolution value)
          

Sets the resolution of the barcode image

 void setSupplementSpace(float value)
          Sets the space between main barcode and the supplement barcode
 void setSupplementText(java.lang.String value)
          Sets the supplement barcode's code text.
 void setSymbology(long value)
          

Sets the symbology of BarCodeBuilder.

 void setWideNarrowRatio(float value)
          

Sets wide bars to narrow bars ratio for some types of one dimensional barcode, default to 3.0

 void setWidth(float value)
          

Sets the width of x barcode image, if auto size is set to true, Width and Height settings will be ignored

 void setXDimension(float value)
          

Sets the width of x smallest bar, or the smallest module's width of 2D barcodes measured in GraphicsUnit

 void setYDimension(float value)
          

Sets the height of x smallest module of 2D barcodes.

 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EAN128FNC1

public static final char EAN128FNC1
FNC1 character value for EAN128 BarCode

See Also:
Constant Field Values
Constructor Detail

BarCodeBuilder

public BarCodeBuilder()
Constructs x BarCodeBuilder


BarCodeBuilder

public BarCodeBuilder(long symbology,
                      java.lang.String codeText)
Constructs x BarCodeBuilder with specific Symbology and CodeText

Parameters:
symbology - Symbology of barcode
codeText - Data to be encoded
Method Detail

getSymbology

public long getSymbology()

Gets the symbology of BarCodeBuilder. Supported Symbologies:

 Codabar, Code11, Code128, Code39, Code39 extended, Code93, Code93 extended
 Interleaved 2of5, Standard2of5, MSI, UPCA, UPCE
 
Example
 	BarCodeBuilder b = new BarCodeBuilder();
 	if(b.getSymbology() != Symbology.CODE128)
 	{
 		b.setSymbology(Symbology.CODE128)
 	}
 

See Also:
setSymbology(long value)

setSymbology

public void setSymbology(long value)

Sets the symbology of BarCodeBuilder. Supported symbologies:

 Codabar, Code11, Code128, Code39, Code39 extended, Code93, Code93 extended
 Interleaved 2of5, Standard2of5, MSI, UPCA, UPCE
 

Parameters:
value - from com.aspose.barcode.Symbology

Example

                                                                                                                                                             	BarCodeBuilder b = new BarCodeBuilder();
                                                                                                                                                             	if(b.getSymbology() != Symbology.CODE128)
                                                                                                                                                             	{
                                                                                                                                                             		b.setSymbology(Symbology.CODE128)
                                                                                                                                                             	}
                                                                                                                                                             
See Also:
getSymbology(), Symbology

getCodeText

public java.lang.String getCodeText()

Gets the code text of the barcode, code text is the data encoded into the barcode image Some barcode symbologies may require certain types of code text, such as UPCA and UPCE require numbers only

Returns:
String
See Also:
setCodeText(String)

setCodeText

public void setCodeText(java.lang.String value)

Sets the code text of the barcode, code text is the data encoded into the barcode image If code text is null or empty, exception will be thrown. Some barcode symbologies may require certain types of code text, such as UPCA and UPCE require numbers only

Example

 	BarCodeBuilder b = new BarCodeBuilder();
 	b.setCodeText("12345678");
 	b.setSymbology(Symbology.UPCA);
 	try
 	{
 		b.save("test.jpg");
 	}
 	catch(Exception ex)
 	{
 		ex.printStackTrace();
 	}
 

Parameters:
value - of String
See Also:
getCodeText()

getCodeTextFont

public javax.microedition.lcdui.Font getCodeTextFont()

Gets the code text's font of x barcode. barcode image normally has human readable code text printed along with the machine readable barcode. Code text font specifies human readable code text's font style. Default font is Serif.

Returns:
java.awt.Font
See Also:
setCodeTextFont(Font)

setCodeTextFont

public void setCodeTextFont(javax.microedition.lcdui.Font value)

Sets the code text's font of x barcode. barcode image normally has human readable code text printed along with the machine readable barcode. Code text font specifies human readable code text's font style. Default font is Serif.

Example

 	BarCodeBuilder b = new BarCodeBuilder();
 	b.setCodeTextFont(new Font("Serif", Font.BOLD + Font.ITALIC, 20));
 

Parameters:
value - of java.awt.Font
See Also:
getCodeTextFont()

getBorderVisible

public boolean getBorderVisible()

Gets whether to draw the border or not

Returns:
boolean
See Also:
setBorderVisible(boolean), getBorderColor(), getBorderWidth(), setBorderWidth(float)

setBorderVisible

public void setBorderVisible(boolean value)

Sets whether to draw the border or not

Parameters:
value - of boolean
See Also:
getBorderVisible(), getBorderColor(), getBorderWidth(), setBorderWidth(float)

getBorderWidth

public float getBorderWidth()

Gets border's width of x barcode image. measured by GraphicsUnit, defaulted: millimeter

Returns:
border's width if visible
See Also:
getBorderColor(), getBorderVisible(), setBorderVisible(boolean)

setBorderWidth

public void setBorderWidth(float value)

Sets border's width of x barcode image. measured by GraphicsUnit, defaulted: millimeter

Parameters:
value - greater or equal to zero
See Also:
getBorderColor(), getBorderVisible(), setBorderVisible(boolean)

getEnableChecksum

public boolean getEnableChecksum()

Gets whether checksum is enabled. Some symbologies such as UPCA, UPCE require Checksum to be presented, they will ignore enable checksum setting


setEnableChecksum

public void setEnableChecksum(boolean value)

Sets wether checksum is enabled. Some symbologies such as UPCA, UPCE require Checksum to be presented, they will ignore enable checksum setting


getMargins

public Margins getMargins()

Gets the marginal size of an barcode image, the area around the barcode. If autosize option is set to true, marginal area will grow automatically if captions won't fit in

BarCodeBuilder b = new BarCodeBuilder(); b.setGraphicsUnit(GraphicsUnit.MILIMETER); //10 millimeters marginal area at the bottom and the left b.getMargins().setBottom(10); b.getMargins().setLeft(10);

Returns:
Current margin settings
See Also:
setMargins(Margins)

setMargins

public void setMargins(Margins value)

Sets the marginal size of an barcode image, the area around the barcode. If autosize option is set to true, marginal area will grow automatically if captions won't fit in

BarCodeBuilder b = new BarCodeBuilder(); b.setMargins(new Margins(10, 10, 10, 10));

See Also:
getMargins()

getXDimension

public float getXDimension()

Gets the width of x smallest bar, or the smallest module's width of 2D barcodes measured in GraphicsUnit

See Also:
setXDimension(float)

setXDimension

public void setXDimension(float value)

Sets the width of x smallest bar, or the smallest module's width of 2D barcodes measured in GraphicsUnit

Example

 	BarCodeBuilder b = new BarCodeBuilder();
 	b.setGraphicsUnit(GraphicsUnit.MILIMETER);
 	b.setXDimension(0.5f);
 

Parameters:
value - of float, xDimension values measured in com.aspose.barcode.GraphicsUnit

getYDimension

public float getYDimension()

Gets the height of x smallest module of 2D barcodes.

Returns:
float

setYDimension

public void setYDimension(float value)

Sets the height of x smallest module of 2D barcodes.

Parameters:
value - of float

getBarHeight

public float getBarHeight()

Gets the bar's height for 1D barcodes, measured in com.aspose.barcode.GraphicsUnit

Returns:
bar's height of one dimensional barcode
See Also:
setBarHeight(float)

setBarHeight

public void setBarHeight(float value)

Sets the bar's height for 1D barcodes, measured in com.aspose.barcode.GraphicsUnit

Example

 	BarCodeBuilder b = new BarCodeBuilder();
 	b.setGraphicsUnit(GraphicsUnit.MILIMETER);
 	b.setBarHeight(20f);
 

Parameters:
value - of float, bar's height of one dimensional barcode

getGraphicsUnit

public int getGraphicsUnit()

Gets the measurement of graphics unit, default to millimeter

Returns:
com.aspose.barcode.GraphicsUnit

setGraphicsUnit

public void setGraphicsUnit(int value)

Sets the measurement of graphics unit, default to millimeter

Example

 	BarCodeBuilder b = new BarCodeBuilder();
 	//graphics unit set to pixel
 	b.setGraphicsUnit(GraphicsUnit.PIXEL);
 	//the smallest bar's width will be 2 pixel
 	b.setXDimension(2);
 	//bar's height of one dimensional barcode will be 20 pixels
 	b.setBarHeight(20);
 

Parameters:
value - of int, com.aspose.barcode.GraphicsUnit

getForeColor

public int getForeColor()

Gets the foreground color of the barcode image, if it's for web servlet render caption's color and code text's color may be all reduced to one color

Returns:
java.awt.Color

setForeColor

public void setForeColor(int value)

Gets the foreground color of the barcode image, if it's for web servlet render caption's color and code text's color may be all reduced to one color

Parameters:
value - of Color, java.awt.Color

getBackColor

public int getBackColor()

Gets the background color of the barcode image, default to white

Returns:
java.awt.Color
See Also:
getForeColor()

setBackColor

public void setBackColor(int value)

Sets the background color of the barcode image, default to white

Example

 	BarCodeBuilder b = new BarCodeBuilder();
 	b.setBackColor(Color.WHITE);
 

Parameters:
value - of Color, java.awt.Color
See Also:
getBackColor()

getCodeTextColor

public int getCodeTextColor()

Gets the human readable code text's color

Returns:
java.awt.Color

setCodeTextColor

public void setCodeTextColor(int value)

Sets the human readable code text's color

Parameters:
value - of Color, java.awt.Color

getResolution

public Resolution getResolution()

Gets the resolution of the barcode image

Example

 	BarCodeBuilder b = new BarCodeBuilder();
 	b.getResolution().setDpiX(96);
 	b.getResolution().setDpiY(96);
 

Returns:
com.aspose.barcode.Resolution
See Also:
setResolution(Resolution)

setResolution

public void setResolution(Resolution value)

Sets the resolution of the barcode image

Example

 	BarCodeBuilder b = new BarCodeBuilder();
 	b.setResolution(new Resolution(96, 96));
 

Parameters:
value - of Resolution, com.aspose.barcode.Resolution
See Also:
getResolution()

getCodeTextVisible

public boolean getCodeTextVisible()

Gets whether or not to show the human readable code text

See Also:
setCodeTextVisible(boolean)

setCodeTextVisible

public void setCodeTextVisible(boolean value)

Sets whether or not to show the human readable code text, some symbologies of barcode may ignore this setting

See Also:
getCodeTextVisible()

getCodabarStartSymbol

public int getCodabarStartSymbol()

Gets the start symbol for codabar types of barcode

Returns:
com.aspose.barcode.CodabarSymbol

setCodabarStartSymbol

public void setCodabarStartSymbol(int value)

Sets the start symbol for codabar types of barcode

Example

 	BarCodeBuilder b = new BarCodeBuilder();
 	b.setCodabarStartSymbol(CodabarSymbol.A);
 

Parameters:
value - of CodabarSymbol, com.aspose.barcode.CodabarSymbol

getCodabarStopSymbol

public int getCodabarStopSymbol()

Gets the stop symbol of codabar types of barcode

Returns:
com.aspose.barcode.CodabarSymbol
See Also:
setCodabarStopSymbol(int)

setCodabarStopSymbol

public void setCodabarStopSymbol(int value)

Sets the stop symbol of codabar types of barcode

Example

 	BarCodeBuilder b = new BarCodeBuilder();
 	b.setCodabarStopSymbol(CodabarSymbol.A);
 

Parameters:
value - of CodarbarSymbol, com.aspose.barcode.CodarbarSymbol
See Also:
getCodabarStopSymbol()

getCode128Set

public int getCode128Set()

Gets code set for code128 types of barcode

Returns:
com.aspose.barcode.Code128Set

setCode128Set

public void setCode128Set(int value)

Sets code set for code128 types of barcode

Example

 	BarCodeBuilder b = new BarCodeBuilder();
 	b.setSymbology(Symbology.CODE128);
 	b.setCode128Set(Code128Set.AUTO);
 

Parameters:
value - of Code128Set, com.aspose.barcode.Code128Set

getWideNarrowRatio

public float getWideNarrowRatio()

Gets wide bars to narrow bars ratio for some types of one dimensional barcode

See Also:
setWideNarrowRatio(float)

setWideNarrowRatio

public void setWideNarrowRatio(float value)

Sets wide bars to narrow bars ratio for some types of one dimensional barcode, default to 3.0

See Also:
getWideNarrowRatio()

getAutoSize

public boolean getAutoSize()

Gets whether auto sizing the barcode image or not. If auto size set to false, image size will be decided by width and height settings

See Also:
setWidth(float), setHeight(float)

setAutoSize

public void setAutoSize(boolean value)

Sets whether auto sizing the barcode image or not. If auto size set to false, image size will be decided by width and height settings

See Also:
setWidth(float), setHeight(float)

getWidth

public float getWidth()

Gets the width of x barcode image.

See Also:
setWidth(float)

setWidth

public void setWidth(float value)

Sets the width of x barcode image, if auto size is set to true, Width and Height settings will be ignored

See Also:
setAutoSize(boolean), getWidth()

getHeight

public float getHeight()

Gets the height of x barcode image.

See Also:
setHeight(float)

setHeight

public void setHeight(float value)

Sets the height of x barcode image, if auto size is set to true, Width and Height settings will be ignored

See Also:
getHeight(), setAutoSize(boolean)

getBorderColor

public int getBorderColor()

Gets border's color of the barcode image

Returns:
java.awt.Color

setBorderColor

public void setBorderColor(int value)

Sets border's color of the barcode image

Parameters:
value - of Color, java.awt.Color

getITF14BorderType

public int getITF14BorderType()

Gets ITF14 barcode's border type

Returns:
ITF14BorderType

setITF14BorderType

public void setITF14BorderType(int value)

Sets ITF14 barcode's border type

Parameters:
value - of ITF14BorderType

getPDF417ErrorLevel

public int getPDF417ErrorLevel()

Gets error correction level of PDF417 barcode, from LEVEL0 to LEVEL8, LEVEL 0 for no error correction, LEVEL8 for max error correction.

Returns:
int

setPDF417ErrorLevel

public void setPDF417ErrorLevel(int value)

Sets error correction level of PDF417 barcode, from LEVEL0 to LEVEL8, LEVEL 0 for no error correction, LEVEL8 for max error correction.

Parameters:
value -

getPDF417CompactMode

public int getPDF417CompactMode()

Gets compaction mode of PDF417 barcode, available modes are PDF417CompactMode.AUTO, PDF417CompactMode.BINARY, PDF417CompactMode.NUMERIC, PDF417CompactMode.TEXT

Returns:
int

setPDF417CompactMode

public void setPDF417CompactMode(int value)
Sets compaction mode of PDF417 barcode, available modes are PDF417CompactMode.AUTO, PDF417CompactMode.BINARY, PDF417CompactMode.NUMERIC, PDF417CompactMode.TEXT

Parameters:
value - of int

getPDF417Rows

public int getPDF417Rows()
Gets rows of PDF417 barcode, illegal settings will be ignored

Returns:
int

setPDF417Rows

public void setPDF417Rows(int value)
Sets rows of PDF417 barcode, illegal settings will be ignored

Parameters:
value -

getPDF417Columns

public int getPDF417Columns()
Gets columns of PDF417 barcode, illegal settings will be ignored

Returns:
columns of PDF417 type of barcode

setPDF417Columns

public void setPDF417Columns(int value)
Sets columns of PDF417 barcode, illegal settings will be ignored

Parameters:
value -

getPDF417Truncated

public boolean getPDF417Truncated()
Gets whether PDF417 barcode is truncated, that is, the right guard area om

Returns:
boolean

setPDF417Truncated

public void setPDF417Truncated(boolean value)
Sets whether PDF417 barcode is truncated.

Parameters:
value - of boolean

getPDF417AspectRatio

public float getPDF417AspectRatio()
Gets PDF417 barcode's module height to width ratio

Returns:
float
See Also:
setPDF417AspectRatio(float)

setPDF417AspectRatio

public void setPDF417AspectRatio(float value)
Sets PDF417 barcode's module height to width ratio

Parameters:
value - of float
See Also:
getPDF417AspectRatio()

getQRErrorLevel

public int getQRErrorLevel()
Gets QR barcode's error correction level.

Returns:
int
See Also:
setQRErrorLevel(int)

setQRErrorLevel

public void setQRErrorLevel(int value)
Sets QR barcode's error correction level.

Parameters:
value - of int
See Also:
getQRErrorLevel()

getDataMatrixMode

public int getDataMatrixMode()
Gets Datamatrix barcode's encode mode.

Returns:
int
See Also:
setDataMatrixMode(int)

setDataMatrixMode

public void setDataMatrixMode(int value)
Sets Datamatrix barcode's encode mode

Parameters:
value -
See Also:
getDataMatrixMode()

getAztecErrorLevel

public int getAztecErrorLevel()
Gets Aztec barcode's error correction level

Returns:
AztecErrorLevel
See Also:
setAztecErrorLevel(int)

setAztecErrorLevel

public void setAztecErrorLevel(int value)
Sets Aztec barcode's error correction level

Parameters:
value - of int
See Also:
getAztecErrorLevel()

getPlanetShortBarHeight

public float getPlanetShortBarHeight()
Gets the short bar's height of Planet type of barcode, to set up tall bar's height, use setBarHeight and getBarHeight.

Returns:
Short bar height of Planet type of barcode.
See Also:
setPlanetShortBarHeight(float), setBarHeight(float)

setPlanetShortBarHeight

public void setPlanetShortBarHeight(float value)
Sets the short bar's height of Planet type of barcode, to set up tall bar's height, use setBarHeight and getBarHeight. Illegal setting will be ignored.

Parameters:
value -
See Also:
getPlanetShortBarHeight(), setBarHeight(float)

getPostnetShortBarHeight

public float getPostnetShortBarHeight()
Gets the short bar's height of Postnet type of barcode, to set up tall bar's height, use setBarHeight and getBarHeight.

Returns:
Short bar height of Postnet type of barcode.
See Also:
setPostnetShortBarHeight(float)

setPostnetShortBarHeight

public void setPostnetShortBarHeight(float value)
Sets the short bar's height of Postnet type of barcode, to set up tall bar's height, use setBarHeight and getBarHeight method. Illegal setting will be ignored.

Parameters:
value -
See Also:
getPostnetShortBarHeight()

getSupplementSpace

public float getSupplementSpace()
Gets the space between main barcode and the supplement barcode

Returns:
float
See Also:
setSupplementSpace(float)

setSupplementSpace

public void setSupplementSpace(float value)
Sets the space between main barcode and the supplement barcode

Parameters:
value -
See Also:
getSupplementSpace()

getSupplementText

public java.lang.String getSupplementText()
Gets the supplement barcode's code text. Only EAN8, EAN13, BooklandEAN, UPCA, UPCE has supplements. Supplement codetext only contains numeric characters with length to be 2 or 5.

Returns:
String

setSupplementText

public void setSupplementText(java.lang.String value)
Sets the supplement barcode's code text. Only EAN8, EAN13, BooklandEAN, UPCA, UPCE has supplements. Supplement codetext only contains numeric characters with length to be 2 or 5.

Example // Instantiate barcode object BarCodeBuilder bb = new BarCodeBuilder(); // Set up barcode symbology bb.setSymbology(Symbology.EAN13); // Set up supplement code text bb.setSupplementText("012345"); // Set up code text (data to encode) bb.setCodeText("1234567890");

Parameters:
value -

getMacroPDF417SegmentID

public int getMacroPDF417SegmentID()
Gets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.

Returns:
int represents macro pdf417 barcode's segment ID

setMacroPDF417SegmentID

public void setMacroPDF417SegmentID(int macroPDF417SegmentID)
Sets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.

Parameters:
macroPDF417SegmentID -

getMacroPDF417FileID

public int getMacroPDF417FileID()
Gets macro pdf417 barcode's file ID.

Returns:
int value represents macro pdf417 barcode's file ID.

setMacroPDF417FileID

public void setMacroPDF417FileID(int macroPDF417FileID)
Sets macro pdf417 barcode's file ID.

Parameters:
macroPDF417FileID -

getMacroPDF417LastSegment

public boolean getMacroPDF417LastSegment()
Gets whether this macro pdf417 barcode is the last segment.

Returns:
boolean value

setMacroPDF417LastSegment

public void setMacroPDF417LastSegment(boolean isMacroPDF417LastSegment)
Getswhether this macro pdf417 barcode is the last segment.

Parameters:
isMacroPDF417LastSegment -

render

public void render(javax.microedition.lcdui.Graphics g)

Renders barcode by Graphics g

Example

 

public class AppletSample extends Applet { public void paint(Graphics g) { BarCodeBuilder b = new BarCodeBuilder(); b.setSymbology(Symbology.CODE128); b.setCodeText("12345678"); b.render(g); } }

Parameters:
g - java.awt.Graphics

getAustraliaPostFormatControlCode

public int getAustraliaPostFormatControlCode()

setAustraliaPostFormatControlCode

public void setAustraliaPostFormatControlCode(int australiaPostFormatControlCode)