Package uk.ac.starlink.ttools.example
Class EnvPlanePlotter
- java.lang.Object
-
- uk.ac.starlink.ttools.example.EnvPlanePlotter
-
- All Implemented Interfaces:
SinePlot.PlanePlotter
public class EnvPlanePlotter extends java.lang.Object implements SinePlot.PlanePlotter
PlanePlotter implementation that uses the name/value pairs in the same way as the STILTS application command-line interface to set up a plot. This is much easier to do than the alternative, since the large majority of the options will assume sensible defaults if not set. It allows pretty much the same capabilities. However, it does not offer compile-time safety: there is no guarantee that a plot set up like this will not generate a run-time error.- Since:
- 12 Jun 2014
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description EnvPlanePlotter()
-
Method Summary
All Methods Instance Methods Concrete Methods 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.
-
-
-
Method Detail
-
createPlotComponent
public PlotDisplay createPlotComponent(uk.ac.starlink.table.StarTable table, boolean dataMayChange) throws java.lang.InterruptedException, java.io.IOException, uk.ac.starlink.task.TaskException
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 interfaceSinePlot.PlanePlotter
- Parameters:
table
- table to plotdataMayChange
- true if the table data may change during the lifetime of the plot- Throws:
java.lang.InterruptedException
java.io.IOException
uk.ac.starlink.task.TaskException
-
-