Class AExample

All Implemented Interfaces:
PlotChangeListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants
Direct Known Subclasses:
AnotherGaussian, CubicLogLog, ErfcTest, ErfTest, ExponentialDecayExample, Gaussian, GrowingHisto, Heatmap, Histo, LorentzianExample, PowerLawExample, Scatter, StraightLine, StripChart, ThreeGaussians, TwoHisto, TwoLinesWithErrors

public abstract class AExample extends JFrame implements PlotChangeListener
A template class for plot examples
Author:
heddle
See Also:
  • Field Details

  • Constructor Details

    • AExample

      public AExample()
      Create the example plot in non-headless mode
    • AExample

      public AExample(boolean headless)
      Create the example plot, optionally in headless mode
      Parameters:
      headless - if true, do not create the GUI
  • Method Details

    • dataSetup

      protected void dataSetup()
    • plotChanged

      public void plotChanged(PlotChangeType type)
      Description copied from interface: PlotChangeListener
      A plot change event occurred
      Specified by:
      plotChanged in interface PlotChangeListener
      Parameters:
      type - the event
    • getPlotCanvas

      public PlotCanvas getPlotCanvas()
      Get the plot canvas
      Returns:
      the plot canvas
    • getPlotPanel

      public PlotPanel getPlotPanel()
      Get the plot panel
      Returns:
      the plot panel
    • createPlotData

      protected abstract PlotData createPlotData() throws PlotDataException
      Create the plot data
      Returns:
      the plot data
      Throws:
      PlotDataException
    • getXAxisLabel

      protected abstract String getXAxisLabel()
      get the x axis label
    • getYAxisLabel

      protected abstract String getYAxisLabel()
      get the y axis label
    • getPlotTitle

      protected abstract String getPlotTitle()
      get the plot title
    • fillData

      public abstract void fillData()
      fill the plot data with values
    • setParameters

      public abstract void setParameters()
      set the plot parameters