java.lang.Objectcom.pdfjet.BarCode
public class BarCode
Used to create one dimentional barcodes - UPC, Code 39 and Code 128. Please see Example_11.
Field Summary | |
---|---|
static int |
BOTTOM_TO_TOP
|
static int |
CODE128
|
static int |
CODE39
|
static int |
LEFT_TO_RIGHT
|
static int |
TOP_TO_BOTTOM
|
static int |
UPC
|
Constructor Summary | |
---|---|
BarCode(int type,
java.lang.String str)
The constructor. |
Method Summary | |
---|---|
float[] |
drawOn(Page page)
Draws this barcode on the specified page. |
void |
setBarHeightFactor(double barHeightFactor)
Sets the bar height factor. |
void |
setBarHeightFactor(float barHeightFactor)
Sets the bar height factor. |
void |
setDirection(int direction)
Sets the drawing direction for this font. |
void |
setFont(Font font)
Sets the font to be used with this barcode. |
void |
setLocation(float x1,
float y1)
Sets the location where this barcode will be drawn on the page. |
void |
setModuleLength(double moduleLength)
Sets the module length of this barcode. |
void |
setModuleLength(float moduleLength)
Sets the module length of this barcode. |
void |
setPosition(double x1,
double y1)
Sets the position where this barcode will be drawn on the page. |
void |
setPosition(float x1,
float y1)
Sets the position where this barcode will be drawn on the page. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UPC
public static final int CODE128
public static final int CODE39
public static final int LEFT_TO_RIGHT
public static final int TOP_TO_BOTTOM
public static final int BOTTOM_TO_TOP
Constructor Detail |
---|
public BarCode(int type, java.lang.String str)
type
- the type of the barcode.str
- the content string of the barcode.Method Detail |
---|
public void setPosition(double x1, double y1)
x1
- the x coordinate of the top left corner of the barcode.y1
- the y coordinate of the top left corner of the barcode.public void setPosition(float x1, float y1)
x1
- the x coordinate of the top left corner of the barcode.y1
- the y coordinate of the top left corner of the barcode.public void setLocation(float x1, float y1)
x1
- the x coordinate of the top left corner of the barcode.y1
- the y coordinate of the top left corner of the barcode.public void setModuleLength(double moduleLength)
moduleLength
- the specified module length.public void setModuleLength(float moduleLength)
moduleLength
- the specified module length.public void setBarHeightFactor(double barHeightFactor)
barHeightFactor
- the specified bar height factor.public void setBarHeightFactor(float barHeightFactor)
barHeightFactor
- the specified bar height factor.public void setDirection(int direction)
direction
- the specified direction.public void setFont(Font font)
font
- the specified font.public float[] drawOn(Page page) throws java.lang.Exception
drawOn
in interface Drawable
page
- the specified page.
java.lang.Exception