Class NumberScalarWheelEditor

All Implemented Interfaces:
fr.esrf.tangoatk.core.IAttributeStateListener, fr.esrf.tangoatk.core.IErrorListener, fr.esrf.tangoatk.core.INumberScalarListener, IWheelSwitchListener, JDrawable, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener

public class NumberScalarWheelEditor extends WheelSwitch implements fr.esrf.tangoatk.core.INumberScalarListener, IWheelSwitchListener, PropertyChangeListener, JDrawable
A Tango Number WheelSwitch editor.
Author:
pons
See Also:
  • Constructor Details

    • NumberScalarWheelEditor

      public NumberScalarWheelEditor()
  • Method Details

    • getBackgroundColor

      public Color getBackgroundColor()
      Returns:
      the current background color of this viewer. Color used for the VALID attribute quality state
    • setBackgroundColor

      public void setBackgroundColor(Color bg)
      Sets the 'VALID' background color of this viewer. Color used for the VALID attribute quality state.
      Parameters:
      bg - Background color.
      See Also:
    • setAlarmEnabled

      public void setAlarmEnabled(boolean b)
      Enables or disables alarm background (represents the attribute quality factor).
      Parameters:
      b - True to enable alarm.
      See Also:
    • isAlarmEnabled

      public boolean isAlarmEnabled()
      Determines whether the background color is overrided by the quality factor.
      Returns:
      Alarm enabled flag
      See Also:
    • getModel

      public fr.esrf.tangoatk.core.INumberScalar getModel()
    • setModel

      public void setModel(fr.esrf.tangoatk.core.INumberScalar m)
    • initForEditing

      public void initForEditing()
      Description copied from interface: JDrawable
      Call after a component of a JDSwingObject is created, this give a default look and feel for editing.
      Specified by:
      initForEditing in interface JDrawable
    • getComponent

      public JComponent getComponent()
      Specified by:
      getComponent in interface JDrawable
      Returns:
      the JComponent that implements this interface.
    • getDescription

      public String getDescription(String extName)
      Description copied from interface: JDrawable
      Get a description of this extensions.
      Specified by:
      getDescription in interface JDrawable
      Parameters:
      extName - Extension name
      Returns:
      Empty string for no description.
    • getExtensionList

      public String[] getExtensionList()
      Specified by:
      getExtensionList in interface JDrawable
      Returns:
      list of extension name for this objects (Empty array for none).
    • setExtendedParam

      public boolean setExtendedParam(String name, String value, boolean popupErr)
      Description copied from interface: JDrawable
      Sets the specified param.
      Specified by:
      setExtendedParam in interface JDrawable
      Parameters:
      name - Parameter name (Case unsensitive).
      value - Parameter value.
      popupErr - true when the JDrawable should display a popup if the parameter value is incorrect, false otherwise. Note that the JDrawable must not display an error message if the parameter does not exists even if popupAllowed is true.
      Returns:
      true if parameters has been succesfully applied, false otherwise.
    • getExtendedParam

      public String getExtendedParam(String name)
      Description copied from interface: JDrawable
      Returns the specified parameter value.
      Specified by:
      getExtendedParam in interface JDrawable
      Parameters:
      name - Param name (Case unsensitive).
      Returns:
      Empty string if not exists, the value otherwise.
    • numberScalarChange

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

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

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

      public void valueChange(WheelSwitchEvent e)
      Specified by:
      valueChange in interface IWheelSwitchListener
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface PropertyChangeListener
    • main

      public static void main(String[] args)