Java Doc for DocWriter.java in  » PDF » pdf-itext » com » lowagie » text » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.lowagie.text.DocWriter

All known Subclasses:   com.lowagie.text.html.HtmlWriter,  com.lowagie.text.rtf.RtfWriter2,  com.lowagie.text.rtf.RtfWriter,  com.lowagie.text.pdf.PdfWriter,
DocWriter
abstract public class DocWriter implements DocListener(Code)
An abstract Writer class for documents.

DocWriter is the abstract class of several writers such as PdfWriter and HtmlWriter. A DocWriter can be added as a DocListener to a certain Document by getting an instance (see method getInstance() in the specific writer-classes). Every Element added to the original Document will be written to the OutputStream of the listening DocWriter.
See Also:   Document
See Also:   DocListener



Field Summary
final public static  byteEQUALS
     This is some byte that is often used.
final public static  byteFORWARD
     This is some byte that is often used.
final public static  byteGT
     This is some byte that is often used.
final public static  byteLT
     This is some byte that is often used.
final public static  byteNEWLINE
     This is some byte that is often used.
final public static  byteQUOTE
     This is some byte that is often used.
final public static  byteSPACE
     This is some byte that is often used.
final public static  byteTAB
     This is some byte that is often used.
protected  booleancloseStream
    
protected  Documentdocument
     This is the document that has to be written.
protected  booleanopen
    
protected  OutputStreamCounteros
     The outputstream of this writer.
protected  RectanglepageSize
     The pageSize.
protected  booleanpause
    

Constructor Summary
protected  DocWriter()
    
protected  DocWriter(Document document, OutputStream os)
     Constructs a DocWriter.

Method Summary
public  booleanadd(Element element)
     Signals that an Element was added to the Document.
protected  voidaddTabs(int indent)
     Writes a number of tabs.
public  voidclose()
     Signals that the Document was closed and that no other Elements will be added.
public  voidflush()
     Flushes the BufferedOutputStream.
final public static  byte[]getISOBytes(String text)
     Converts a String into a Byte array according to the ISO-8859-1 codepage.
public  booleanisCloseStream()
    
public  booleanisPaused()
     Checks if writing is paused.
public  booleannewPage()
     Signals that an new page has to be started.

This does nothing.

public  voidopen()
     Signals that the Document was opened.
public  voidpause()
     Let the writer know that all writing has to be paused.
public  voidresetFooter()
     Resets the footer of this document.
public  voidresetHeader()
     Resets the header of this document.
public  voidresetPageCount()
     Sets the page number to 0.
public  voidresume()
     Let the writer know that writing may be resumed.
public  voidsetCloseStream(boolean closeStream)
    
public  voidsetFooter(HeaderFooter footer)
     Changes the footer of this document.
public  voidsetHeader(HeaderFooter header)
     Changes the header of this document.
public  booleansetMarginMirroring(boolean MarginMirroring)
    
public  booleansetMargins(float marginLeft, float marginRight, float marginTop, float marginBottom)
     Sets the margins.

This does nothing.

public  voidsetPageCount(int pageN)
     Sets the page number.
public  booleansetPageSize(Rectangle pageSize)
     Sets the pagesize.
protected  voidwrite(String string)
     Writes a String to the OutputStream.
protected  voidwrite(String key, String value)
     Writes a key-value pair to the outputstream.
protected  voidwriteEnd(String tag)
     Writes an endtag to the outputstream.
protected  voidwriteEnd()
     Writes an endtag to the outputstream.
protected  booleanwriteMarkupAttributes(Properties markup)
     Writes the markup attributes of the specified MarkupAttributes object to the OutputStream.
Parameters:
  markup - a Properties collection to write.
protected  voidwriteStart(String tag)
     Writes a starttag to the outputstream.

Field Detail
EQUALS
final public static byte EQUALS(Code)
This is some byte that is often used.



FORWARD
final public static byte FORWARD(Code)
This is some byte that is often used.



GT
final public static byte GT(Code)
This is some byte that is often used.



LT
final public static byte LT(Code)
This is some byte that is often used.



NEWLINE
final public static byte NEWLINE(Code)
This is some byte that is often used.



QUOTE
final public static byte QUOTE(Code)
This is some byte that is often used.



SPACE
final public static byte SPACE(Code)
This is some byte that is often used.



TAB
final public static byte TAB(Code)
This is some byte that is often used.



closeStream
protected boolean closeStream(Code)
Closes the stream on document close



document
protected Document document(Code)
This is the document that has to be written.



open
protected boolean open(Code)
Is the writer open for writing?



os
protected OutputStreamCounter os(Code)
The outputstream of this writer.



