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


de.intarsys.pdf.cds.CDSBase
   de.intarsys.pdf.cds.CDSRectangle

CDSRectangle
public class CDSRectangle extends CDSBase (Code)
The implementation of the pdf rectangle data type.

The specification of the data type is found in [PDF} chapter 3.8.3.

 A rectangle is defined by
 [llx, lly, urx, ury ]
 where
 llx = lower left x coordinate
 lly = lower left y coordinate
 urx = upper right x coordinate
 ury = upper right y coordinate
 urx
 |
 v
 +-----+  <-ury
 |     |
 lly -> +-----+
 ˆ
 |
 llx
 
An application should be prepared to get any two diagonally opposite corners in the rectangle specification. Use "normalize()" to ensure a rectangle that conforms to the above picture.



Field Summary
final public static  float[]SIZE_A4
    

Constructor Summary
public  CDSRectangle()
     CDTRectangle constructor comment.
protected  CDSRectangle(COSArray newR)
     CDTRectangle constructor.
public  CDSRectangle(float llx, float lly, float urx, float ury)
     CDTRectangle constructor.
public  CDSRectangle(float[] rectArray)
     CDTRectangle constructor.
public  CDSRectangle(Rectangle2D rect)
    

Method Summary
public  booleancontains(double x, double y)
     true if x/y lies within this.
Parameters:
  x - x coordinate to be checked.
Parameters:
  y - y coordinate to be checked.
public  booleancontains(double x, double y, double epsilon)
     true if x/y lies within this, with a "uncertainty" of epsilon.
public  CDSRectanglecopy()
    
public static  CDSRectanglecreateFromCOS(COSArray array)
     Create a CDSRectangle from an array holding the rectangle coordinates.
public  floatgetHeight()
     Return the height (an absolute value) of the rectangle.
public  floatgetLowerLeftX()
     The lower left x coordinate.
public  floatgetLowerLeftY()
     The lower left y coordinate.
public  floatgetUpperRightX()
     The upper right x coordinate.
public  floatgetUpperRightY()
     The upper rigth y coordinate.
public  floatgetWidth()
     Get the width (an absolute value) of the rectangle.
public  voidinvalidateCaches()
    
public  voidmove(float dx, float dy)
     Move the rectangle by a relative offset.
public  CDSRectanglemoveTo(float x, float y)
     Move the rectangle to a new absolute position.
public  CDSRectanglenormalize()
     Adjust the corner coordinates so that lower left is really in the lower left (this means returns the smallest coordinate values).
public  voidresize(float dx, float dy)
     Resize the rectangle by moving the upper right corner.
public  voidresizeTo(float width, float height)
     Resize the rectangle to a new width and heigth.
public  voidsetCorners(float llx, float lly, float urx, float ury)
     Set the corners of this.
public  voidsetHeight(float height)
     Set the height of this.
public  voidsetLowerLeftX(float num)
     Set the lower left x coordinate.
public  voidsetLowerLeftY(float num)
     Set the lower left y coordinate.
public  voidsetUpperRightX(float num)
     Set the upper right x coordinate.
public  voidsetUpperRightY(float num)
     Set the upper right y coordinate.
public  voidsetWidth(float width)
     Set the width of this.
public  Rectangle2DtoNormalizedRectangle()
     Construct a Rectangle2D object from the receiver.
public  Rectangle2DtoRectangle()
     Construct a Rectangle2D object from the receiver.

Field Detail
SIZE_A4
final public static float[] SIZE_A4(Code)




Constructor Detail
CDSRectangle
public CDSRectangle()(Code)
CDTRectangle constructor comment.



CDSRectangle
protected CDSRectangle(COSArray newR)(Code)
CDTRectangle constructor. Create a new rectangle with given array.
Parameters:
  newR - A four dimensional COSArray defining llx,lly, urx, ury.



CDSRectangle
public CDSRectangle(float llx, float lly, float urx, float ury)(Code)
CDTRectangle constructor. Create a new rectangle with given size.
Parameters:
  llx - the lower left x
Parameters:
  lly - the lower left y
Parameters:
  urx - the upper right x
Parameters:
  ury - the upper right y



CDSRectangle
public CDSRectangle(float[] rectArray)(Code)
CDTRectangle constructor. Create a new rectangle with given array. The array must have 4 elements of type float.
Parameters:
  rectArray - A four dimensional array defining llx,lly, urx, ury.
See Also:   CDSRectangle.CDSRectangle(float llxfloat llyfloat urxfloat ury)



