Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jfree.data
Class DefaultContourDataset

    java.lang.Object
      org.jfree.data.AbstractDataset
          org.jfree.data.AbstractSeriesDataset
              org.jfree.data.AbstractXYDataset
                  org.jfree.data.AbstractXYZDataset
                      org.jfree.data.DefaultContourDataset

All Implemented Interfaces:
  java.lang.Cloneable, ContourDataset, Dataset, java.util.EventListener, java.io.ObjectInputValidation, java.io.Serializable, SeriesChangeListener, SeriesDataset, XYDataset, XYZDataset

Direct Known Subclasses:
  NonGridContourDataset

public class DefaultContourDataset
extends AbstractXYZDataset
implements ContourDataset

A convenience class that provides a default implementation of the `ContourDataset` interface.

Author:
  David M. O'Donnell
See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `seriesName` The series name (this dataset supports only one series).
`protected int[]` | `xIndex` The index for the start of each column in the data.
`protected java.lang.Number[]` | `xValues` Storage for the x values.
`protected java.lang.Number[]` | `yValues` Storage for the y values.
`protected java.lang.Number[]` | `zValues` Storage for the z values.

Constructor Summary
`DefaultContourDataset()` Creates a new dataset, initially empty.
`DefaultContourDataset(java.lang.String seriesName, java.lang.Object[] xData, java.lang.Object[] yData, java.lang.Object[] zData)` Constructs a new dataset with the given data.

Method Summary
`static java.lang.Object[]` | `formObjectArray(double[] data)` Creates an object array from an array of doubles.
`static java.lang.Object[][]` | `formObjectArray(double[][] data)` Creates an object array from an array of doubles.
`int` | `getItemCount(int series)` Returns the number of items in the specified series.
`double` | `getMaxZValue()` Returns the maximum z-value.
`double` | `getMinZValue()` Returns the minimum z-value.
`double` | `getMinZValue(double minX, double minY, double maxX, double maxY)` Returns the minimum z-value.
`int` | `getSeriesCount()` Returns the number of series.
`java.lang.String` | `getSeriesName(int series)` Returns the name of the specified series.
`int[]` | `getXIndices()` Returns the index of the xvalues.
`java.lang.Number` | `getXValue(int item)` Returns an x value.
`java.lang.Number` | `getXValue(int series, int item)` Returns the x value for the specified series and index (zero-based indices).
`java.lang.Number[]` | `getXValues()` Returns the x values.
`java.lang.Number` | `getYValue(int series, int item)` Returns the y value for the specified series and index (zero-based indices).
`java.lang.Number[]` | `getYValues()` Returns a Number array containing all y values.
`java.lang.Number` | `getZValue(int series, int item)` Returns the z value for the specified series and index (zero-based indices).
`Range` | `getZValueRange(Range x, Range y)` Returns the maximum z-value within visible region of plot.
`java.lang.Number[]` | `getZValues()` Returns a Number array containing all z values.
`int[]` | `indexX()` Returns an int array contain the index into the x values.
`int` | `indexX(int k)` Given index k, returns the column index containing k.
`int` | `indexY(int k)` Given index k, return the row index containing k.
`int` | `indexZ(int i, int j)` Given column and row indices, returns the k index.
`void` | `initialize(java.lang.Object[] xData, java.lang.Object[] yData, java.lang.Object[] zData)` Initialises the dataset.
`boolean` | `isDateAxis(int axisNumber)` Returns true if axis are dates.
`void` | `setSeriesNames(java.lang.String[] seriesNames)` Sets the names of the series in the data source.

Methods inherited from class org.jfree.data.AbstractXYZDataset
`getZ`

Methods inherited from class org.jfree.data.AbstractXYDataset
`getX, getY`

Methods inherited from class org.jfree.data.AbstractSeriesDataset
`seriesChanged`

Methods inherited from class org.jfree.data.AbstractDataset
`addChangeListener, clone, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup, validateObject`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.jfree.data.XYZDataset
`getZ`

Methods inherited from interface org.jfree.data.XYDataset
`getX, getY`

Methods inherited from interface org.jfree.data.Dataset
`addChangeListener, getGroup, removeChangeListener, setGroup`

Field Detail

### seriesName

    protected java.lang.String seriesName

  The series name (this dataset supports only one series).

### xValues

    protected java.lang.Number[] xValues

  Storage for the x values.

### yValues

    protected java.lang.Number[] yValues

  Storage for the y values.

### zValues

    protected java.lang.Number[] zValues

  Storage for the z values.

### xIndex

    protected int[] xIndex

  The index for the start of each column in the data.

Constructor Detail

### DefaultContourDataset

    public DefaultContourDataset()

  Creates a new dataset, initially empty.

### DefaultContourDataset

    public DefaultContourDataset(java.lang.String seriesName,
                                 java.lang.Object[] xData,
                                 java.lang.Object[] yData,
                                 java.lang.Object[] zData)

  Constructs a new dataset with the given data.

Parameters:
  `seriesName` - the series name.
  `xData` - the x values.
  `yData` - the y values.
  `zData` - the z values.

Method Detail

### initialize

    public void initialize(java.lang.Object[] xData,
                           java.lang.Object[] yData,
                           java.lang.Object[] zData)

  Initialises the dataset.

  Parameters:
    `xData` - the x values.
    `yData` - the y values.
    `zData` - the z values.

### formObjectArray

    public static java.lang.Object[][] formObjectArray(double[][] data)

  Creates an object array from an array of doubles.

  Parameters:
    `data` - the data.
  Returns:
    An array of `Double` objects.

