DynamicPDF by ceTe Software

com.cete.dynamicpdf.pageelements.barcoding
Class Code128

java.lang.Object
  extended by com.cete.dynamicpdf.PageElement
      extended by com.cete.dynamicpdf.pageelements.TaggablePageElement
          extended by com.cete.dynamicpdf.pageelements.RotatingPageElement
              extended by com.cete.dynamicpdf.pageelements.barcoding.BarCode
                  extended by com.cete.dynamicpdf.pageelements.barcoding.TextBarCode
                      extended by com.cete.dynamicpdf.pageelements.barcoding.Code128
All Implemented Interfaces:
ICoordinate

public class Code128
extends TextBarCode

This class can be used to place a Code128 bar code on a page.

Licensing:
This class is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:

View Example


Constructor Summary
Code128(java.lang.String value, float x, float y, float height)
          Creates a new instance of Code128.
Code128(java.lang.String value, float x, float y, float height, boolean showText)
          Creates a new instance of Code128.
Code128(java.lang.String value, float x, float y, float height, float xDimension)
          Creates a new instance of Code128.
Code128(java.lang.String value, float x, float y, float height, float xDimension, boolean showText)
          Creates a new instance of Code128.
Code128(java.lang.String value, float x, float y, float height, float xDimension, Font font, float fontSize)
          Creates a new instance of Code128.
Code128(java.lang.String value, float x, float y, float height, Font font, float fontSize)
          Creates a new instance of Code128.
 
Method Summary
protected  void drawBarCode(PageWriter writer)
          Draws the barcode to the given PageWriter object.
 boolean getContinueToNextSymbol()
          Gets if the barcode will be continued to another Code 128 barcode.
 boolean getIsUCCEAN128()
          Gets if the barcode is a UCC / EAN Code 128 barcode.
 int getLookAhead()
          Gets the number of characters to look ahead when determining the best mode.
 float getSymbolWidth()
          Returns the width required to display the full bar code.
 void setContinueToNextSymbol(boolean value)
          Sets if the barcode will be continued to another Code 128 barcode.
 void setIsUCCEAN128(boolean value)
          Sets if the barcode is a UCC / EAN Code 128 barcode.
 void setLookAhead(int value)
          Sets the number of characters to look ahead when determining the best mode.
 
Methods inherited from class com.cete.dynamicpdf.pageelements.barcoding.TextBarCode
getFont, getFontSize, getShowText, getTextAlign, getTextColor, setFont, setFontSize, setShowText, setTextAlign, setTextColor
 
Methods inherited from class com.cete.dynamicpdf.pageelements.barcoding.BarCode
drawRotated, getColor, getPixelsPerXDimension, getValue, getXDimension, getXDimensionMilliMeters, getXDimensionMils, getXDimensionsPerCentiMeter, getXDimensionsPerInch, setColor, setPixelsPerXDimension, setValue, setXDimension, setXDimensionMilliMeters, setXDimensionMils, setXDimensionsPerCentiMeter, setXDimensionsPerInch
 
Methods inherited from class com.cete.dynamicpdf.pageelements.RotatingPageElement
draw, getAngle, getHeight, getX, getY, setAngle, setHeight, setX, setY
 
Methods inherited from class com.cete.dynamicpdf.pageelements.TaggablePageElement
getTag, getTagOrder, setTag, setTagOrder
 
Methods inherited from class com.cete.dynamicpdf.PageElement
getRequiredLicenseLevel, getStrID, setRequiredLicenseLevel, setStrID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cete.dynamicpdf.pageelements.ICoordinate
getX, getY, setX, setY
 

Constructor Detail

Code128

public Code128(java.lang.String value,
               float x,
               float y,
               float height)
Creates a new instance of Code128.

Parameters:
value - The value of the barcode.
x - The X coordinate of the barcode.
y - The Y coordinate of the barcode.
height - The height of the barcode.

Code128

