Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.jrefinery.chart
Class XYPlot  view XYPlot download XYPlot.java

java.lang.Object
  extended byPlot
      extended bycom.jrefinery.chart.XYPlot

public class XYPlot
extends Plot

A Plot that displays data in the form of an XY plot, using data from any class that implements the XYDataSource interface.


Nested Class Summary
private static class XYPlot.LineRange
           
 
Constructor Summary
XYPlot(JFreeChart chart, Axis horizontal, Axis vertical)
          Standard constructor: returns an XYPlot with the specified axes (other attributes take default values).
 
Method Summary
 void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea)
          Draws the plot on a Java 2D graphics device (such as the screen or a printer).
 XYDataSource getDataSource()
          A convenience method that returns the data-source for the plot, cast as an XYDataSource.
 ValueAxis getHorizontalValueAxis()
          A convenience method that returns a reference to the horizontal axis cast as a ValueAxis.
private  java.util.List getLines(java.awt.geom.Rectangle2D plotArea)
          Returns a list of lines that will fit inside the specified area.
 java.lang.Number getMaximumHorizontalDataValue()
          Returns the maximum value in the domain, since this is plotted against the horizontal axis for an XYPlot.
 java.lang.Number getMaximumVerticalDataValue()
          Returns the maximum value in the range, since this is plotted against the vertical axis for an XYPlot.
 java.lang.Number getMinimumHorizontalDataValue()
          Returns the minimum value in the domain, since this is plotted against the horizontal axis for an XYPlot.
 java.lang.Number getMinimumVerticalDataValue()
          Returns the minimum value in the range, since this is plotted against the vertical axis for an XYPlot.
 java.lang.String getPlotType()
          Returns the plot type as a string.
 ValueAxis getVerticalValueAxis()
          A convenience method that returns a reference to the vertical axis cast as a ValueAxis.
 boolean isCompatibleHorizontalAxis(Axis axis)
          Checks the compatibility of a horizontal axis, returning true if the axis is compatible with the plot, and false otherwise.
 boolean isCompatibleVerticalAxis(Axis axis)
          Checks the compatibility of a vertical axis, returning true if the axis is compatible with the plot, and false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XYPlot

public XYPlot(JFreeChart chart,
              Axis horizontal,
              Axis vertical)
       throws AxisNotCompatibleException
Standard constructor: returns an XYPlot with the specified axes (other attributes take default values).

Method Detail

getDataSource

public XYDataSource getDataSource()
A convenience method that returns the data-source for the plot, cast as an XYDataSource.


getHorizontalValueAxis

public ValueAxis getHorizontalValueAxis()
A convenience method that returns a reference to the horizontal axis cast as a ValueAxis.


getVerticalValueAxis

public ValueAxis getVerticalValueAxis()
A convenience method that returns a reference to the vertical axis cast as a ValueAxis.


getLines

private java.util.List getLines(java.awt.geom.Rectangle2D plotArea)
Returns a list of lines that will fit inside the specified area.


isCompatibleHorizontalAxis

public boolean isCompatibleHorizontalAxis(Axis axis)
Checks the compatibility of a horizontal axis, returning true if the axis is compatible with the plot, and false otherwise.


isCompatibleVerticalAxis

public boolean isCompatibleVerticalAxis(Axis axis)
Checks the compatibility of a vertical axis, returning true if the axis is compatible with the plot, and false otherwise.


draw

public void draw(java.awt.Graphics2D g2,
                 java.awt.geom.Rectangle2D drawArea)
Draws the plot on a Java 2D graphics device (such as the screen or a printer).


getPlotType

public java.lang.String getPlotType()
Returns the plot type as a string.


getMinimumHorizontalDataValue

public java.lang.Number getMinimumHorizontalDataValue()
Returns the minimum value in the domain, since this is plotted against the horizontal axis for an XYPlot.


getMaximumHorizontalDataValue

public java.lang.Number getMaximumHorizontalDataValue()
Returns the maximum value in the domain, since this is plotted against the horizontal axis for an XYPlot.


getMinimumVerticalDataValue

public java.lang.Number getMinimumVerticalDataValue()
Returns the minimum value in the range, since this is plotted against the vertical axis for an XYPlot.


getMaximumVerticalDataValue

public java.lang.Number getMaximumVerticalDataValue()
Returns the maximum value in the range, since this is plotted against the vertical axis for an XYPlot.