Class KnobModel

All Implemented Interfaces:
IPVWidgetModel, IAdaptable, IPropertySource

public class KnobModel extends AbstractMarkedWidgetModel
This class defines a knob widget model.
  • Field Details

    • PROP_KNOB_COLOR

      public static final String PROP_KNOB_COLOR
      Color of the knob.
      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_SHOW_VALUE_LABEL

      public static final String PROP_SHOW_VALUE_LABEL
      Show value label.
      See Also:
    • PROP_THUMB_COLOR

      public static final String PROP_THUMB_COLOR
      Color of the thumb.
      See Also:
    • PROP_RAMP_GRADIENT

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

      public static final String PROP_INCREMENT
      The minimum increment step when dragging the thumb.
      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

    • KnobModel

      public KnobModel()
  • 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.
    • getKnobColor

      public Color getKnobColor()
      Returns:
      the knob color
    • isEffect3D

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

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

      public Color getThumbColor()
      Gets the RGB for thumb.
      Returns:
      The thumb color
    • isRampGradient

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

      public double getIncrement()
      Return the increment value.
      Returns:
      The increment value.