public Code128(java.lang.String value,
               float x,
               float y,
               float height,
               boolean showText)
Creates a new instance of Code128.

Parameters:
value - The value of the barcode.
x - The X coordinate of the barcode.
y - The Y coordinate of the barcode.
height - The height of the barcode.
showText - true, to display value of barcode as text. Otherwise, display barcode only.

Code128

public Code128(java.lang.String value,
               float x,
               float y,
               float height,
               Font font,
               float fontSize)
Creates a new instance of Code128.

Parameters:
value - The value of the barcode.
x - The X coordinate of the barcode.
y - The Y coordinate of the barcode.
height - The height of the barcode.
font - The Font to use when displaying text.
fontSize - The font size to use when displaying text.

Code128

public Code128(java.lang.String value,
               float x,
               float y,
               float height,
               float xDimension)
Creates a new instance of Code128.

Parameters:
value - The value of the barcode.
x - The X coordinate of the barcode.
y - The Y coordinate of the barcode.
height - The height of the barcode.
xDimension - The XDimension of the barcode.

Code128

public Code128(java.lang.String value,
               float x,
               float y,
               float height,
               float xDimension,
               boolean showText)
Creates a new instance of Code128.

Parameters:
value - The value of the barcode.
x - The X coordinate of the barcode.
y - The Y coordinate of the barcode.
height - The height of the barcode.
xDimension - The XDimension of the barcode.
showText - true, to display value of barcode as text. Otherwise, display barcode only.

Code128

public Code128(java.lang.String value,
               float x,
               float y,
               float height,
               float xDimension,
               Font font,
               float fontSize)
Creates a new instance of Code128.

Parameters:
value - The value of the barcode.
x - The X coordinate of the barcode.
y - The Y coordinate of the barcode.
height - The height of the barcode.
xDimension - The XDimension of the barcode.
font - The Font to use when displaying text.
fontSize - The font size to use when displaying text.
Method Detail

getLookAhead

public int getLookAhead()
Gets the number of characters to look ahead when determining the best mode. This is used initially and when switching from Mode C.

Returns:
the number of characters to look ahead when determining the best mode.

setLookAhead

public void setLookAhead(int value)
Sets the number of characters to look ahead when determining the best mode. This is used initially and when switching from Mode C.

Parameters:
value - the number of characters to look ahead when determining the best mode.

getContinueToNextSymbol

public boolean getContinueToNextSymbol()
Gets if the barcode will be continued to another Code 128 barcode. If true a FNC2 code will be the first (second if IsUCCEAN128 is true) character in the barcode.

Returns:
the barcode will be continued to another Code 128 barcode.

setContinueToNextSymbol

public void setContinueToNextSymbol(boolean value)
Sets if the barcode will be continued to another Code 128 barcode. If true, a FNC2 code will be the first (second if IsUCCEAN128 is true) character in the barcode.

Parameters:
value - the barcode will be continued to another Code 128 barcode.

getIsUCCEAN128

public boolean getIsUCCEAN128()
Gets if the barcode is a UCC / EAN Code 128 barcode. If true, a FNC1 code will be the first character in the barcode.

Returns:
the barcode is a UCC / EAN Code 128 barcode.

setIsUCCEAN128

public void setIsUCCEAN128(boolean value)
Sets if the barcode is a UCC / EAN Code 128 barcode. If true, a FNC1 code will be the first character in the barcode.

Parameters:
value - the barcode is a UCC / EAN Code 128 barcode.

drawBarCode

protected void drawBarCode(PageWriter writer)
Draws the barcode to the given PageWriter object.

Specified by:
drawBarCode in class BarCode
Parameters:
writer - PageWriter object to receive the page element's output.
See Also:
PageWriter

getSymbolWidth

public float getSymbolWidth()
Returns the width required to display the full bar code.

Specified by:
getSymbolWidth in class BarCode
Returns:
value representing the required width.

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.07 for Java generated on Aug 12, 2020
© Copyright 2020, ceTe Software