pageSize
protected Rectangle pageSize(Code)
The pageSize.



pause
protected boolean pause(Code)
Do we have to pause all writing actions?




Constructor Detail
DocWriter
protected DocWriter()(Code)



DocWriter
protected DocWriter(Document document, OutputStream os)(Code)
Constructs a DocWriter.
Parameters:
  document - The Document that has to be written
Parameters:
  os - The OutputStream the writer has to write to.




Method Detail
add
public boolean add(Element element) throws DocumentException(Code)
Signals that an Element was added to the Document.

This method should be overriden in the specific DocWriter classes derived from this abstract class.
Parameters:
  element - A high level object to add false
throws:
  DocumentException - when a document isn't open yet, or has been closed




addTabs
protected void addTabs(int indent) throws IOException(Code)
Writes a number of tabs.
Parameters:
  indent - the number of tabs to add
throws:
  IOException -



close
public void close()(Code)
Signals that the Document was closed and that no other Elements will be added.



flush
public void flush()(Code)
Flushes the BufferedOutputStream.



getISOBytes
final public static byte[] getISOBytes(String text)(Code)
Converts a String into a Byte array according to the ISO-8859-1 codepage.
Parameters:
  text - the text to be converted the conversion result



isCloseStream
public boolean isCloseStream()(Code)
Checks if the stream is to be closed on document close true if the stream is closed on documnt close



isPaused
public boolean isPaused()(Code)
Checks if writing is paused. true if writing temporarely has to be paused, false otherwise.



newPage
public boolean newPage()(Code)
Signals that an new page has to be started.

This does nothing. Has to be overridden if needed. true if the page was added, false if not.
throws:
  DocumentException - when a document isn't open yet, or has been closed




open
public void open()(Code)
Signals that the Document was opened.



pause
public void pause()(Code)
Let the writer know that all writing has to be paused.



resetFooter
public void resetFooter()(Code)
Resets the footer of this document.

This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of footers.




resetHeader
public void resetHeader()(Code)
Resets the header of this document.

This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of headers.




resetPageCount
public void resetPageCount()(Code)
Sets the page number to 0.

This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of pagenumbers.




resume
public void resume()(Code)
Let the writer know that writing may be resumed.



setCloseStream
public void setCloseStream(boolean closeStream)(Code)
Sets the close state of the stream after document close
Parameters:
  closeStream - true if the stream is closed on document close



setFooter
public void setFooter(HeaderFooter footer)(Code)
Changes the footer of this document.

This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of footers.
Parameters:
  footer - the new footer




setHeader
public void setHeader(HeaderFooter header)(Code)
Changes the header of this document.

This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of headers.
Parameters:
  header - the new header




setMarginMirroring
public boolean setMarginMirroring(boolean MarginMirroring)(Code)

See Also:   com.lowagie.text.DocListener.setMarginMirroring(boolean)



setMargins
public boolean setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom)(Code)
Sets the margins.

This does nothing. Has to be overridden if needed.
Parameters:
  marginLeft - the margin on the left
Parameters:
  marginRight - the margin on the right
Parameters:
  marginTop - the margin on the top
Parameters:
  marginBottom - the margin on the bottom false




setPageCount
public void setPageCount(int pageN)(Code)
Sets the page number.

This method should be overriden in the specific DocWriter classes derived from this abstract class if they actually support the use of pagenumbers.
Parameters:
  pageN - the new page number




setPageSize
public boolean setPageSize(Rectangle pageSize)(Code)
Sets the pagesize.
Parameters:
  pageSize - the new pagesize a boolean



write
protected void write(String string) throws IOException(Code)
Writes a String to the OutputStream.
Parameters:
  string - the String to write
throws:
  IOException -



write
protected void write(String key, String value) throws IOException(Code)
Writes a key-value pair to the outputstream.
Parameters:
  key - the name of an attribute
Parameters:
  value - the value of an attribute
throws:
  IOException -



writeEnd
protected void writeEnd(String tag) throws IOException(Code)
Writes an endtag to the outputstream.
Parameters:
  tag - the name of the tag
throws:
  IOException -



writeEnd
protected void writeEnd() throws IOException(Code)
Writes an endtag to the outputstream.
throws:
  IOException -



writeMarkupAttributes
protected boolean writeMarkupAttributes(Properties markup) throws IOException(Code)
Writes the markup attributes of the specified MarkupAttributes object to the OutputStream.
Parameters:
  markup - a Properties collection to write. true, if writing the markup attributes succeeded
throws:
  IOException -



writeStart
protected void writeStart(String tag) throws IOException(Code)
Writes a starttag to the outputstream.
Parameters:
  tag - the name of the tag
throws:
  IOException -



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.