Java Doc for CrosshairState.java in  » Chart » jfreechart » org » jfree » chart » plot » 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 » Chart » jfreechart » org.jfree.chart.plot 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jfree.chart.plot.CrosshairState

CrosshairState
public class CrosshairState (Code)
Maintains state information about crosshairs on a plot between successive calls to the renderer's draw method. This class is used internally by JFreeChart - it is not intended for external use.



Constructor Summary
public  CrosshairState()
     Creates a new CrosshairState instance that calculates distance in Java2D space.
public  CrosshairState(boolean calculateDistanceInDataSpace)
     Creates a new CrosshairState instance.

Method Summary
public  Point2DgetAnchor()
     Returns the anchor point.
public  doublegetAnchorX()
     Returns the x-coordinate (in data space) for the anchor point.
public  doublegetAnchorY()
     Returns the y-coordinate (in data space) for the anchor point.
public  doublegetCrosshairDistance()
     Returns the distance between the anchor point and the current crosshair point.
public  doublegetCrosshairX()
     Get the x-value for the crosshair point.
public  doublegetCrosshairY()
     Get the y-value for the crosshair point.
public  intgetDomainAxisIndex()
     Returns the domain axis index for the crosshair x-value.
public  intgetRangeAxisIndex()
     Returns the range axis index for the crosshair y-value.
public  voidsetAnchor(Point2D anchor)
     Sets the anchor point.
public  voidsetAnchorX(double x)
     Sets the x-coordinate (in data space) for the anchor point.
public  voidsetAnchorY(double y)
     Sets the y-coordinate (in data space) for the anchor point.
public  voidsetCrosshairDistance(double distance)
     Sets the distance between the anchor point and the current crosshair point.
public  voidsetCrosshairX(double x)
     Sets the x coordinate for the crosshair.
public  voidsetCrosshairY(double y)
     Sets the y coordinate for the crosshair.
public  voidupdateCrosshairPoint(double x, double y, double transX, double transY, PlotOrientation orientation)
     Evaluates a data point and if it is the closest to the anchor point it becomes the new crosshair point.

To understand this method, you need to know the context in which it will be called.

public  voidupdateCrosshairPoint(double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation)
     Evaluates a data point and if it is the closest to the anchor point it becomes the new crosshair point.

To understand this method, you need to know the context in which it will be called.

public  voidupdateCrosshairX(double candidateX)
     Evaluates an x-value and if it is the closest to the anchor x-value it becomes the new crosshair value.
public  voidupdateCrosshairX(double candidateX, int domainAxisIndex)
     Evaluates an x-value and if it is the closest to the anchor x-value it becomes the new crosshair value.
public  voidupdateCrosshairY(double candidateY)
     Evaluates a y-value and if it is the closest to the anchor y-value it becomes the new crosshair value.
public  voidupdateCrosshairY(double candidateY, int rangeAxisIndex)
     Evaluates a y-value and if it is the closest to the anchor y-value it becomes the new crosshair value.


Constructor Detail
CrosshairState
public CrosshairState()(Code)
Creates a new CrosshairState instance that calculates distance in Java2D space.



CrosshairState
public CrosshairState(boolean calculateDistanceInDataSpace)(Code)
Creates a new CrosshairState instance.
Parameters:
  calculateDistanceInDataSpace - a flag that controls whether the distance is calculated in data space or Java2D space.




Method Detail
getAnchor
public Point2D getAnchor()(Code)
Returns the anchor point. The anchor point.
See Also:   CrosshairState.setAnchor(Point2D)
since:
   1.0.3



getAnchorX
public double getAnchorX()(Code)
Returns the x-coordinate (in data space) for the anchor point. The x-coordinate of the anchor point.
since:
   1.0.3



getAnchorY
public double getAnchorY()(Code)
Returns the y-coordinate (in data space) for the anchor point. The y-coordinate of teh anchor point.
since:
   1.0.3



getCrosshairDistance
public double getCrosshairDistance()(Code)
Returns the distance between the anchor point and the current crosshair point. The distance.
See Also:   CrosshairState.setCrosshairDistance(double)
since:
   1.0.3



getCrosshairX
public double getCrosshairX()(Code)
Get the x-value for the crosshair point. The x position of the crosshair point.
See Also:   CrosshairState.setCrosshairX(double)



getCrosshairY
public double getCrosshairY()(Code)
Get the y-value for the crosshair point. This is the coordinate in data space measured against the range axis. The y position of the crosshair point.
See Also:   CrosshairState.setCrosshairY(double)



getDomainAxisIndex
public int getDomainAxisIndex()(Code)
Returns the domain axis index for the crosshair x-value. The domain axis index.
since:
   1.0.4



getRangeAxisIndex
public int getRangeAxisIndex()(Code)
Returns the range axis index for the crosshair y-value. The range axis index.
since:
   1.0.4



setAnchor
public void setAnchor(Point2D anchor)(Code)
Sets the anchor point. This is usually the mouse click point in a chart panel, and the crosshair point will often be the data item that is closest to the anchor point.

