Class GaugeModel

All Implemented Interfaces:
IPVWidgetModel, IAdaptable, IPropertySource

public class GaugeModel extends AbstractMarkedWidgetModel
This class defines a gauge widget model.
  • Field Details

    • PROP_NEEDLE_COLOR

      public static final String PROP_NEEDLE_COLOR
      Needle color.
      See Also:
    • PROP_EFFECT3D

      public static final String PROP_EFFECT3D
      True if the widget is drawn with advanced graphics. In some platforms, advance graphics may not be available, in which case the widget will not be drawn with advanced graphics even this is set to true.
      See Also:
    • PROP_RAMP_GRADIENT

      public static final String PROP_RAMP_GRADIENT
      True if the ramp is gradient.
      See Also:
    • MINIMUM_SIZE

      public static final int MINIMUM_SIZE
      See Also:
    • ID

      public static final String ID
      The ID of this widget model.
      See Also:
  • Constructor Details

    • GaugeModel

      public GaugeModel()
  • Method Details

    • configureProperties

      protected void configureProperties()
      Description copied from class: AbstractWidgetModel
      Configure the properties of the widget. Subclass should add new properties in this method.
      Overrides:
      configureProperties in class AbstractMarkedWidgetModel
    • getTypeID

      public String getTypeID()
      Specified by:
      getTypeID in class AbstractWidgetModel
      Returns:
      the unique typeID of the model.
    • getNeedleColor

      public RGB getNeedleColor()
      Returns:
      the needle color
    • isEffect3D

      public boolean isEffect3D()
      Returns:
      true if the widget would be painted with 3D effect, false otherwise
    • isRampGradient

      public boolean isRampGradient()
      Returns:
      true if the ramp is gradient, false otherwise
    • scale

      public void scale(double widthRatio, double heightRatio)
      Description copied from class: AbstractWidgetModel
      Scale location and size of the widget. If the widget needs to change its scale behavior, it should override AbstractWidgetModel.doScale(double, double) instead of this method.
      Overrides:
      scale in class AbstractWidgetModel
      Parameters:
      widthRatio - Ratio of width change.
      heightRatio - Ratio of height change.