Java Doc for Axis2D.java in  » GIS » GeoTools-2.4.1 » org » geotools » axis » 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 » GIS » GeoTools 2.4.1 » org.geotools.axis 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.awt.geom.Line2D
      org.geotools.axis.Axis2D

Axis2D
public class Axis2D extends Line2D implements Cloneable,Serializable(Code)
An axis as a graduated line. Axis2D objets are really Line2D objects with a Graduation . Because axis are Line2D , they can be located anywhere in a widget with any orientation. Lines are drawn from starting point ( , ) to end point ( , ), using a graduation from minimal value Graduation.getMinimum to maximal value Graduation.getMaximum . Note the line's coordinates (x1,y1) and (x2,y2) are completly independant of graduation minimal and maximal values. Line's coordinates should be expressed in some units convenient for rendering, as pixels or point (1/72 of inch). On the opposite, graduation can have any arbitrary units, which is given by Graduation.getUnit . The static method Axis2D.createAffineTransform can be used for mapping logical coordinates to pixels coordinates for an arbitrary pair of Axis2D objects, which doesn't need to be perpendicular.
since:
   2.0
version:
   $Id: Axis2D.java 22710 2006-11-12 18:04:54Z desruisseaux $
author:
   Martin Desruisseaux
See Also:   DefaultCoordinateSystemAxis
See Also:   AxisDirection
See Also:   Graduation

Inner Class :public class TickIterator implements org.geotools.axis.TickIterator


Constructor Summary
public  Axis2D()
     Constructs an axis with a default NumberGraduation .
public  Axis2D(Graduation graduation)
     Constructs an axis with the specified graduation.

Method Summary
public static  AffineTransformcreateAffineTransform(Axis2D xAxis, Axis2D yAxis)
     Creates an affine transform mapping logical to pixels coordinates for a pair of axis.
public synchronized  Rectangle2DgetBounds2D()
     Returns a bounding box for this axis.
public  GraduationgetGraduation()
     Returns the axis's graduation.
public synchronized  doublegetLength()
     Returns the axis length.
public synchronized  Point2DgetP1()
     Returns the (x,y) coordinates of the start point.
public synchronized  Point2DgetP2()
     Returns the (x,y) coordinates of the end point.
public  java.awt.geom.PathIteratorgetPathIterator(AffineTransform transform)
     Returns an iterator object that iterates along the Axis2D boundary and provides access to the geometry of the shape outline.
public synchronized  java.awt.geom.PathIteratorgetPathIterator(AffineTransform transform, double flatness)
     Returns an iterator object that iterates along the Axis2D boundary and provides access to the geometry of the shape outline.
public synchronized  ObjectgetRenderingHint(RenderingHints.Key key)
     Returns the value of a single preference for the rendering algorithms.
public  doublegetX1()
     Returns the x coordinate of the start point.
public  doublegetX2()
     Returns the x coordinate of the end point.
public  doublegetY1()
     Returns the y coordinate of the start point.
public  doublegetY2()
     Returns the y coordinate of the end point.
public  booleanisLabelClockwise()
     Returns true if the axis would have to rotate clockwise in order to overlaps its graduation.
public synchronized  voidpaint(Graphics2D graphics)
     Draw this axis in the specified graphics context.
public synchronized  voidsetLabelClockwise(boolean c)
     Sets the label's locations relative to this axis.
public synchronized  voidsetLine(double x1, double y1, double x2, double y2)
     Sets the location of the endpoints of this Axis2D to the specified coordinates.
public synchronized  voidsetRenderingHint(RenderingHints.Key key, Object value)
     Sets the value of a single preference for the rendering algorithms.
public synchronized  DefaultCoordinateSystemAxistoCoordinateSystemAxis()
     Returns this axis name and direction.
public  StringtoString()
     Returns a string representation of this axis.


Constructor Detail
Axis2D
public Axis2D()(Code)
Constructs an axis with a default NumberGraduation .



Axis2D
public Axis2D(Graduation graduation)(Code)
Constructs an axis with the specified graduation.




Method Detail
createAffineTransform
public static AffineTransform createAffineTransform(Axis2D xAxis, Axis2D yAxis)(Code)
Creates an affine transform mapping logical to pixels coordinates for a pair of axis. The affine transform will maps coordinates in the following way:
  • For each input coordinates (x,y), the x and y values are expressed in the same units than the xAxis and yAxis graduations, respectively.
  • The output point is the pixel's coordinates for the (x,y) values. Changing the x value move the pixel location in parallel with the xAxis , which may or may not be horizontal. Changing the y value move the pixel location in parallel with the yAxis , which may or may not be vertical.

