Java Doc for CSCreator.java in  » PDF » jPod » de » intarsys » pdf » content » common » 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 » jPod » de.intarsys.pdf.content.common 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


de.intarsys.pdf.content.CSVirtualDevice
   de.intarsys.pdf.content.common.CSCreator

CSCreator
public class CSCreator extends CSVirtualDevice (Code)
An implementation helping to create a PDF content stream using higher level abstractions than the PDF operators.

This object deals with two abstractions:

The CSContent , a sequence of PDF operators. The CSContent can be read from an existing object like a PDPage or a PDForm or can be newly created, suing the factory methods in CSContent .

The second abstraction is the IResourcesProvider for the PDResources like Fonts, XObjects, ... that are referenced in the CSContent . The resources of the provider are not accessed until a resource relevant operation is created.

This implementation is (nearly, see AffineTransform) independent of AWT or any other window toolkit.



Field Summary
final public static  floatKAPPA
    
final public static  intVALUE_COLOR_PRECISION
    
final public static  intVALUE_COORDINATE_PRECISION
    
final public static  intVALUE_DASH_PRECISION
    
final public static  intVALUE_FACTOR_PRECISION
    
final public static  intVALUE_FLATNESS_PRECISION
    
final public static  intVALUE_FONT_PRECISION
    
final public static  intVALUE_GRAY_PRECISION
    
final public static  intVALUE_WIDTH_PRECISION
    

Constructor Summary
protected  CSCreator(CSContent content, IContentStreamProvider contentStreamProvider, IResourcesProvider resourcesProvider)
    

Method Summary
protected  voidbasicTextShow(byte[] text)
    
protected  COSNamecheckResource(COSName resourceType, PDObject.MetaClass metaClass, COSName resourceName, PDObject resource)
    
public  voidclose()
    
public  voidcompatibilityBegin()
    
public  voidcompatibilityEnd()
    
public  voidcopy(CSContent otherContent)
     Copy all operations from otherContent to this.
public static  CSCreatorcreateFromContent(CSContent content, IResourcesProvider resourcesProvider)
     Create a CSCreator on an existing CSContent .
public static  CSCreatorcreateFromProvider(IContentStreamProvider provider)
     Create a CSCreator on an existing CSContent that will be read from the IContentStreamProvider .
public static  CSCreatorcreateNew(IContentStreamProvider provider)
     Create a CSCreator on a newly created CSContent .
public static  CSCreatorcreateNewDetached(IResourcesProvider provider)
     Create a CSCreator on a newly created CSContent .
public  voiddoShading(COSName name, PDShading shading)
    
public  voiddoXObject(COSName name, PDXObject xObject)
    
public  voidflush()
     Flush all pending operations on the stream.
public  CSContentgetContent()
     The CSContent we are working on.
public  IContentStreamProvidergetContentStreamProvider()
    
protected  PDResourcesgetResources()
    
public  IResourcesProvidergetResourcesProvider()
     The IResourcesProvider associated with this.
protected  ListgetStrings()
    
protected  ByteArrayOutputStreamgetTextBuffer()
    
public  voidinlineImage(PDImage img)
    
protected  booleanisFont(PDFont queryFont, float queryFontSize)
     Answer true if the actual font in the text state is equal to queryFont and queryFontSize.
Parameters:
  queryFont - The font to query.
Parameters:
  queryFontSize - The font size to query.
protected  booleanisNonStrokeCMYKColor(float c, float m, float y, float k)
    
protected  booleanisNonStrokeRGBColor(float r, float g, float b)
    
protected  booleanisStrokeCMYKColor(float c, float m, float y, float k)
    
protected  booleanisStrokeRGBColor(float r, float g, float b)
    
protected  booleanisTextMode()
    
public  voidmarkedContentBegin(COSName tag)
    
public  voidmarkedContentBeginProperties(COSName tag, COSName resourceName, COSDictionary properties)
    
public  voidmarkedContentEnd()
    
public  voidmarkedContentPoint(COSName tag)
    
public  voidmarkedContentPointProperties(COSName tag, COSName resourceName, COSDictionary properties)
    