CDSRectangle
public CDSRectangle(Rectangle2D rect)(Code)




Method Detail
contains
public boolean contains(double x, double y)(Code)
true if x/y lies within this.
Parameters:
  x - x coordinate to be checked.
Parameters:
  y - y coordinate to be checked. true if x/y lies within this.



contains
public boolean contains(double x, double y, double epsilon)(Code)
true if x/y lies within this, with a "uncertainty" of epsilon.
Parameters:
  x - x coordinate to be checked.
Parameters:
  y - y coordinate to be checked.
Parameters:
  epsilon - The allowed range of uncertainty true if x/y lies within this.



copy
public CDSRectangle copy()(Code)
Create a copy of the receiver a new copy of the receiver



createFromCOS
public static CDSRectangle createFromCOS(COSArray array)(Code)
Create a CDSRectangle from an array holding the rectangle coordinates.
Parameters:
  array - The base COSArray Create a CDSRectangle from array



getHeight
public float getHeight()(Code)
Return the height (an absolute value) of the rectangle. Return the height (an absolute value) of the rectangle.



getLowerLeftX
public float getLowerLeftX()(Code)
The lower left x coordinate. The lower left x coordinate.



getLowerLeftY
public float getLowerLeftY()(Code)
The lower left y coordinate. The lower left y coordinate.



getUpperRightX
public float getUpperRightX()(Code)
The upper right x coordinate. The upper right x coordinate.



getUpperRightY
public float getUpperRightY()(Code)
The upper rigth y coordinate. The upper right y coordinate.



getWidth
public float getWidth()(Code)
Get the width (an absolute value) of the rectangle. Get the width (an absolute value) of the rectangle.



invalidateCaches
public void invalidateCaches()(Code)



move
public void move(float dx, float dy)(Code)
Move the rectangle by a relative offset. The relationship of the opposite corners is preserved by this method.
Parameters:
  dx - The offset by wich we move in x direction.
Parameters:
  dy - The offset by wich we move in y direction.



moveTo
public CDSRectangle moveTo(float x, float y)(Code)
Move the rectangle to a new absolute position. The relationship of the opposite corners is preserved by this method. The receiver is modified.
Parameters:
  x - The new x position of the lower left corner.
Parameters:
  y - The new y position of the lower left corner. this



normalize
public CDSRectangle normalize()(Code)
Adjust the corner coordinates so that lower left is really in the lower left (this means returns the smallest coordinate values).

This method changes this in place!

this



resize
public void resize(float dx, float dy)(Code)
Resize the rectangle by moving the upper right corner.
Parameters:
  dx - The distance we move the upper right x coordinate.
Parameters:
  dy - The distance we move the upper right y coordinate.



resizeTo
public void resizeTo(float width, float height)(Code)
Resize the rectangle to a new width and heigth. The new width and heigth are defined relative to the lower left corner as signed values.
Parameters:
  width - The new width of the rectangle.
Parameters:
  height - The new height of the rectangle.



setCorners
public void setCorners(float llx, float lly, float urx, float ury)(Code)
Set the corners of this.
Parameters:
  llx - The lower left x coordinate
Parameters:
  lly - The lower left y coordinate
Parameters:
  urx - The upper right x coordinate
Parameters:
  ury - The upper right y coordinate



setHeight
public void setHeight(float height)(Code)
Set the height of this.
Parameters:
  height - THe new height



setLowerLeftX
public void setLowerLeftX(float num)(Code)
Set the lower left x coordinate.
Parameters:
  num - The lower left x coordinate.



setLowerLeftY
public void setLowerLeftY(float num)(Code)
Set the lower left y coordinate.
Parameters:
  num - The lower left y coordinate.



setUpperRightX
public void setUpperRightX(float num)(Code)
Set the upper right x coordinate.
Parameters:
  num - The upper right x coordinate.



setUpperRightY
public void setUpperRightY(float num)(Code)
Set the upper right y coordinate.
Parameters:
  num - The upper right y coordinate.



setWidth
public void setWidth(float width)(Code)
Set the width of this.
Parameters:
  width - The new width.



toNormalizedRectangle
public Rectangle2D toNormalizedRectangle()(Code)
Construct a Rectangle2D object from the receiver. The rectangle will be normalized before construction. The Rectangle2D created from the receiver.



toRectangle
public Rectangle2D toRectangle()(Code)
Construct a Rectangle2D object from the receiver. The resulting rectangle is not normalized, that means it may return a negative width or height. The Rectangle2D created from the receiver.




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