Parameters:
  xAxis - The x axis. This axis doesn't have to be horizontal;it can have any orientation, including vertical.
Parameters:
  yAxis - The y axis. This axis doesn't have to be vertical;it can have any orientation, including horizontal. An affine transform mapping logical to pixels coordinates.



getBounds2D
public synchronized Rectangle2D getBounds2D()(Code)
Returns a bounding box for this axis. The bounding box includes the axis's line ( Axis2D.getP1 P1 ) to ( Axis2D.getP2 P2 ), the axis's ticks and all labels.
See Also:   Axis2D.getX1
See Also:   Axis2D.getY1
See Also:   Axis2D.getX2
See Also:   Axis2D.getY2



getGraduation
public Graduation getGraduation()(Code)
Returns the axis's graduation.



getLength
public synchronized double getLength()(Code)
Returns the axis length. This is the distance between starting point (@link #getP1 P1}) and end point ( Axis2D.getP2 P2 ). This length is usually measured in pixels or points (1/72 of inch).



getP1
public synchronized Point2D getP1()(Code)
Returns the (x,y) coordinates of the start point. By convention, those coordinates should be in pixels or points (1/72 of inch) for proper positionning of ticks and labels.



getP2
public synchronized Point2D getP2()(Code)
Returns the (x,y) coordinates of the end point. By convention, those coordinates should be in pixels or points (1/72 of inch) for proper positionning of ticks and labels.



getPathIterator
public java.awt.geom.PathIterator getPathIterator(AffineTransform transform)(Code)
Returns an iterator object that iterates along the Axis2D boundary and provides access to the geometry of the shape outline. The shape includes the axis line, graduation and labels. If an optional AffineTransform is specified, the coordinates returned in the iteration are transformed accordingly.



getPathIterator
public synchronized java.awt.geom.PathIterator getPathIterator(AffineTransform transform, double flatness)(Code)
Returns an iterator object that iterates along the Axis2D boundary and provides access to the geometry of the shape outline. The shape includes the axis line, graduation and labels. If an optional AffineTransform is specified, the coordinates returned in the iteration are transformed accordingly.



getRenderingHint
public synchronized Object getRenderingHint(RenderingHints.Key key)(Code)
Returns the value of a single preference for the rendering algorithms. Hint categories include controls for label fonts and colors. Some of the keys and their associated values are defined in the Graduation interface.
Parameters:
  key - The key corresponding to the hint to get. An object representing the value for the specified hint key, or null if no value is associated to the specified key.
See Also:   Graduation.TICK_LABEL_FONT
See Also:   Graduation.AXIS_TITLE_FONT



getX1
public double getX1()(Code)
Returns the x coordinate of the start point. By convention, this coordinate should be in pixels or points (1/72 of inch) for proper positionning of ticks and labels.
See Also:   Axis2D.getY1
See Also:   Axis2D.getX2
See Also:   Axis2D.setLine



getX2
public double getX2()(Code)
Returns the x coordinate of the end point. By convention, this coordinate should be in pixels or points (1/72 of inch) for proper positionning of ticks and labels.
See Also:   Axis2D.getY2
See Also:   Axis2D.getX1
See Also:   Axis2D.setLine



getY1
public double getY1()(Code)
Returns the y coordinate of the start point. By convention, this coordinate should be in pixels or points (1/72 of inch) for proper positionning of ticks and labels.
See Also:   Axis2D.getX1
See Also:   Axis2D.getY2
See Also:   Axis2D.setLine



getY2
public double getY2()(Code)
Returns the y coordinate of the end point. By convention, this coordinate should be in pixels or points (1/72 of inch) for proper positionning of ticks and labels.
See Also:   Axis2D.getX2
See Also:   Axis2D.getY1
See Also:   Axis2D.setLine



isLabelClockwise
public boolean isLabelClockwise()(Code)
Returns true if the axis would have to rotate clockwise in order to overlaps its graduation.



paint
public synchronized void paint(Graphics2D graphics)(Code)
Draw this axis in the specified graphics context. This method is equivalents to Graphics2D.draw(this) . However, this method may be slightly faster and produce better quality output.
Parameters:
  graphics - The graphics context to use for drawing.



setLabelClockwise
public synchronized void setLabelClockwise(boolean c)(Code)
Sets the label's locations relative to this axis. Value true means that the axis would have to rotate clockwise in order to overlaps its graduation. Value false means that the axis would have to rotate counter-clockwise in order to overlaps its graduation.



setLine
public synchronized void setLine(double x1, double y1, double x2, double y2) throws IllegalArgumentException(Code)
Sets the location of the endpoints of this Axis2D to the specified coordinates. Coordinates should be in pixels (for screen rendering) or points (for paper rendering). Using points units make it easy to render labels with a raisonable font size, no matter the screen resolution or the axis graduation.
Parameters:
  x1 - Coordinate x of starting point.
Parameters:
  y1 - Coordinate y of starting point
Parameters:
  x2 - Coordinate x of end point.
Parameters:
  y2 - Coordinate y of end point.
throws:
  IllegalArgumentException - If a coordinate is NaN or infinite.
See Also:   Axis2D.getX1
See Also:   Axis2D.getY1
See Also:   Axis2D.getX2
See Also:   Axis2D.getY2



setRenderingHint
public synchronized void setRenderingHint(RenderingHints.Key key, Object value)(Code)
Sets the value of a single preference for the rendering algorithms. Hint categories include controls for label fonts and colors. Some of the keys and their associated values are defined in the Graduation interface.
Parameters:
  key - The key of the hint to be set.
Parameters:
  value - The value indicating preferences for the specified hint category.A null value removes any hint for the specified key.
See Also:   Graduation.TICK_LABEL_FONT
See Also:   Graduation.AXIS_TITLE_FONT



toCoordinateSystemAxis
public synchronized DefaultCoordinateSystemAxis toCoordinateSystemAxis()(Code)
Returns this axis name and direction. Information include a name (usually the ) and an direction. The direction is usually or for vertical axis, or for horizontal axis, or otherwise.



toString
public String toString()(Code)
Returns a string representation of this axis.



Methods inherited from java.awt.geom.Line2D
public Object clone()(Code)(Java Doc)
public boolean contains(double x, double y)(Code)(Java Doc)
public boolean contains(Point2D p)(Code)(Java Doc)
public boolean contains(double x, double y, double w, double h)(Code)(Java Doc)
public boolean contains(Rectangle2D r)(Code)(Java Doc)
public Rectangle getBounds()(Code)(Java Doc)
abstract public Point2D getP1()(Code)(Java Doc)
abstract public Point2D getP2()(Code)(Java Doc)
public PathIterator getPathIterator(AffineTransform at)(Code)(Java Doc)
public PathIterator getPathIterator(AffineTransform at, double flatness)(Code)(Java Doc)
abstract public double getX1()(Code)(Java Doc)
abstract public double getX2()(Code)(Java Doc)
abstract public double getY1()(Code)(Java Doc)
abstract public double getY2()(Code)(Java Doc)
public boolean intersects(double x, double y, double w, double h)(Code)(Java Doc)
public boolean intersects(Rectangle2D r)(Code)(Java Doc)
public boolean intersectsLine(double x1, double y1, double x2, double y2)(Code)(Java Doc)
public boolean intersectsLine(Line2D l)(Code)(Java Doc)
public static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)(Code)(Java Doc)
public static double ptLineDist(double x1, double y1, double x2, double y2, double px, double py)(Code)(Java Doc)
public double ptLineDist(double px, double py)(Code)(Java Doc)
public double ptLineDist(Point2D pt)(Code)(Java Doc)
public static double ptLineDistSq(double x1, double y1, double x2, double y2, double px, double py)(Code)(Java Doc)
public double ptLineDistSq(double px, double py)(Code)(Java Doc)
public double ptLineDistSq(Point2D pt)(Code)(Java Doc)
public static double ptSegDist(double x1, double y1, double x2, double y2, double px, double py)(Code)(Java Doc)
public double ptSegDist(double px, double py)(Code)(Java Doc)
public double ptSegDist(Point2D pt)(Code)(Java Doc)
public static double ptSegDistSq(double x1, double y1, double x2, double y2, double px, double py)(Code)(Java Doc)
public double ptSegDistSq(double px, double py)(Code)(Java Doc)
public double ptSegDistSq(Point2D pt)(Code)(Java Doc)
public static int relativeCCW(double x1, double y1, double x2, double y2, double px, double py)(Code)(Java Doc)
public int relativeCCW(double px, double py)(Code)(Java Doc)
public int relativeCCW(Point2D p)(Code)(Java Doc)
abstract public void setLine(double x1, double y1, double x2, double y2)(Code)(Java Doc)
public void setLine(Point2D p1, Point2D p2)(Code)(Java Doc)
public void setLine(Line2D l)(Code)(Java Doc)

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.