Class MeterWidget

All Implemented Interfaces:
Drawable

public class MeterWidget extends Canvas
Simple meter widget.
  • Constructor Details

    • MeterWidget

      public MeterWidget(Composite parent, int style)
      Constructor
  • Method Details

    • 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)
      Overrides:
      setEnabled in class Control
    • computeSize

      public Point computeSize(int wHint, int hHint, boolean changed)
      Overrides:
      computeSize in class Control