Java Doc for Barcode.java in  » PDF » pdf-itext » com » lowagie » text » pdf » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » pdf itext » com.lowagie.text.pdf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.lowagie.text.pdf.Barcode

All known Subclasses:   com.lowagie.text.pdf.BarcodeEAN,  com.lowagie.text.pdf.BarcodePostnet,  com.lowagie.text.pdf.Barcode39,  com.lowagie.text.pdf.BarcodeCodabar,  com.lowagie.text.pdf.Barcode128,  com.lowagie.text.pdf.BarcodeInter25,  com.lowagie.text.pdf.BarcodeEANSUPP,
Barcode
abstract public class Barcode (Code)
Base class containing properties and methods commom to all barcode types.
author:
   Paulo Soares (psoares@consiste.pt)


Field Summary
final public static  intCODABAR
    
final public static  intCODE128
    
final public static  intCODE128_RAW
    
final public static  intCODE128_UCC
    
final public static  intEAN13
    
final public static  intEAN8
    
final public static  intPLANET
    
final public static  intPOSTNET
    
final public static  intSUPP2
    
final public static  intSUPP5
    
final public static  intUPCA
    
final public static  intUPCE
    
protected  StringaltText
     The alternate text to be used, if present.
protected  floatbarHeight
     The height of the bars.
protected  floatbaseline
     If positive, the text distance under the bars.
protected  booleanchecksumText
     Shows the generated checksum in the the text.
protected  Stringcode
     The code to generate.
protected  intcodeType
     The code type.
protected  booleanextended
     Generates extended barcode 39.
protected  BaseFontfont
     The text font.
protected  booleangenerateChecksum
     The optional checksum generation.
protected  booleanguardBars
     Show the guard bars for barcode EAN.
protected  floatinkSpreading
     The ink spreading.
protected  floatn
     The bar multiplier for wide bars or the distance between bars for Postnet and Planet.
protected  floatsize
     The size of the text or the height of the shorter bar in Postnet.
protected  booleanstartStopText
     Show the start and stop character '*' in the text for the barcode 39 or 'ABCD' for codabar.
protected  inttextAlignment
     The text alignment.
protected  floatx
     The minimum bar width.


Method Summary
abstract public  java.awt.ImagecreateAwtImage(Color foreground, Color background)
     Creates a java.awt.Image.
public  ImagecreateImageWithBarcode(PdfContentByte cb, Color barColor, Color textColor)
     Creates an Image with the barcode.
Parameters:
  cb - the PdfContentByte to create the Image.
public  PdfTemplatecreateTemplateWithBarcode(PdfContentByte cb, Color barColor, Color textColor)
     Creates a template with the barcode.
Parameters:
  cb - the PdfContentByte to create the template.
public  StringgetAltText()
     Gets the alternate text.
public  floatgetBarHeight()
     Gets the height of the bars.
abstract public  RectanglegetBarcodeSize()
     Gets the maximum area that the barcode and the text, if any, will occupy.
public  floatgetBaseline()
     Gets the text baseline. If positive, the text distance under the bars.
public  StringgetCode()
     Gets the code to generate.
public  intgetCodeType()
     Gets the code type.
public  BaseFontgetFont()
     Gets the text font.
public  floatgetInkSpreading()
     Gets the amount of ink spreading.
public  floatgetN()
     Gets the bar multiplier for wide bars.
public  floatgetSize()
     Gets the size of the text.
public  intgetTextAlignment()
     Gets the text alignment.
public  floatgetX()
     Gets the minimum bar width.
public  booleanisChecksumText()
     Gets the property to show the generated checksum in the the text.
public  booleanisExtended()
     Gets the property to generate extended barcode 39.
public  booleanisGenerateChecksum()
     Gets the optional checksum generation.
public  booleanisGuardBars()
     Gets the property to show the guard bars for barcode EAN.
public  booleanisStartStopText()
     Sets the property to show the start and stop character '*' in the text for the barcode 39.
abstract public  RectangleplaceBarcode(PdfContentByte cb, Color barColor, Color textColor)
     Places the barcode in a PdfContentByte.
public  voidsetAltText(String altText)
     Sets the alternate text.
public  voidsetBarHeight(float barHeight)
     Sets the height of the bars.
public  voidsetBaseline(float baseline)
     Sets the text baseline.
public  voidsetChecksumText(boolean checksumText)
     Sets the property to show the generated checksum in the the text.
public  voidsetCode(String code)
     Sets the code to generate.
public  voidsetCodeType(int codeType)
     Sets the code type.
public  voidsetExtended(boolean extended)
     Sets the property to generate extended barcode 39.
public  voidsetFont(BaseFont font)
     Sets the text font.
Parameters:
  font - the text font.
