# Class ApiPlanePlotter

java.lang.Object
uk.ac.starlink.ttools.example.ApiPlanePlotter

All Implemented Interfaces:
  `SinePlot.PlanePlotter`

public class ApiPlanePlotter extends Object implements SinePlot.PlanePlotter
PlanePlotter implementation that sets up a plot explicitly. There's a lot to do, it's quite complicated, even for a simple plot. If you don't like this approach, see the much more straightforward `EnvPlanePlotter` implementation instead. This approach however gives compile-time type-checking of the plot parameters.

Since:
  12 Jun 2014
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`ApiPlanePlotter()`

## Method Summary

Modifier and Type
Method
Description
`PlotDisplay<?,?>`
`createPlotComponent(uk.ac.starlink.table.StarTable table, boolean dataMayChange)`
Creates a JComponent holding a plot of the data in the first two columns of the supplied table.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ApiPlanePlotter

public ApiPlanePlotter()

## Method Details

### createPlotComponent

public PlotDisplay<?,?> createPlotComponent(uk.ac.starlink.table.StarTable table, boolean dataMayChange) throws InterruptedException, IOException
Description copied from interface: `SinePlot.PlanePlotter`
Creates a JComponent holding a plot of the data in the first two columns of the supplied table. This plot is live, and can be resized (as required by Swing) and panned and zoomed (by various mouse drag and wheel gestures).

The `dataMayChange` parameter is used to determine whether the plot positions should be cached or not for repaints, either as required by Swing move/resize actions or as the result of the user navigating around the plot. It's always safe to set it true, but if the data is static, setting it false will give better performance.

Specified by:
  `createPlotComponent` in interface `SinePlot.PlanePlotter`
Parameters:
  `table` - table to plot
  `dataMayChange` - true if the table data may change during the lifetime of the plot
Throws:
  `InterruptedException`
  `IOException`