Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EnvPlanePlotter

        public EnvPlanePlotter()
    • 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 interface SinePlot.PlanePlotter
        Parameters:
        table - table to plot
        dataMayChange - 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