Class DualSpectrumImageViewer

All Implemented Interfaces:
fr.esrf.tangoatk.core.IAttributeStateListener, fr.esrf.tangoatk.core.IErrorListener, fr.esrf.tangoatk.core.IImageListener, IJLChartActionListener, IJLChartListener, ActionListener, MouseListener, MouseMotionListener, MouseWheelListener, ImageObserver, MenuContainer, Serializable, EventListener

public class DualSpectrumImageViewer extends JLChart implements fr.esrf.tangoatk.core.IImageListener, IJLChartActionListener, IJLChartListener
A class to display a scalar spectra attribute according to an other spectra attribute. The 2 spectrum must be stored in a Image. The Image object must have a height equals to 2. The first line of the image is displayed on the X axis and the second on the Y axis. For displaying time label, timestamps are in millisec since epoch.
Author:
E.S.R.F
See Also:
  • Constructor Details

    • DualSpectrumImageViewer

      public DualSpectrumImageViewer()
      Create a new DualSpectrumImageViewer
  • Method Details

    • 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:
    • 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:
    • clickOnChart

      public String[] clickOnChart(JLChartEvent e)
      Description copied from interface: IJLChartListener
      Called when the user click on the chart
      Specified by:
      clickOnChart in interface IJLChartListener
      Parameters:
      e - Event object (containing click inforamtion)
      Returns:
      A set of string to display in the value tooltip. Does not display the tooltip if an empty array is returned. Keep default behavior when null is returned
    • errorChange

      public void errorChange(fr.esrf.tangoatk.core.ErrorEvent errorEvent)
      Specified by:
      errorChange in interface fr.esrf.tangoatk.core.IErrorListener
    • stateChange

      public void stateChange(fr.esrf.tangoatk.core.AttributeStateEvent evt)
      Specified by:
      stateChange in interface fr.esrf.tangoatk.core.IAttributeStateListener
    • imageChange

      public void imageChange(fr.esrf.tangoatk.core.NumberImageEvent evt)
      Specified by:
      imageChange in interface fr.esrf.tangoatk.core.IImageListener
    • getYView

      public JLDataView getYView()
      getYView Return a handle to the y view.
      Returns:
      Return a handle to the y view
    • setModel

      public void setModel(fr.esrf.tangoatk.core.INumberImage v)
      setModel Set the model.
      Parameters:
      v - Value to assign to model. This image must have a height equals to 2.
    • setSettings

      public String setSettings(String cfg)
      Apply configuration
      Parameters:
      cfg - String containing configuration
      Returns:
      error string when failure or an empty string when succesfull
    • getSettings

      public String getSettings()
      Return configuration
      Returns:
      current chart configuration as string
    • main

      public static void main(String[] args)