org.csstudio.ui.util.widgets
Class MeterWidget

java.lang.Object
  extended by Canvas
      extended by org.csstudio.ui.util.widgets.MeterWidget

public class MeterWidget
extends Canvas

Simple meter widget.

Author:
Kay Kasemir, Gabriele Carcassi

Constructor Summary
MeterWidget(Composite parent, int style)
          Constructor
 
Method Summary
 Point computeSize(int wHint, int hHint, boolean changed)
           
 void setEnabled(boolean enabled)
           
 void setLimits(double min, double lowAlarm, double lowWarning, double highWarning, double highAlarm, double max, int precision)
          Configure the meter.
 void setValue(double value)
          Set current value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeterWidget

public MeterWidget(Composite parent,
                   int style)
Constructor

Method Detail

setLimits

public void setLimits(double min,
                      double lowAlarm,
                      double lowWarning,
                      double highWarning,
                      double highAlarm,
                      double max,
                      int precision)
Configure the meter.

Parameters:
min - Minimum value.
lowAlarm - Lower alarm limit.
lowWarning - Lower warning limit.
highWarning - Upper warning limit.
highAlarm - Upper alarm limit.
max - Maximum value.
precision - Display precision

setValue

public void setValue(double value)
Set current value.


setEnabled

public void setEnabled(boolean enabled)

computeSize

public Point computeSize(int wHint,
                         int hHint,
                         boolean changed)
See Also:
org.eclipse.swt.widgets.Composite#computeSize(int, int, boolean)