Java Doc for BarcodeDatamatrix.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.BarcodeDatamatrix

BarcodeDatamatrix
public class BarcodeDatamatrix (Code)
A DataMatrix 2D barcode generator.

Inner Class :static class Placement
Inner Class :static class ReedSolomon

Field Summary
final public static  intDM_ASCII
     ASCII encodation.
final public static  intDM_AUTO
     The best encodation will be used.
final public static  intDM_B256
     Binary encodation.
final public static  intDM_C40
     C40 encodation.
final public static  intDM_EDIFACT
     EDIFACT encodation.
final public static  intDM_ERROR_EXTENSION
     An error while parsing an extension.
final public static  intDM_ERROR_INVALID_SQUARE
     The dimensions given for the symbol are illegal.
final public static  intDM_ERROR_TEXT_TOO_BIG
     The text is too big for the symbology capabilities.
final public static  intDM_EXTENSION
     Allows extensions to be embedded at the start of the text.
final public static  intDM_NO_ERROR
     No error.
final public static  intDM_RAW
     No encodation needed.
final public static  intDM_TEST
     Doesn't generate the image but returns all the other information.
final public static  intDM_TEXT
     TEXT encodation.
final public static  intDM_X21
     X21 encodation.

Constructor Summary
public  BarcodeDatamatrix()
     Creates an instance of this class.

Method Summary
public  java.awt.ImagecreateAwtImage(Color foreground, Color background)
     Creates a java.awt.Image.
public  ImagecreateImage()
     Gets an Image with the barcode.
public  intgenerate(String text)
     Creates a barcode.
public  intgenerate(byte[] text, int textOffset, int textSize)
     Creates a barcode.
Parameters:
  text - the text
Parameters:
  textOffset - the offset to the start of the text
Parameters:
  textSize - the text size the status of the generation.
public  intgetHeight()
     Gets the height of the barcode.
public  byte[]getImage()
     Gets the generated image.
public  intgetOptions()
     Gets the barcode options.
public  intgetWidth()
     Gets the width of the barcode.
public  intgetWs()
     Gets the whitespace border around the barcode.
public  voidsetHeight(int height)
     Sets the height of the barcode.
public  voidsetOptions(int options)
     Sets the options for the barcode generation.
public  voidsetWidth(int width)
     Sets the width of the barcode.
public  voidsetWs(int ws)
     Sets the whitespace border around the barcode.

Field Detail
DM_ASCII
final public static int DM_ASCII(Code)
ASCII encodation.



DM_AUTO
final public static int DM_AUTO(Code)
The best encodation will be used.



DM_B256
final public static int DM_B256(Code)
Binary encodation.



DM_C40
final public static int DM_C40(Code)
C40 encodation.



DM_EDIFACT
final public static int DM_EDIFACT(Code)
EDIFACT encodation.



DM_ERROR_EXTENSION
final public static int DM_ERROR_EXTENSION(Code)
An error while parsing an extension.



DM_ERROR_INVALID_SQUARE
final public static int DM_ERROR_INVALID_SQUARE(Code)
The dimensions given for the symbol are illegal.



DM_ERROR_TEXT_TOO_BIG
final public static int DM_ERROR_TEXT_TOO_BIG(Code)
The text is too big for the symbology capabilities.



DM_EXTENSION
final public static int DM_EXTENSION(Code)
Allows extensions to be embedded at the start of the text.



DM_NO_ERROR
final public static int DM_NO_ERROR(Code)
No error.



DM_RAW
final public static int DM_RAW(Code)
No encodation needed. The bytes provided are already encoded.



DM_TEST
final public static int DM_TEST(Code)
Doesn't generate the image but returns all the other information.



DM_TEXT
final public static int DM_TEXT(Code)
TEXT encodation.



DM_X21
final public static int DM_X21(Code)
X21 encodation.




Constructor Detail
BarcodeDatamatrix
public BarcodeDatamatrix()(Code)
Creates an instance of this class.




Method Detail
createAwtImage
public java.awt.Image createAwtImage(Color foreground, Color background)(Code)
Creates a java.awt.Image. A successful call to the method generate() before calling this method is required.
Parameters:
  foreground - the color of the bars
Parameters:
  background - the color of the background the image



createImage
public Image createImage() throws BadElementException(Code)
Gets an Image with the barcode. A successful call to the method generate() before calling this method is required. the barcode Image
throws:
  BadElementException - on error



