Class SimpleStateViewer

All Implemented Interfaces:
fr.esrf.tangoatk.core.IErrorListener, fr.esrf.tangoatk.core.IStateListener, ImageObserver, MenuContainer, Serializable, EventListener

public class SimpleStateViewer extends JSmoothLabel implements fr.esrf.tangoatk.core.IStateListener, fr.esrf.tangoatk.core.IErrorListener
SimpleStateViewer is a viewer to surveil the state of a Device. Background color are defined in ATKConstant . SimpleStateViewer offer the possibility to use Antialiased font for better rendering. SimpleStateViewer has no label. Normally one connects the device with the viewer like this:
 Device device = DeviceFactory.getInstance().getDevice("my_device");
 SimpleStateViewer state = new SimpleStateViewer();
 state.setModel(device);
 
Version:
$Revision$
See Also:
  • Constructor Details

    • SimpleStateViewer

      public SimpleStateViewer()
      Contructs a SimpleStateViewer.
  • Method Details

    • setModel

      public void setModel(fr.esrf.tangoatk.core.Device devModel)
      setModel sets the model of this viewer. If the textLabel property is not set, the name of the device is shown on the textLabel.
      Parameters:
      devModel - a Device to surveil
    • clearModel

      public void clearModel()
    • getModel

      public fr.esrf.tangoatk.core.Device getModel()
      getModel gets the model of this stateviewer.
      Returns:
      a Device value
    • getState

      public String getState()
      getState
      Returns:
      a String value presenting the state of the device
    • stateChange

      public void stateChange(fr.esrf.tangoatk.core.StateEvent evt)
      Specified by:
      stateChange in interface fr.esrf.tangoatk.core.IStateListener
    • errorChange

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

      public void setStateClickable(boolean clickable)
      setStateClickable will the state be clickable?
      Parameters:
      clickable - a boolean value
    • isStateClickable

      public boolean isStateClickable()
      isStateClickable returns if the state is clickable or not.
      Returns:
      a boolean value
    • setApplication

      public void setApplication(fr.esrf.tangoatk.core.IDeviceApplication runnable)
      Set the application which will be displayed on right mouse click.
      Parameters:
      runnable - Application to be launched
    • getApplication

      public fr.esrf.tangoatk.core.IDeviceApplication getApplication()
      Returns:
      the application attached to this state viewer.
      See Also:
    • getPopUp

      public IDevicePopUp getPopUp()
      Get the value of popUp.
      Returns:
      value of popUp.
      See Also:
    • setPopUp

      public void setPopUp(IDevicePopUp v)
      Set the popup which will be displayed on left mouse click.
      Parameters:
      v - Value to assign to popUp.