### formObjectArray

    public static java.lang.Object[] formObjectArray(double[] data)

  Creates an object array from an array of doubles.

  Parameters:
    `data` - the data.
  Returns:
    An array of `Double` objects.

### getItemCount

    public int getItemCount(int series)

  Returns the number of items in the specified series.

  Method provided to satisfy the `XYDataset` interface implementation.

  Specified by:
    `getItemCount` in interface `XYDataset`
  Parameters:
    `series` - must be zero, as this dataset only supports one series.
  Returns:
    the item count.

### getMaxZValue

    public double getMaxZValue()

  Returns the maximum z-value.

  Specified by:
    `getMaxZValue` in interface `ContourDataset`
  Returns:
    The maximum z-value.

### getMinZValue

    public double getMinZValue()

  Returns the minimum z-value.

  Specified by:
    `getMinZValue` in interface `ContourDataset`
  Returns:
    The minimum z-value.

### getZValueRange

    public Range getZValueRange(Range x,
                                Range y)

  Returns the maximum z-value within visible region of plot.

  Specified by:
    `getZValueRange` in interface `ContourDataset`
  Parameters:
    `x` - the x range.
    `y` - the y range.
  Returns:
    The z range.

### getMinZValue

    public double getMinZValue(double minX,
                               double minY,
                               double maxX,
                               double maxY)

  Returns the minimum z-value.

  Parameters:
    `minX` - the minimum x value.
    `minY` - the minimum y value.
    `maxX` - the maximum x value.
    `maxY` - the maximum y value.
  Returns:
    the minimum z-value.

### getSeriesCount

    public int getSeriesCount()

  Returns the number of series.

  Required by XYDataset interface (this will always return 1)

  Specified by:
    `getSeriesCount` in interface `SeriesDataset`
  Specified by:
    `getSeriesCount` in class `AbstractSeriesDataset`
  Returns:
    1.

### getSeriesName

    public java.lang.String getSeriesName(int series)

  Returns the name of the specified series. Method provided to satisfy the XYDataset interface implementation

  Specified by:
    `getSeriesName` in interface `SeriesDataset`
  Specified by:
    `getSeriesName` in class `AbstractSeriesDataset`
  Parameters:
    `series` - must be zero.
  Returns:
    the series name.

### getXIndices

    public int[] getXIndices()

  Returns the index of the xvalues.

  Specified by:
    `getXIndices` in interface `ContourDataset`
  Returns:
    The x values.

### getXValues

    public java.lang.Number[] getXValues()

  Returns the x values.

  Specified by:
    `getXValues` in interface `ContourDataset`
  Returns:
    The x values.

### getXValue

    public java.lang.Number getXValue(int series,
                                      int item)

  Returns the x value for the specified series and index (zero-based indices). Required by the XYDataset

  Specified by:
    `getXValue` in interface `XYDataset`
  Parameters:
    `series` - must be zero;
    `item` - the item index (zero-based).
  Returns:
    The x value.

### getXValue

    public java.lang.Number getXValue(int item)

  Returns an x value.

  Parameters:
    `item` - the item index (zero-based).
  Returns:
    The X value.

### getYValues

    public java.lang.Number[] getYValues()

  Returns a Number array containing all y values.

  Specified by:
    `getYValues` in interface `ContourDataset`
  Returns:
    The Y values.

### getYValue

    public java.lang.Number getYValue(int series,
                                      int item)

  Returns the y value for the specified series and index (zero-based indices). Required by the XYDataset

  Specified by:
    `getYValue` in interface `XYDataset`
  Parameters:
    `series` - the series index (must be zero for this dataset).
    `item` - the item index (zero-based).
  Returns:
    The Y value.

### getZValues

    public java.lang.Number[] getZValues()

  Returns a Number array containing all z values.

  Specified by:
    `getZValues` in interface `ContourDataset`
  Returns:
    The Z values.

### getZValue

    public java.lang.Number getZValue(int series,
                                      int item)

  Returns the z value for the specified series and index (zero-based indices). Required by the XYDataset

  Specified by:
    `getZValue` in interface `XYZDataset`
  Parameters:
    `series` - the series index (must be zero for this dataset).
    `item` - the item index (zero-based).
  Returns:
    The Z value.

### indexX

    public int[] indexX()

  Returns an int array contain the index into the x values.

  Specified by:
    `indexX` in interface `ContourDataset`
  Returns:
    The X values.

### indexX

    public int indexX(int k)

  Given index k, returns the column index containing k.

  Parameters:
    `k` - index of interest.
  Returns:
    The column index.

### indexY

    public int indexY(int k)

  Given index k, return the row index containing k.

  Parameters:
    `k` - index of interest.
  Returns:
    The row index.

### indexZ

    public int indexZ(int i,
                      int j)

  Given column and row indices, returns the k index.

  Parameters:
    `i` - index of along x-axis.
    `j` - index of along y-axis.
  Returns:
    The Z index.

### isDateAxis

    public boolean isDateAxis(int axisNumber)

  Returns true if axis are dates.

  Specified by:
    `isDateAxis` in interface `ContourDataset`
  Parameters:
    `axisNumber` - The axis where 0-x, 1-y, and 2-z.
  Returns:
    A boolean.

### setSeriesNames

    public void setSeriesNames(java.lang.String[] seriesNames)

  Sets the names of the series in the data source.

  Parameters:
    `seriesNames` - The names of the series in the data source.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD