Java Doc for PDFPage.java in  » PDF » PDF-Renderer » com » sun » pdfview » 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 Renderer » com.sun.pdfview 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.pdfview.PDFPage

PDFPage
public class PDFPage (Code)
A PDFPage encapsulates the parsed commands required to render a single page from a PDFFile. The PDFPage is not itself drawable; instead, create a PDFImage to display something on the screen.

This file also contains all of the PDFCmd commands that might be a part of the command stream in a PDFPage. They probably should be inner classes of PDFPage instead of separate non-public classes.
author:
   Mike Wessler




Constructor Summary
public  PDFPage(Rectangle2D bbox, int rotation)
     create a PDFPage with dimensions in bbox and rotation.
public  PDFPage(int pageNumber, Rectangle2D bbox, int rotation, Cache cache)
     create a PDFPage with dimensions in bbox and rotation.

Method Summary
public  voidaddCommand(PDFCmd cmd)
     Add a single command to the page list.
public  voidaddCommands(PDFPage page)
     add a collection of commands to the page list.
public  voidaddCommands(PDFPage page, AffineTransform extra)
     add a collection of commands to the page list.
public  voidaddDash(float[] dashary, float phase)
    
public  voidaddEndCap(int capstyle)
    
public  voidaddFillAlpha(float a)
    
public  voidaddFillPaint(PDFPaint p)
    
public  voidaddImage(PDFImage image)
    
public  voidaddLineJoin(int joinstyle)
    
public  voidaddMiterLimit(float limit)
    
public  voidaddPath(GeneralPath path, int style)
    
public  voidaddPop()
    
public  voidaddPush()
    
public  voidaddStrokeAlpha(float a)
    
public  voidaddStrokePaint(PDFPaint p)
    
public  voidaddStrokeWidth(float w)
    
public  voidaddXform(AffineTransform at)
    
public  voidclearCommands()
    
public synchronized  voidfinish()
     The entire page is done.
public  floatgetAspectRatio()
     get the aspect ratio of the correctly oriented page.
public  Rectangle2DgetBBox()
     get the bounding box of the page, before any rotation.
public  PDFCmdgetCommand(int index)
    
public  intgetCommandCount()
    
public  ListgetCommands()
    
public  ListgetCommands(int startIndex)
    
public  ListgetCommands(int startIndex, int endIndex)
    
public  floatgetHeight()
    
public  ImagegetImage(int width, int height, Rectangle2D clip, ImageObserver observer)
     Get an image producer which can be used to draw the image represented by this PDFPage.
public  ImagegetImage(int width, int height, Rectangle2D clip, ImageObserver observer, boolean drawbg, boolean wait)
     Get an image producer which can be used to draw the image represented by this PDFPage.
public  AffineTransformgetInitialTransform(int width, int height, Rectangle2D clip)
    
public  intgetPageNumber()
    
public  intgetRotation()
    
public  DimensiongetUnstretchedSize(int width, int height, Rectangle2D clip)
     Get the width and height of this image in the correct aspect ratio. The image returned will have at least one of the width and height values identical to those requested.
public  floatgetWidth()
    
public  booleanisFinished()
     get whether parsing for this PDFPage has been completed and all commands are in place.
public  voidstop(int width, int height, Rectangle2D clip)
    
public  voidupdateImages()
    
public synchronized  voidwaitForFinish()
    


Constructor Detail
PDFPage
public PDFPage(Rectangle2D bbox, int rotation)(Code)
create a PDFPage with dimensions in bbox and rotation.



PDFPage
public PDFPage(int pageNumber, Rectangle2D bbox, int rotation, Cache cache)(Code)
create a PDFPage with dimensions in bbox and rotation.




Method Detail
addCommand
public void addCommand(PDFCmd cmd)(Code)
Add a single command to the page list.



addCommands
public void addCommands(PDFPage page)(Code)
add a collection of commands to the page list. This is probably invoked as the result of an XObject 'do' command, or through a type 3 font.



addCommands
public void addCommands(PDFPage page, AffineTransform extra)(Code)
add a collection of commands to the page list. This is probably invoked as the result of an XObject 'do' command, or through a type 3 font.
Parameters:
  page - the source of other commands. It MUST be finished.
Parameters:
  extra - a transform to perform before adding the commands.If null, no extra transform will be added.



addDash
public void addDash(float[] dashary, float phase)(Code)
set the dash style
Parameters:
  dashary - the array of on-off lengths
Parameters:
  phase - offset of the array at the start of the line drawing



addEndCap
public void addEndCap(int capstyle)(Code)
set the end cap style
Parameters:
  capstyle - the cap style: 0 = BUTT, 1 = ROUND, 2 = SQUARE



addFillAlpha
public void addFillAlpha(float a)(Code)
set the fill alpha



addFillPaint
public void addFillPaint(PDFPaint p)(Code)
set the fill paint



addImage
public void addImage(PDFImage image)(Code)
draw an image
Parameters:
  image - the image to draw



addLineJoin
public void addLineJoin(int joinstyle)(Code)
set the line join style
Parameters:
  joinstyle - the join style: 0 = MITER, 1 = ROUND, 2 = BEVEL



addMiterLimit
public void addMiterLimit(float limit)(Code)
set the miter limit



addPath
public void addPath(GeneralPath path, int style)(Code)
set the current path
Parameters:
  path - the path
Parameters:
  style - the style: PDFShapeCmd.STROKE, PDFShapeCmd.FILL,PDFShapeCmd.BOTH, PDFShapeCmd.CLIP, or some combination.



addPop
public void addPop()(Code)
pop the graphics state



addPush
public void addPush()(Code)
push the graphics state



addStrokeAlpha
public void addStrokeAlpha(float a)(Code)
set the stroke alpha



addStrokePaint
public void addStrokePaint(PDFPaint p)(Code)
set the stroke paint



addStrokeWidth
public void addStrokeWidth(float w)(Code)
set the stroke width
Parameters:
  w - the width of the stroke



addXform
public void addXform(AffineTransform at)(Code)
concatenate a transform to the graphics state



clearCommands
public void clearCommands()(Code)
Clear all commands off the current page



finish
public synchronized void finish()(Code)
The entire page is done. This must only be invoked once. All observers will be notified.



getAspectRatio
public float getAspectRatio()(Code)
get the aspect ratio of the correctly oriented page. the width/height aspect ratio of the page



getBBox
public Rectangle2D getBBox()(Code)
get the bounding box of the page, before any rotation.



getCommand
public PDFCmd getCommand(int index)(Code)
get the command at a given index



getCommandCount
public int getCommandCount()(Code)
get the current number of commands for this page



getCommands
public List getCommands()(Code)
get all the commands in the current page



getCommands
public List getCommands(int startIndex)(Code)
get all the commands in the current page starting at the given index



getCommands
public List getCommands(int startIndex, int endIndex)(Code)



getHeight
public float getHeight()(Code)
get the height of this page, after rotation



getImage
public Image getImage(int width, int height, Rectangle2D clip, ImageObserver observer)(Code)
Get an image producer which can be used to draw the image represented by this PDFPage. The ImageProducer is guaranteed to stay in sync with the PDFPage as commands are added to it. The image will contain the section of the page specified by the clip, scaled to fit in the area given by width and height.
Parameters:
  width - the width of the image to be produced
Parameters:
  height - the height of the image to be produced
Parameters:
  clip - the region in page space of the entire page todisplay
Parameters:
  observer - an image observer who will be notified when theimage changes, or null an Image that contains the PDF data



getImage
public Image getImage(int width, int height, Rectangle2D clip, ImageObserver observer, boolean drawbg, boolean wait)(Code)
Get an image producer which can be used to draw the image represented by this PDFPage. The ImageProducer is guaranteed to stay in sync with the PDFPage as commands are added to it. The image will contain the section of the page specified by the clip, scaled to fit in the area given by width and height.
Parameters:
  width - the width of the image to be produced
Parameters:
  height - the height of the image to be produced
Parameters:
  clip - the region in page space of the entire page todisplay
Parameters:
  observer - an image observer who will be notified when theimage changes, or null
Parameters:
  drawbg - if true, put a white background on the image. If not,draw no color (alpha 0) for the background.
Parameters:
  wait - if true, do not return until this image is fully rendered. an Image that contains the PDF data



getInitialTransform
public AffineTransform getInitialTransform(int width, int height, Rectangle2D clip)(Code)
Get the initial transform to map from a specified clip rectangle in pdf coordinates to an image of the specfied width and height in device coordinates
Parameters:
  width - the width of the image
Parameters:
  height - the height of the image
Parameters:
  clip - the desired clip rectangle (in PDF space) or null to usethe page's bounding box



getPageNumber
public int getPageNumber()(Code)
get the page number used to lookup this page the page number



getRotation
public int getRotation()(Code)
get the rotation of this image



getUnstretchedSize
public Dimension getUnstretchedSize(int width, int height, Rectangle2D clip)(Code)
Get the width and height of this image in the correct aspect ratio. The image returned will have at least one of the width and height values identical to those requested. The other dimension may be smaller, so as to keep the aspect ratio the same as in the original page.
Parameters:
  width - the maximum width of the image
Parameters:
  height - the maximum height of the image
Parameters:
  clip - the region in page space of the page todisplay. It may be null, in which the page's defined crop boxwill be used.



getWidth
public float getWidth()(Code)
get the width of this page, after rotation



isFinished
public boolean isFinished()(Code)
get whether parsing for this PDFPage has been completed and all commands are in place.



stop
public void stop(int width, int height, Rectangle2D clip)(Code)
Stop the rendering of a particular image on this page



updateImages
public void updateImages()(Code)
Notify all images we know about that a command has been added



waitForFinish
public synchronized void waitForFinish() throws InterruptedException(Code)
wait for finish



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.