generate
public int generate(String text) throws UnsupportedEncodingException(Code)
Creates a barcode. The String is interpreted with the ISO-8859-1 encoding
Parameters:
  text - the text the status of the generation. It can be one of this values:

DM_NO_ERROR - no error.
DM_ERROR_TEXT_TOO_BIG - the text is too big for the symbology capabilities.
DM_ERROR_INVALID_SQUARE - the dimensions given for the symbol are illegal.
DM_ERROR_EXTENSION - an error was while parsing an extension.
throws:
  java.io.UnsupportedEncodingException - on error




generate
public int generate(byte[] text, int textOffset, int textSize)(Code)
Creates a barcode.
Parameters:
  text - the text
Parameters:
  textOffset - the offset to the start of the text
Parameters:
  textSize - the text size the status of the generation. It can be one of this values:

DM_NO_ERROR - no error.
DM_ERROR_TEXT_TOO_BIG - the text is too big for the symbology capabilities.
DM_ERROR_INVALID_SQUARE - the dimensions given for the symbol are illegal.
DM_ERROR_EXTENSION - an error was while parsing an extension.




getHeight
public int getHeight()(Code)
Gets the height of the barcode. Will contain the real height used after a successful call to generate(). This height doesn't include the whitespace border, if any. the height of the barcode



getImage
public byte[] getImage()(Code)
Gets the generated image. The image is represented as a stream of bytes, each byte representing 8 pixels, 0 for white and 1 for black, with the high-order bit of each byte first. Each row is aligned at byte boundaries. The dimensions of the image are defined by height and width plus 2 * ws. the generated image



getOptions
public int getOptions()(Code)
Gets the barcode options. the barcode options



getWidth
public int getWidth()(Code)
Gets the width of the barcode. Will contain the real width used after a successful call to generate(). This width doesn't include the whitespace border, if any. the width of the barcode



getWs
public int getWs()(Code)
Gets the whitespace border around the barcode. the whitespace border around the barcode



setHeight
public void setHeight(int height)(Code)
Sets the height of the barcode. If the height is zero it will be calculated. This height doesn't include the whitespace border, if any.

The allowed dimensions are (height, width):

10, 10
12, 12
8, 18
14, 14
8, 32
16, 16
12, 26
18, 18
20, 20
12, 36
22, 22
16, 36
24, 24
26, 26
16, 48
32, 32
36, 36
40, 40
44, 44
48, 48
52, 52
64, 64
72, 72
80, 80
88, 88
96, 96
104, 104
120, 120
132, 132
144, 144

Parameters:
  height - the height of the barcode




setOptions
public void setOptions(int options)(Code)
Sets the options for the barcode generation. The options can be:

One of:
DM_AUTO - the best encodation will be used
DM_ASCII - ASCII encodation
DM_C40 - C40 encodation
DM_TEXT - TEXT encodation
DM_B256 - binary encodation
DM_X21 - X21 encodation
DM_EDIFACT - EDIFACT encodation
DM_RAW - no encodation. The bytes provided are already encoded and will be added directly to the barcode, using padding if needed. It assumes that the encodation state is left at ASCII after the last byte.

One of:
DM_EXTENSION - allows extensions to be embedded at the start of the text:

exxxxxx - ECI number xxxxxx
m5 - macro 5
m6 - macro 6
f - FNC1
saabbccccc - Structured Append, aa symbol position (1-16), bb total number of symbols (2-16), ccccc file identification (0-64515)
p - Reader programming
. - extension terminator

Example for a structured append, symbol 2 of 6, with FNC1 and ECI 000005. The actual text is "Hello".

s020600075fe000005.Hello

One of:
DM_TEST - doesn't generate the image but returns all the other information.
Parameters:
  options - the barcode options




setWidth
public void setWidth(int width)(Code)
Sets the width of the barcode. If the width is zero it will be calculated. This width doesn't include the whitespace border, if any.

The allowed dimensions are (height, width):

10, 10
12, 12
8, 18
14, 14
8, 32
16, 16
12, 26
18, 18
20, 20
12, 36
22, 22
16, 36
24, 24
26, 26
16, 48
32, 32
36, 36
40, 40
44, 44
48, 48
52, 52
64, 64
72, 72
80, 80
88, 88
96, 96
104, 104
120, 120
132, 132
144, 144

Parameters:
  width - the width of the barcode




setWs
public void setWs(int ws)(Code)
Sets the whitespace border around the barcode.
Parameters:
  ws - the whitespace border around the barcode



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.