public  voidsetGenerateChecksum(boolean generateChecksum)
     Setter for property generateChecksum.
public  voidsetGuardBars(boolean guardBars)
     Sets the property to show the guard bars for barcode EAN.
public  voidsetInkSpreading(float inkSpreading)
     Sets the amount of ink spreading.
public  voidsetN(float n)
     Sets the bar multiplier for wide bars.
public  voidsetSize(float size)
     Sets the size of the text.
public  voidsetStartStopText(boolean startStopText)
     Gets the property to show the start and stop character '*' in the text for the barcode 39.
public  voidsetTextAlignment(int textAlignment)
     Sets the text alignment.
public  voidsetX(float x)
     Sets the minimum bar width.

Field Detail
CODABAR
final public static int CODABAR(Code)
A type of barcode



CODE128
final public static int CODE128(Code)
A type of barcode



CODE128_RAW
final public static int CODE128_RAW(Code)
A type of barcode



CODE128_UCC
final public static int CODE128_UCC(Code)
A type of barcode



EAN13
final public static int EAN13(Code)
A type of barcode



EAN8
final public static int EAN8(Code)
A type of barcode



PLANET
final public static int PLANET(Code)
A type of barcode



POSTNET
final public static int POSTNET(Code)
A type of barcode



SUPP2
final public static int SUPP2(Code)
A type of barcode



SUPP5
final public static int SUPP5(Code)
A type of barcode



UPCA
final public static int UPCA(Code)
A type of barcode



UPCE
final public static int UPCE(Code)
A type of barcode



altText
protected String altText(Code)
The alternate text to be used, if present.



barHeight
protected float barHeight(Code)
The height of the bars.



baseline
protected float baseline(Code)
If positive, the text distance under the bars. If zero or negative, the text distance above the bars.



checksumText
protected boolean checksumText(Code)
Shows the generated checksum in the the text.



code
protected String code(Code)
The code to generate.



codeType
protected int codeType(Code)
The code type.



extended
protected boolean extended(Code)
Generates extended barcode 39.



font
protected BaseFont font(Code)
The text font. null if no text.



generateChecksum
protected boolean generateChecksum(Code)
The optional checksum generation.



guardBars
protected boolean guardBars(Code)
Show the guard bars for barcode EAN.



inkSpreading
protected float inkSpreading(Code)
The ink spreading.



n
protected float n(Code)
The bar multiplier for wide bars or the distance between bars for Postnet and Planet.



size
protected float size(Code)
The size of the text or the height of the shorter bar in Postnet.



startStopText
protected boolean startStopText(Code)
Show the start and stop character '*' in the text for the barcode 39 or 'ABCD' for codabar.



textAlignment
protected int textAlignment(Code)
The text alignment. Can be Element.ALIGN_LEFT, Element.ALIGN_CENTER or Element.ALIGN_RIGHT.



x
protected float x(Code)
The minimum bar width.





Method Detail
createAwtImage
abstract public java.awt.Image createAwtImage(Color foreground, Color background)(Code)
Creates a java.awt.Image. This image only contains the bars without any text.
Parameters:
  foreground - the color of the bars
Parameters:
  background - the color of the background the image



createImageWithBarcode
public Image createImageWithBarcode(PdfContentByte cb, Color barColor, Color textColor)(Code)
Creates an Image with the barcode.
Parameters:
  cb - the PdfContentByte to create the Image. Itserves no other use
Parameters:
  barColor - the color of the bars. It can be null
Parameters:
  textColor - the color of the text. It can be null the Image
See Also:   Barcode.placeBarcode(PdfContentByte cb,Color barColor,Color textColor)



createTemplateWithBarcode
public PdfTemplate createTemplateWithBarcode(PdfContentByte cb, Color barColor, Color textColor)(Code)
Creates a template with the barcode.
Parameters:
  cb - the PdfContentByte to create the template. Itserves no other use
Parameters:
  barColor - the color of the bars. It can be null
Parameters:
  textColor - the color of the text. It can be null the template
See Also:   Barcode.placeBarcode(PdfContentByte cb,Color barColor,Color textColor)



getAltText
public String getAltText()(Code)
Gets the alternate text. the alternate text



getBarHeight
public float getBarHeight()(Code)
Gets the height of the bars. the height of the bars



getBarcodeSize
abstract public Rectangle getBarcodeSize()(Code)
Gets the maximum area that the barcode and the text, if any, will occupy. The lower left corner is always (0, 0). the size the barcode occupies.



getBaseline
public float getBaseline()(Code)
Gets the text baseline. If positive, the text distance under the bars. If zero or negative, the text distance above the bars. the baseline.



getCode
public String getCode()(Code)
Gets the code to generate. the code to generate



