Class FitEditorPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class FitEditorPanel extends JPanel
Editor panel for a curve's fit/drawing-method settings: the fit-method selector, the method-specific widgets it reveals (polynomial order, Gaussian count), and histogram-only options (RMS-vs-sigma in the legend, showing statistical errors).

The panel does not own a curve reference; callers drive it explicitly: reconfigure(ACurve) shows/hides the method- and histogram-specific widgets appropriate for a curve's current drawing method, and setFit(ACurve) additionally pushes the curve's actual setting values (fit method, polynomial order, Gaussian count) into those widgets. fitSpecific(CurveDrawingMethod) enables/disables the polynomial-order and Gaussian-count sliders to match a given drawing method, independent of reconfigure(edu.cnu.mdi.splot.pdata.ACurve)'s show/hide logic.

See Also:
  • Field Details

  • Constructor Details

    • FitEditorPanel

      public FitEditorPanel()
      A Fit editing panel
  • Method Details

    • reconfigure

      public void reconfigure(ACurve curve)
      Reconfigure fit widgets based on fit type
      Parameters:
      curve - the active curve
    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class JComponent
    • setFit

      public void setFit(ACurve curve)
      FitEditorPanel Set the choices
      Parameters:
      curve - the curve whose fit-related settings should be reflected in the UI
    • fitSpecific

      public void fitSpecific(CurveDrawingMethod type)
      Further enable/disable based on fit type
      Parameters:
      type - the active curve drawing method
    • getFitSelector

      public EnumComboBox getFitSelector()
      Get the fit selector.
      Returns:
      the fit selector
    • getPolynomialOrderSelector

      public TextFieldSlider getPolynomialOrderSelector()
      Get the polynomial order slider.
      Returns:
      polynomial order slider
    • getNumGaussianSelector

      public TextFieldSlider getNumGaussianSelector()
      Get the number of gaussian slider.
      Returns:
      number of gaussian slider
    • getNumRMSCheckBox

      public JCheckBox getNumRMSCheckBox()
      Get the rms or sigma check box.
      Returns:
      the rms or sigma check box
    • getStatErrorCheckBox

      public JCheckBox getStatErrorCheckBox()
      Get the draw stat error check box.
      Returns:
      the draw stat error checkbox