public  voidopen(ICSInterpreter pInterpreter)
    
protected  voidoperationAdd(CSOperation operation)
    
public  voidpathClipEvenOdd()
    
public  voidpathClipNonZero()
    
public  voidpathClose()
    
public  voidpathCloseFillStrokeEvenOdd()
    
public  voidpathCloseFillStrokeNonZero()
    
public  voidpathCloseStroke()
    
public  voidpathEnd()
    
public  voidpathFillEvenOdd()
    
public  voidpathFillNonZero()
    
public  voidpathFillStrokeEvenOdd()
    
public  voidpathFillStrokeNonZero()
    
public  voidpathStroke()
    
public  voidpenCircle(float x, float y, float r)
     Draw a circle.
public  voidpenCurveToC(float x1, float y1, float x2, float y2, float x3, float y3)
    
public  voidpenCurveToV(float x2, float y2, float x3, float y3)
    
public  voidpenCurveToY(float x1, float y1, float x3, float y3)
    
public  voidpenEllipse(float x, float y, float rx, float ry)
     Draw an ellipse.
public  voidpenLineTo(float x, float y)
    
public  voidpenMoveTo(float x, float y)
    
public  voidpenRectangle(float x, float y, float w, float h)
    
protected  voidresetStrings()
    
protected  voidresetTextBuffer()
    
public  voidrestoreState()
    
public  voidsaveState()
    
public  voidsetExtendedState(COSName name, PDExtGState gstate)
    
public  voidsetFlatnessTolerance(float flatness)
    
public  voidsetLineCap(int style)
    
public  voidsetLineDash(float unitsOn, float unitsOff, float phase)
     Convenience method to access "setLineDash".
public  voidsetLineDash(float[] pattern, float phase)
    
public  voidsetLineJoin(int style)
    
public  voidsetLineWidth(float w)
    
public  voidsetMiterLimit(float miterLimit)
    
public  voidsetNonStrokeColorCMYK(float c, float m, float y, float k)
    
public  voidsetNonStrokeColorGray(float gray)
    
public  voidsetNonStrokeColorRGB(float red, float green, float blue)
    
public  voidsetNonStrokeColorSpace(COSName name, PDColorSpace colorSpace)
    
public  voidsetNonStrokeColorValues(float[] values)
    
public  voidsetNonStrokeColorValues(float[] values, COSName name, PDPattern pattern)
    
public  voidsetRenderingIntent(COSName intent)
    
public  voidsetStrokeColorCMYK(float cyan, float magenta, float yellow, float key)
    
public  voidsetStrokeColorGray(float gray)
    
public  voidsetStrokeColorRGB(float red, float green, float blue)
    
public  voidsetStrokeColorSpace(COSName name, PDColorSpace colorSpace)
    
public  voidsetStrokeColorValues(float[] values)
    
public  voidsetStrokeColorValues(float[] values, COSName name, PDPattern pattern)
    
protected  voidsetTextMode(boolean b)
    
protected  voidstreamEnd()
     Close a currently open line.
protected  voidstreamEndRun()
     Close a currently open optimzed character sequence.
protected  voidstreamEndShow(COSArray theStrings)
    
public  voidtextBegin()
    
public  voidtextEnd()
    
public  voidtextLineMove(float dx, float dy)
    
public  voidtextLineMoveSetLeading(float dx, float dy)
     Move the current text line by dx, dy.
public  voidtextLineMoveTo(float x, float y)
     Move the current text line to absolute position x, y.
public  voidtextLineNew()
    
public  voidtextMove(float dx, float dy)
    
public  voidtextMoveTo(float x, float y)
    
public  voidtextSetCharSpacing(float charSpace)
    
public  voidtextSetFont(COSName name, PDFont font, float size)
    
public  voidtextSetHorizontalScaling(float scale)
    
public  voidtextSetLeading(float leading)
    
public  voidtextSetRenderingMode(int rendering)
    
public  voidtextSetRise(float rise)
    
public  voidtextSetTransform(float a, float b, float c, float d, float e, float f)
    
public  voidtextSetWordSpacing(float wordSpace)
    
public  voidtextShow(byte[] text, int offset, int length)
    
