Class NonAttrNumberSpectrumViewer

All Implemented Interfaces:
fr.esrf.tangoatk.core.util.INonAttrSpectrumListener, IJLChartActionListener, ActionListener, MouseListener, MouseMotionListener, MouseWheelListener, ImageObserver, MenuContainer, Serializable, EventListener

public class NonAttrNumberSpectrumViewer extends JLChart implements fr.esrf.tangoatk.core.util.INonAttrSpectrumListener, IJLChartActionListener
Author:
OUNSY
See Also:
  • Field Details

  • Constructor Details

    • NonAttrNumberSpectrumViewer

      public NonAttrNumberSpectrumViewer()
      Creates a new instance of NonAttrNumberSpectrumViewer
  • Method Details

    • reset

      public void reset()
      Overrides:
      reset in class JLChart
    • buildPanelString

      public String[] buildPanelString(SearchInfo si)
      Overrides:
      buildPanelString in class JLChart
    • findModelIndex

      protected int findModelIndex(fr.esrf.tangoatk.core.util.INonAttrNumberSpectrum v)
    • spectrumChange

      public void spectrumChange(fr.esrf.tangoatk.core.util.NonAttrNumberSpectrumEvent numberSpectrumEvent)
      Specified by:
      spectrumChange in interface fr.esrf.tangoatk.core.util.INonAttrSpectrumListener
    • addModel

      public void addModel(fr.esrf.tangoatk.core.util.INonAttrNumberSpectrum v)
      addModel add the value in model list. Places the corresponding JLDataView on Y1
      Parameters:
      v - Value to assign to model.
      See Also:
    • addModel

      public void addModel(fr.esrf.tangoatk.core.util.INonAttrNumberSpectrum v, int axis)
      addModel add the value in model list.
      Parameters:
      v - Value to assign to model.
      axis - The axis on which to place the corresponding JLDataView. If the axis is not a right one, adding model is refused.
      See Also:
    • setSettings

      public String setSettings(String cfg)
      setSettings() Applies graph configuration given as string
      Parameters:
      cfg - Configuration string
      Returns:
      error string or an empty string when successfull
    • getSettings

      public String getSettings()
      getSettings() Return graph configuration as string
      Returns:
      Configuration string
    • setSetting

      public String setSetting(String txt)
      Apply a configuration.
      Parameters:
      txt - Configuration text.
      Returns:
      An error string or An empty string when succes
      See Also:
    • saveSetting

      public void saveSetting(String filename)
      Save settings.
      Parameters:
      filename - file to be saved.
    • loadSetting

      public String loadSetting(String filename)
      Load graph settings.
      Parameters:
      filename - file to be read
      Returns:
      An error string or An empty string when succes
    • applySettings

      protected String applySettings(CfFileReader f)
    • loadButtonActionPerformed

      protected void loadButtonActionPerformed()
    • actionPerformed

      public void actionPerformed(JLChartActionEvent evt)
      Description copied from interface: IJLChartActionListener
      Called when the user select a user action (available from contextual chart menu)
      Specified by:
      actionPerformed in interface IJLChartActionListener
      Parameters:
      evt - Event object (containing acion name and state)
      See Also:
    • saveButtonActionPerformed

      protected void saveButtonActionPerformed()
    • getActionState

      public boolean getActionState(JLChartActionEvent evt)
      Description copied from interface: IJLChartActionListener
      Called when the the action name starting with 'chk' (displayed as check box menu item) and each time the chart menu is shown. if several listener handle the same action, the result will be a logical and of all results.
      Specified by:
      getActionState in interface IJLChartActionListener
      Parameters:
      evt - Event object (containing acion name)
      Returns:
      Action state (true to execute)
      See Also:
    • main

      public static void main(String[] args)