getCodeType
public int getCodeType()(Code)
Gets the code type. the code type



getFont
public BaseFont getFont()(Code)
Gets the text font. null if no text. the text font. null if no text



getInkSpreading
public float getInkSpreading()(Code)
Gets the amount of ink spreading. the ink spreading



getN
public float getN()(Code)
Gets the bar multiplier for wide bars. the bar multiplier for wide bars



getSize
public float getSize()(Code)
Gets the size of the text. the size of the text



getTextAlignment
public int getTextAlignment()(Code)
Gets the text alignment. Can be Element.ALIGN_LEFT, Element.ALIGN_CENTER or Element.ALIGN_RIGHT. the text alignment



getX
public float getX()(Code)
Gets the minimum bar width. the minimum bar width



isChecksumText
public boolean isChecksumText()(Code)
Gets the property to show the generated checksum in the the text. value of property checksumText



isExtended
public boolean isExtended()(Code)
Gets the property to generate extended barcode 39. value of property extended.



isGenerateChecksum
public boolean isGenerateChecksum()(Code)
Gets the optional checksum generation. the optional checksum generation



isGuardBars
public boolean isGuardBars()(Code)
Gets the property to show the guard bars for barcode EAN. value of property guardBars



isStartStopText
public boolean isStartStopText()(Code)
Sets the property to show the start and stop character '*' in the text for the barcode 39. value of property startStopText



placeBarcode
abstract public Rectangle placeBarcode(PdfContentByte cb, Color barColor, Color textColor)(Code)
Places the barcode in a PdfContentByte. The barcode is always placed at coodinates (0, 0). Use the translation matrix to move it elsewhere.

The bars and text are written in the following colors:

barColor

textColor

Result

null

null

bars and text painted with current fill color

barColor

null

bars and text painted with barColor

null

textColor

bars painted with current color
text painted with textColor

barColor

textColor

bars painted with barColor
text painted with textColor


Parameters:
  cb - the PdfContentByte where the barcode will be placed
Parameters:
  barColor - the color of the bars. It can be null
Parameters:
  textColor - the color of the text. It can be null the dimensions the barcode occupies




setAltText
public void setAltText(String altText)(Code)
Sets the alternate text. If present, this text will be used instead of the text derived from the supplied code.
Parameters:
  altText - the alternate text



setBarHeight
public void setBarHeight(float barHeight)(Code)
Sets the height of the bars.
Parameters:
  barHeight - the height of the bars



setBaseline
public void setBaseline(float baseline)(Code)
Sets the text baseline. If positive, the text distance under the bars. If zero or negative, the text distance above the bars.
Parameters:
  baseline - the baseline.



setChecksumText
public void setChecksumText(boolean checksumText)(Code)
Sets the property to show the generated checksum in the the text.
Parameters:
  checksumText - new value of property checksumText



setCode
public void setCode(String code)(Code)
Sets the code to generate.
Parameters:
  code - the code to generate



setCodeType
public void setCodeType(int codeType)(Code)
Sets the code type.
Parameters:
  codeType - the code type



setExtended
public void setExtended(boolean extended)(Code)
Sets the property to generate extended barcode 39.
Parameters:
  extended - new value of property extended



setFont
public void setFont(BaseFont font)(Code)
Sets the text font.
Parameters:
  font - the text font. Set to null to suppress any text



setGenerateChecksum
public void setGenerateChecksum(boolean generateChecksum)(Code)
Setter for property generateChecksum.
Parameters:
  generateChecksum - New value of property generateChecksum.



setGuardBars
public void setGuardBars(boolean guardBars)(Code)
Sets the property to show the guard bars for barcode EAN.
Parameters:
  guardBars - new value of property guardBars



setInkSpreading
public void setInkSpreading(float inkSpreading)(Code)
Sets the amount of ink spreading. This value will be subtracted to the width of each bar. The actual value will depend on the ink and the printing medium.
Parameters:
  inkSpreading - the ink spreading



setN
public void setN(float n)(Code)
Sets the bar multiplier for wide bars.
Parameters:
  n - the bar multiplier for wide bars



setSize
public void setSize(float size)(Code)
Sets the size of the text.
Parameters:
  size - the size of the text



setStartStopText
public void setStartStopText(boolean startStopText)(Code)
Gets the property to show the start and stop character '*' in the text for the barcode 39.
Parameters:
  startStopText - new value of property startStopText



setTextAlignment
public void setTextAlignment(int textAlignment)(Code)
Sets the text alignment. Can be Element.ALIGN_LEFT, Element.ALIGN_CENTER or Element.ALIGN_RIGHT.
Parameters:
  textAlignment - the text alignment



setX
public void setX(float x)(Code)
Sets the minimum bar width.
Parameters:
  x - the minimum bar width



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.