public  voidtextT3SetGlyphWidth(float x, float y)
    
public  voidtextT3SetGlyphWidthBB(float x, float y, float llx, float lly, float urx, float ury)
    
public  voidtransform(float a, float b, float c, float d, float e, float f)
    

Field Detail
KAPPA
final public static float KAPPA(Code)
a constant for the ease of circle creation with beziers



VALUE_COLOR_PRECISION
final public static int VALUE_COLOR_PRECISION(Code)



VALUE_COORDINATE_PRECISION
final public static int VALUE_COORDINATE_PRECISION(Code)



VALUE_DASH_PRECISION
final public static int VALUE_DASH_PRECISION(Code)



VALUE_FACTOR_PRECISION
final public static int VALUE_FACTOR_PRECISION(Code)



VALUE_FLATNESS_PRECISION
final public static int VALUE_FLATNESS_PRECISION(Code)



VALUE_FONT_PRECISION
final public static int VALUE_FONT_PRECISION(Code)



VALUE_GRAY_PRECISION
final public static int VALUE_GRAY_PRECISION(Code)



VALUE_WIDTH_PRECISION
final public static int VALUE_WIDTH_PRECISION(Code)




Constructor Detail
CSCreator
protected CSCreator(CSContent content, IContentStreamProvider contentStreamProvider, IResourcesProvider resourcesProvider)(Code)
Create a CSCreator
Parameters:
  content - The content stream to write to.




Method Detail
basicTextShow
protected void basicTextShow(byte[] text)(Code)



checkResource
protected COSName checkResource(COSName resourceType, PDObject.MetaClass metaClass, COSName resourceName, PDObject resource)(Code)



close
public void close()(Code)



compatibilityBegin
public void compatibilityBegin()(Code)



compatibilityEnd
public void compatibilityEnd()(Code)



copy
public void copy(CSContent otherContent)(Code)
Copy all operations from otherContent to this.

Currently no resources are copied for otherContent
Parameters:
  otherContent - The source of the graphic operations.




createFromContent
public static CSCreator createFromContent(CSContent content, IResourcesProvider resourcesProvider)(Code)
Create a CSCreator on an existing CSContent . The content may be read from a PDPage or a PDForm or can be completely new.

This is the most basic factory method where you have the freedom to decide where the content comes from, where the resources come frome and wher the content will be used.
Parameters:
  content - The content stream to write to.
Parameters:
  resourcesProvider - The provider for the PDResources that contain theresources referenced in the CSContent. The new CSCreator




createFromProvider
public static CSCreator createFromProvider(IContentStreamProvider provider)(Code)
Create a CSCreator on an existing CSContent that will be read from the IContentStreamProvider . The old contents will be preserved, all operations are concatenated. The content is linked with the IContentStreamProvider and flushed to it when calling "flush".
Parameters:
  provider - The provider whose content stream will be replaced with theresult of this CSCreator The new CSCreator



createNew
public static CSCreator createNew(IContentStreamProvider provider)(Code)
Create a CSCreator on a newly created CSContent . The content is linked with the IContentStreamProvider and flushed to it when calling "flush".
Parameters:
  provider - The provider whose content stream will be replaced with theresult of this CSCreator The new CSCreator



createNewDetached
public static CSCreator createNewDetached(IResourcesProvider provider)(Code)
Create a CSCreator on a newly created CSContent . The content is not linked with the provider, which is only used the a IResourcesProvider . The resulting content can be accessed using "getContent".
Parameters:
  provider - The provider for resources within the new CSContent. The new CSCreator



doShading
public void doShading(COSName name, PDShading shading)(Code)



doXObject
public void doXObject(COSName name, PDXObject xObject)(Code)



flush
public void flush()(Code)
Flush all pending operations on the stream.

This must be called before the getContent operation is valid.




getContent
public CSContent getContent()(Code)
The CSContent we are working on. After calling flush the CSContent contains all operations stemming from calls to this. The CSContent we are working on.



getContentStreamProvider
public IContentStreamProvider getContentStreamProvider()(Code)



getResources
protected PDResources getResources()(Code)