Note that the x and y coordinates (in data space) are not updated by this method - the caller is responsible for ensuring that this happens in sync.
Parameters:
  anchor - the anchor point (null permitted).
See Also:   CrosshairState.getAnchor()



setAnchorX
public void setAnchorX(double x)(Code)
Sets the x-coordinate (in data space) for the anchor point. Note that this does NOT update the anchor itself - the caller is responsible for ensuring this is done in sync.
Parameters:
  x - the x-coordinate.
since:
   1.0.3



setAnchorY
public void setAnchorY(double y)(Code)
Sets the y-coordinate (in data space) for the anchor point. Note that this does NOT update the anchor itself - the caller is responsible for ensuring this is done in sync.
Parameters:
  y - the y-coordinate.
since:
   1.0.3



setCrosshairDistance
public void setCrosshairDistance(double distance)(Code)
Sets the distance between the anchor point and the current crosshair point. As each data point is processed, its distance to the anchor point is compared with this value and, if it is closer, the data point becomes the new crosshair point.
Parameters:
  distance - the distance.
See Also:   CrosshairState.getCrosshairDistance()



setCrosshairX
public void setCrosshairX(double x)(Code)
Sets the x coordinate for the crosshair. This is the coordinate in data space measured against the domain axis.
Parameters:
  x - the coordinate.
See Also:   CrosshairState.getCrosshairX()
See Also:   CrosshairState.setCrosshairY(double)
See Also:   CrosshairState.updateCrosshairPoint(double,double,double,double,PlotOrientation)



setCrosshairY
public void setCrosshairY(double y)(Code)
Sets the y coordinate for the crosshair.
Parameters:
  y - the y coordinate.
See Also:   CrosshairState.getCrosshairY()
See Also:   CrosshairState.setCrosshairX(double)
See Also:   CrosshairState.updateCrosshairPoint(double,double,double,double,PlotOrientation)



updateCrosshairPoint
public void updateCrosshairPoint(double x, double y, double transX, double transY, PlotOrientation orientation)(Code)
Evaluates a data point and if it is the closest to the anchor point it becomes the new crosshair point.

To understand this method, you need to know the context in which it will be called. An instance of this class is passed to an org.jfree.chart.renderer.xy.XYItemRenderer as each data point is plotted. As the point is plotted, it is passed to this method to see if it should be the new crosshair point.
Parameters:
  x - x coordinate (measured against the domain axis).
Parameters:
  y - y coordinate (measured against the range axis).
Parameters:
  transX - x translated into Java2D space.
Parameters:
  transY - y translated into Java2D space.
Parameters:
  orientation - the plot orientation.CrosshairState.updateCrosshairPoint(double,double,int,int,double,double,PlotOrientation)




updateCrosshairPoint
public void updateCrosshairPoint(double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation)(Code)
Evaluates a data point and if it is the closest to the anchor point it becomes the new crosshair point.

To understand this method, you need to know the context in which it will be called. An instance of this class is passed to an org.jfree.chart.renderer.xy.XYItemRenderer as each data point is plotted. As the point is plotted, it is passed to this method to see if it should be the new crosshair point.
Parameters:
  x - x coordinate (measured against the domain axis).
Parameters:
  y - y coordinate (measured against the range axis).
Parameters:
  domainAxisIndex - the index of the domain axis for this point.
Parameters:
  rangeAxisIndex - the index of the range axis for this point.
Parameters:
  transX - x translated into Java2D space.
Parameters:
  transY - y translated into Java2D space.
Parameters:
  orientation - the plot orientation.
since:
   1.0.4




updateCrosshairX
public void updateCrosshairX(double candidateX)(Code)
Evaluates an x-value and if it is the closest to the anchor x-value it becomes the new crosshair value.

Used in cases where only the x-axis is numerical.
Parameters:
  candidateX - x position of the candidate for the new crosshair point.CrosshairState.updateCrosshairX(double,int)




updateCrosshairX
public void updateCrosshairX(double candidateX, int domainAxisIndex)(Code)
Evaluates an x-value and if it is the closest to the anchor x-value it becomes the new crosshair value.

Used in cases where only the x-axis is numerical.
Parameters:
  candidateX - x position of the candidate for the new crosshair point.
Parameters:
  domainAxisIndex - the index of the domain axis for this x-value.
since:
   1.0.4




updateCrosshairY
public void updateCrosshairY(double candidateY)(Code)
Evaluates a y-value and if it is the closest to the anchor y-value it becomes the new crosshair value.

Used in cases where only the y-axis is numerical.
Parameters:
  candidateY - y position of the candidate for the new crosshair point.CrosshairState.updateCrosshairY(double,int)




updateCrosshairY
public void updateCrosshairY(double candidateY, int rangeAxisIndex)(Code)
Evaluates a y-value and if it is the closest to the anchor y-value it becomes the new crosshair value.

Used in cases where only the y-axis is numerical.
Parameters:
  candidateY - y position of the candidate for the new crosshair point.
Parameters:
  rangeAxisIndex - the index of the range axis for this y-value.
since:
   1.0.4




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.