Java Doc for ShapeTransform.java in  » Report » pentaho-report » org » jfree » report » util » 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 » Report » pentaho report » org.jfree.report.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jfree.report.util.ShapeTransform

ShapeTransform
final public strictfp class ShapeTransform (Code)
Utility class, which resizes or translates a Shape. The class contains special handlers for Rectangles and Lines.
author:
   Thomas Morgner


Field Summary
final public static  intABOVE
     Flag for point lying "above" clipping area.
final public static  intBELOW
     Flag for point lying "below" clipping area.
final public static  intH_CENTER
     Flag for point lying between horizontal bounds of area.
final public static  intINSIDE
     Mask for points which are inside.
final public static  intLEFT
     Flag for point lying left of clipping area.
final public static  intOUTSIDE
     Mask for points which are outside.
final public static  intRIGHT
     Flag for point lying right of clipping area.
final public static  intV_CENTER
     Flag for point lying between vertical bounds of clipping area.


Method Summary
public static  Point2D[]getClipped(double x1, double y1, double x2, double y2, double xmin, double xmax, double ymin, double ymax)
     Calculate the clipping points of a line with a rectangle.
public static  ShapeperformCliping(Shape s, Rectangle2D bounds)
     Clips the given shape to the given bounds.
public static  ShaperesizeRect(RectangularShape rectangularShape, double width, double height)
     Resizes a rectangle.
public static  ShaperesizeShape(Shape s, float width, float height)
     Resizes a shape, so that the shape has the given width and height, but the origin of the shape does not change.
public static  ShapetransformShape(Shape s, boolean scale, boolean keepAR, double width, double height)
     Translates the given shape.
public static  ShapetransformShape(Shape s, boolean scale, boolean keepAR, Dimension2D dim)
     Translates the given shape.
public static  ShapetranslateShape(Shape s, double x, double y)
     Translates a given shape.

Field Detail
ABOVE
final public static int ABOVE(Code)
Flag for point lying "above" clipping area.



BELOW
final public static int BELOW(Code)
Flag for point lying "below" clipping area.



H_CENTER
final public static int H_CENTER(Code)
Flag for point lying between horizontal bounds of area.



INSIDE
final public static int INSIDE(Code)
Mask for points which are inside.



LEFT
final public static int LEFT(Code)
Flag for point lying left of clipping area.



OUTSIDE
final public static int OUTSIDE(Code)
Mask for points which are outside.



RIGHT
final public static int RIGHT(Code)
Flag for point lying right of clipping area.



V_CENTER
final public static int V_CENTER(Code)
Flag for point lying between vertical bounds of clipping area.





Method Detail
getClipped
public static Point2D[] getClipped(double x1, double y1, double x2, double y2, double xmin, double xmax, double ymin, double ymax)(Code)
Calculate the clipping points of a line with a rectangle.
Parameters:
  x1 - starting x of line
Parameters:
  y1 - starting y of line
Parameters:
  x2 - ending x of line
Parameters:
  y2 - ending y of line
Parameters:
  xmin - lower left x of rectangle
Parameters:
  xmax - upper right x of rectangle
Parameters:
  ymin - lower left y of rectangle
Parameters:
  ymax - upper right y of rectangle null (does not clip) or array of two points



performCliping
public static Shape performCliping(Shape s, Rectangle2D bounds)(Code)
Clips the given shape to the given bounds. If the shape is a Line2D, manual clipping is performed, as the built in Area does not handle lines.
Parameters:
  s - the shape to be clipped
Parameters:
  bounds - the bounds to which the shape should be clipped the clipped shape.



resizeRect
public static Shape resizeRect(RectangularShape rectangularShape, double width, double height)(Code)
Resizes a rectangle. This works for real rectangles and produces funny results for RoundRects etc ..
Parameters:
  rectangularShape - the rectangle
Parameters:
  width - the new width of the rectangle
Parameters:
  height - the new height of the rectangle. the resized rectangle.



resizeShape
public static Shape resizeShape(Shape s, float width, float height)(Code)
Resizes a shape, so that the shape has the given width and height, but the origin of the shape does not change.

Unlike the AffineTransform, this method tries to preserve the Shape's Type.
Parameters:
  s - the shape
Parameters:
  width - the new width
Parameters:
  height - the new height the resized shape.




transformShape
public static Shape transformShape(Shape s, boolean scale, boolean keepAR, double width, double height)(Code)
Translates the given shape. The shape is translated to the origin supplied in point. If scaling is requested, the shape will also be scaled using an AffineTransform.
Parameters:
  s - the shape that should be transformed
Parameters:
  scale - true, if the shape should be scaled, false otherwise
Parameters:
  keepAR - true, if the scaled shape should keep the aspect ratio
Parameters:
  width - the target width.
Parameters:
  height - the target height. the transformed shape



transformShape
public static Shape transformShape(Shape s, boolean scale, boolean keepAR, Dimension2D dim)(Code)
Translates the given shape. The shape is translated to the origin supplied in point. If scaling is requested, the shape will also be scaled using an AffineTransform.
Parameters:
  s - the shape that should be transformed
Parameters:
  scale - true, if the shape should be scaled, false otherwise
Parameters:
  keepAR - true, if the scaled shape should keep the aspect ratio
Parameters:
  dim - the target dimension. the transformed shape



translateShape
public static Shape translateShape(Shape s, double x, double y)(Code)
Translates a given shape. Special care is taken to preserve the shape's original class, if the shape is a rectangle or a line.
Parameters:
  s - the shape
Parameters:
  x - the x coordinate where the shape is translated to
Parameters:
  y - the y coordinate where the shape is translated to the translated shape



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.