Class AttributeMultiChart

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

public class AttributeMultiChart extends JLChart implements fr.esrf.tangoatk.core.INumberScalarListener
Author:
SOLEIL
See Also:
  • Field Details

    • xaxisName

      protected String xaxisName
    • unit

      protected String unit
    • alarmLevel

      protected double alarmLevel
    • faultLevel

      protected double faultLevel
    • alarm

      protected JLDataView alarm
    • fault

      protected JLDataView fault
    • lineView

      protected JLDataView lineView
    • lastConfig

      protected String lastConfig
    • refreshingPeriod

      protected int refreshingPeriod
    • dataViewHash

      protected Map<fr.esrf.tangoatk.core.INumberScalar,List<Object>> dataViewHash
    • model

      protected fr.esrf.tangoatk.core.AttributeList model
    • chartStyle

      protected int chartStyle
    • markerStyle

      protected int markerStyle
    • chartColor

      protected Color chartColor
    • alarmEnable

      protected boolean alarmEnable
    • chartOnXAxis

      protected boolean chartOnXAxis
    • highAlarm

      protected boolean highAlarm
    • highFault

      protected boolean highFault
    • multiChartMenu

      protected JMenu multiChartMenu
    • barChartItem

      protected JMenuItem barChartItem
    • dotChartMenu

      protected JMenu dotChartMenu
    • dotItem

      protected JMenuItem dotItem
    • boxItem

      protected JMenuItem boxItem
    • triangleItem

      protected JMenuItem triangleItem
    • diamondItem

      protected JMenuItem diamondItem
    • starItem

      protected JMenuItem starItem
    • vertLineItem

      protected JMenuItem vertLineItem
    • horizLineItem

      protected JMenuItem horizLineItem
    • crossItem

      protected JMenuItem crossItem
    • circleItem

      protected JMenuItem circleItem
    • squareItem

      protected JMenuItem squareItem
    • lineChartMenu

      protected JMenu lineChartMenu
    • dotItem2

      protected JMenuItem dotItem2
    • boxItem2

      protected JMenuItem boxItem2
    • triangleItem2

      protected JMenuItem triangleItem2
    • diamondItem2

      protected JMenuItem diamondItem2
    • starItem2

      protected JMenuItem starItem2
    • vertLineItem2

      protected JMenuItem vertLineItem2
    • horizLineItem2

      protected JMenuItem horizLineItem2
    • crossItem2

      protected JMenuItem crossItem2
    • circleItem2

      protected JMenuItem circleItem2
    • squareItem2

      protected JMenuItem squareItem2
    • tooltipMenu

      protected JMenu tooltipMenu
    • fullNameItem

      protected JMenuItem fullNameItem
    • noDeviceNameItem

      protected JMenuItem noDeviceNameItem
    • labelItem

      protected JMenuItem labelItem
    • aliasItem

      protected JMenuItem aliasItem
    • deviceNameItem

      protected JMenuItem deviceNameItem
    • axisInfoMenu

      protected JMenu axisInfoMenu
    • axisInfoFullNameItem

      protected JMenuItem axisInfoFullNameItem
    • axisInfoNoDeviceNameItem

      protected JMenuItem axisInfoNoDeviceNameItem
    • axisInfoLabelItem

      protected JMenuItem axisInfoLabelItem
    • axisInfoAliasItem

      protected JMenuItem axisInfoAliasItem
    • axisInfoDeviceNameItem

      protected JMenuItem axisInfoDeviceNameItem
    • axisInfoIndexItem

      protected JMenuItem axisInfoIndexItem
    • YScale

      protected JMenu YScale
    • logarithmic

      protected JMenuItem logarithmic
    • linear

      protected JMenuItem linear
    • displayMode

      protected int displayMode
    • axisDisplayMode

      protected int axisDisplayMode
    • barChart

      public static final int barChart
      int value representing the kind of chart "BarChart"
      See Also:
    • dotChart

      public static final int dotChart
      int value representing the kind of chart "DotChart"
      See Also:
    • lineChart

      public static final int lineChart
      int value representing the kind of chart "LineChart"
      See Also:
    • DISPLAY_FULL_NAME

      public static final int DISPLAY_FULL_NAME
      int value representing the fact that you want to see the attribute's complete name in tooltip (default option)/X Axis
      See Also:
    • DISPLAY_NAME_NO_DEVICE

      public static final int DISPLAY_NAME_NO_DEVICE
      int value representing the fact that you want to see the attribute's name without its device name in tooltip/X Axis
      See Also:
    • DISPLAY_LABEL

      public static final int DISPLAY_LABEL
      int value representing the fact that you want to see the attribute's label in tooltip/X Axis
      See Also:
    • DISPLAY_ALIAS

      public static final int DISPLAY_ALIAS
      int value representing the fact that you want to see the attribute's alias in tooltip/X Axis
      See Also:
    • DISPLAY_DEVICE_NAME

      public static final int DISPLAY_DEVICE_NAME
      int value representing the fact that you want to see the name of the device to which the attribute belongs in tooltip/X Axis
      See Also:
    • DISPLAY_INDEX

      public static final int DISPLAY_INDEX
      int value representing the fact that you want to see the index of the attribute in X Axis (default option)
      See Also:
  • Constructor Details

  • Method Details

    • getMarkerStyle

      public int getMarkerStyle()
      Returns the marker style style for line chart and dot chart
      Returns:
      int representing the marker style
    • setMarkerStyle

      public void setMarkerStyle(int style)
      Sets the marker style for line chart and dot chart
      Parameters:
      style - Marker style
      See Also:
    • initComponents

      protected void initComponents()
    • buildPanelString

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

      protected void initLevels()
    • isChartOnXAxis

      public boolean isChartOnXAxis()
    • setChartOnXAxis

      public void setChartOnXAxis(boolean chartOnXAxis)
    • setModel

      public void setModel(fr.esrf.tangoatk.core.AttributeList attl)
      Sets the attributes this chart will display. It calls to clearmodel() first
      Parameters:
      attl - the list of Attribute as an AttributeList
    • clearModel

      public void clearModel()
      Clears the chart
    • setWidth

      public void setWidth(int bar_width)
      Sets the width of the bars of the bar chart
      Parameters:
      bar_width - the width
    • isHighAlarm

      public boolean isHighAlarm()
    • setHighAlarm

      public void setHighAlarm(boolean highAlarm)
    • isHighFault

      public boolean isHighFault()
    • setHighFault

      public void setHighFault(boolean highFault)
    • numberScalarChange

      public void numberScalarChange(fr.esrf.tangoatk.core.NumberScalarEvent numberScalarEvent)
      Specified by:
      numberScalarChange in interface fr.esrf.tangoatk.core.INumberScalarListener
    • getChartStyle

      public int getChartStyle()
      Returns:
      an int representing the kind of chart used.
      See Also:
    • setChartStyle

      public void setChartStyle(int style)
      Allows you to choose which kind of chart you want to use
      Parameters:
      style - the kind of chart you want to use
      See Also:
    • stateChange

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

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

      public double getAlarmLevel()
      Returns:
      Returns the alarm_level.
    • setAlarmLevel

      public void setAlarmLevel(double alarm_level)
      Parameters:
      alarm_level - The alarm_level to set. Set Double.MAX_VALUE to remove it.
    • getFaultLevel

      public double getFaultLevel()
      Returns:
      Returns the fault_level.
    • setFaultLevel

      public void setFaultLevel(double fault_level)
      Parameters:
      fault_level - The fault_level to set. Set Double.MAX_VALUE to remove it.
    • getChartHeader

      public String getChartHeader()
      Returns:
      Returns the header.
    • setChartHeader

      public void setChartHeader(String header)
      Parameters:
      header - The header to set.
    • getUnit

      public String getUnit()
      Returns:
      Returns the unit.
    • setUnit

      public void setUnit(String unit)
      Parameters:
      unit - The unit to set.
    • getXaxisName

      public String getXaxisName()
      Returns:
      Returns the xaxis_name.
    • setXaxisName

      public void setXaxisName(String xaxis_name)
      Parameters:
      xaxis_name - The xaxis_name to set.
    • getSettings

      public String getSettings()
      Returns:
      The String that will be written in a configuration file
    • saveSetting

      public void saveSetting(String s)
      Saves the configuration of the chart in a file
      Parameters:
      s - the file path
    • loadSetting

      public String loadSetting(String s)
      Loads configuration from a file
      Parameters:
      s - the file path
      Returns:
      a String that is empty if the loading is all right, or contains an error message otherwise
    • getRefreshingPeriod

      public int getRefreshingPeriod()
      Returns:
      the refreshing period of the associated AttributeList
    • setRefreshingPeriod

      public void setRefreshingPeriod(int refreshingPeriod)
      sets the refreshing period of the associated AttributeList
      Parameters:
      refreshingPeriod - the refreshing period
    • applySettings

      protected String applySettings(CfFileReader cffilereader)
    • setAttributeListAsString

      protected void setAttributeListAsString(String attributeListAsString)
    • actionPerformed

      public void actionPerformed(ActionEvent evt)
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JLChart
      Parameters:
      evt - Action Event
      See Also:
    • showTableAll

      protected void showTableAll()
      Overrides:
      showTableAll in class JLChart
    • loadPerformed

      protected void loadPerformed()
    • savePerformed

      protected void savePerformed()
    • getDisplayMode

      public int getDisplayMode()
      Returns an int representing what kind of information about your attribute you can see in tooltip.
      Returns:
      An int representing what kind of information about your attribute you can see in tooltip.
      See Also:
    • setDisplayMode

      public void setDisplayMode(int displayMode)
      Set what kind of information about your attribute you can see in tooltip.
      Parameters:
      displayMode - an int representing the kind of information about your attribute you can see in tooltip.
      See Also:
    • getAxisDisplayMode

      public int getAxisDisplayMode()
      Returns an int representing what kind of information about your attribute you can see in X axis.
      Returns:
      An int representing what kind of information about your attribute you can see in X axis.
      See Also:
    • setAxisDisplayMode

      public void setAxisDisplayMode(int axisDisplayMode)
      Set what kind of information about your attribute you can see in X axis.
      Parameters:
      axisDisplayMode - an int representing the kind of information about your attribute you can see in X axis.
      See Also:
    • updateToolTips

      protected void updateToolTips()
    • prepareName

      protected void prepareName(JLDataView view, fr.esrf.tangoatk.core.INumberScalar scalar)
    • manageLabels

      protected void manageLabels()
    • getChartColor

      public Color getChartColor()
      Returns:
      Returns the chartColor.
    • setChartColor

      public void setChartColor(Color chartColor)
      Parameters:
      chartColor - The chartColor to set.
    • isAlarmEnable

      public boolean isAlarmEnable()
      Returns:
      Returns the alarmEnable.
    • setAlarmEnable

      public void setAlarmEnable(boolean alarmEnable)
      Parameters:
      alarmEnable - The alarmEnable to set.
    • main

      public static void main(String[] args)