getResourcesProvider
public IResourcesProvider getResourcesProvider()(Code)
The IResourcesProvider associated with this. The IResourcesProvider associated with this.



getStrings
protected List getStrings()(Code)



getTextBuffer
protected ByteArrayOutputStream getTextBuffer()(Code)



inlineImage
public void inlineImage(PDImage img)(Code)



isFont
protected boolean isFont(PDFont queryFont, float queryFontSize)(Code)
Answer true if the actual font in the text state is equal to queryFont and queryFontSize.
Parameters:
  queryFont - The font to query.
Parameters:
  queryFontSize - The font size to query. true if equal



isNonStrokeCMYKColor
protected boolean isNonStrokeCMYKColor(float c, float m, float y, float k)(Code)



isNonStrokeRGBColor
protected boolean isNonStrokeRGBColor(float r, float g, float b)(Code)



isStrokeCMYKColor
protected boolean isStrokeCMYKColor(float c, float m, float y, float k)(Code)



isStrokeRGBColor
protected boolean isStrokeRGBColor(float r, float g, float b)(Code)



isTextMode
protected boolean isTextMode()(Code)



markedContentBegin
public void markedContentBegin(COSName tag)(Code)



markedContentBeginProperties
public void markedContentBeginProperties(COSName tag, COSName resourceName, COSDictionary properties)(Code)



markedContentEnd
public void markedContentEnd()(Code)



markedContentPoint
public void markedContentPoint(COSName tag)(Code)



markedContentPointProperties
public void markedContentPointProperties(COSName tag, COSName resourceName, COSDictionary properties)(Code)



open
public void open(ICSInterpreter pInterpreter)(Code)



operationAdd
protected void operationAdd(CSOperation operation)(Code)



pathClipEvenOdd
public void pathClipEvenOdd()(Code)



pathClipNonZero
public void pathClipNonZero()(Code)



pathClose
public void pathClose()(Code)



pathCloseFillStrokeEvenOdd
public void pathCloseFillStrokeEvenOdd()(Code)



pathCloseFillStrokeNonZero
public void pathCloseFillStrokeNonZero()(Code)



pathCloseStroke
public void pathCloseStroke()(Code)



pathEnd
public void pathEnd()(Code)



pathFillEvenOdd
public void pathFillEvenOdd()(Code)



pathFillNonZero
public void pathFillNonZero()(Code)



pathFillStrokeEvenOdd
public void pathFillStrokeEvenOdd()(Code)



pathFillStrokeNonZero
public void pathFillStrokeNonZero()(Code)



pathStroke
public void pathStroke()(Code)



penCircle
public void penCircle(float x, float y, float r)(Code)
Draw a circle. The center of the circle is at x, y in user space. r defines the radius.
Parameters:
  x - The x coordinate of the center.
Parameters:
  y - The y coordinate of the center.
Parameters:
  r - The radius



penCurveToC
public void penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3)(Code)



penCurveToV
public void penCurveToV(float x2, float y2, float x3, float y3)(Code)



penCurveToY
public void penCurveToY(float x1, float y1, float x3, float y3)(Code)



penEllipse
public void penEllipse(float x, float y, float rx, float ry)(Code)
Draw an ellipse. The center of the ellipse is at x, y in user space. rx and ry define the radius in x and y direction respectively.
Parameters:
  x - The x coordinate of the center.
Parameters:
  y - The y coordinate of the center.
Parameters:
  rx - The radius in x direction
Parameters:
  ry - The radius in y direction



penLineTo
public void penLineTo(float x, float y)(Code)



penMoveTo
public void penMoveTo(float x, float y)(Code)



penRectangle
public void penRectangle(float x, float y, float w, float h)(Code)



resetStrings
protected void resetStrings()(Code)



resetTextBuffer
protected void resetTextBuffer()(Code)



restoreState
public void restoreState()(Code)



saveState
public void saveState()(Code)



setExtendedState
public void setExtendedState(COSName name, PDExtGState gstate)(Code)



setFlatnessTolerance
public void setFlatnessTolerance(float flatness)(Code)



setLineCap
public void setLineCap(int style)(Code)



setLineDash
public void setLineDash(float unitsOn, float unitsOff, float phase)(Code)
Convenience method to access "setLineDash".
Parameters:
  unitsOn -
Parameters:
  unitsOff -
Parameters:
  phase -



setLineDash
public void setLineDash(float[] pattern, float phase)(Code)



setLineJoin
public void setLineJoin(int style)(Code)



setLineWidth
public void setLineWidth(float w)(Code)



setMiterLimit
public void setMiterLimit(float miterLimit)(Code)



setNonStrokeColorCMYK
public void setNonStrokeColorCMYK(float c, float m, float y, float k)(Code)



setNonStrokeColorGray
public void setNonStrokeColorGray(float gray)(Code)



setNonStrokeColorRGB
public void setNonStrokeColorRGB(float red, float green, float blue)(Code)



setNonStrokeColorSpace
public void setNonStrokeColorSpace(COSName name, PDColorSpace colorSpace)(Code)



setNonStrokeColorValues
public void setNonStrokeColorValues(float[] values)(Code)



setNonStrokeColorValues
public void setNonStrokeColorValues(float[] values, COSName name, PDPattern pattern)(Code)



setRenderingIntent
public void setRenderingIntent(COSName intent)(Code)



setStrokeColorCMYK
public void setStrokeColorCMYK(float cyan, float magenta, float yellow, float key)(Code)



setStrokeColorGray
public void setStrokeColorGray(float gray)(Code)



setStrokeColorRGB
public void setStrokeColorRGB(float red, float green, float blue)(Code)



setStrokeColorSpace
public void setStrokeColorSpace(COSName name, PDColorSpace colorSpace)(Code)



setStrokeColorValues
public void setStrokeColorValues(float[] values)(Code)



setStrokeColorValues
public void setStrokeColorValues(float[] values, COSName name, PDPattern pattern)(Code)



setTextMode
protected void setTextMode(boolean b)(Code)



streamEnd
protected void streamEnd()(Code)
Close a currently open line.



streamEndRun
protected void streamEndRun()(Code)
Close a currently open optimzed character sequence.



streamEndShow
protected void streamEndShow(COSArray theStrings)(Code)



textBegin
public void textBegin()(Code)



textEnd
public void textEnd()(Code)



textLineMove
public void textLineMove(float dx, float dy)(Code)



textLineMoveSetLeading
public void textLineMoveSetLeading(float dx, float dy)(Code)
Move the current text line by dx, dy. Set the current leading to the dy offset.

PDF graphics operator "TD"
Parameters:
  dx - The x offset for the new glyph starting point.
Parameters:
  dy - The y offset for the new glyph starting point.




textLineMoveTo
public void textLineMoveTo(float x, float y)(Code)
Move the current text line to absolute position x, y.

PDF graphics operator "Td"




textLineNew
public void textLineNew()(Code)



textMove
public void textMove(float dx, float dy)(Code)



textMoveTo
public void textMoveTo(float x, float y)(Code)



textSetCharSpacing
public void textSetCharSpacing(float charSpace)(Code)



textSetFont
public void textSetFont(COSName name, PDFont font, float size)(Code)



textSetHorizontalScaling
public void textSetHorizontalScaling(float scale)(Code)



textSetLeading
public void textSetLeading(float leading)(Code)



textSetRenderingMode
public void textSetRenderingMode(int rendering)(Code)



textSetRise
public void textSetRise(float rise)(Code)



textSetTransform
public void textSetTransform(float a, float b, float c, float d, float e, float f)(Code)



textSetWordSpacing
public void textSetWordSpacing(float wordSpace)(Code)



textShow
public void textShow(byte[] text, int offset, int length)(Code)



textT3SetGlyphWidth
public void textT3SetGlyphWidth(float x, float y)(Code)



textT3SetGlyphWidthBB
public void textT3SetGlyphWidthBB(float x, float y, float llx, float lly, float urx, float ury)(Code)



transform
public void transform(float a, float b, float c, float d, float e, float f)(Code)



Methods inherited from de.intarsys.pdf.content.CSVirtualDevice
public void open(ICSInterpreter pInterpreter)(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.