Class ImageBoolIndicatorModel

All Implemented Interfaces:
IPVWidgetModel, IAdaptable, IPropertySource

public class ImageBoolIndicatorModel extends AbstractBoolWidgetModel
The widget model for Boolean Switch.
  • Field Details

    • PROP_ON_IMAGE

      public static final String PROP_ON_IMAGE
      Image on the button when it is on.
      See Also:
    • PROP_OFF_IMAGE

      public static final String PROP_OFF_IMAGE
      Image on the button when it is off.
      See Also:
    • PROP_STRETCH

      public static final String PROP_STRETCH
      True if the image should be stretched to the button size.
      See Also:
    • PROP_AUTOSIZE

      public static final String PROP_AUTOSIZE
      True if the button size is automatically adjusted to the size of the image.
      See Also:
    • PROP_NO_ANIMATION

      public static final String PROP_NO_ANIMATION
      True if the widget doesn't show animation even it is a animated image file.
      See Also:
    • PROP_ALIGN_TO_NEAREST_SECOND

      public static final String PROP_ALIGN_TO_NEAREST_SECOND
      True if the widget animation start should be aligned to the nearest second.
      See Also:
    • ID

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

    • ImageBoolIndicatorModel

      public ImageBoolIndicatorModel()
  • 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 AbstractBoolWidgetModel
    • getTypeID

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

      public boolean isStretch()
      Returns if the image should be stretched.
      Returns:
      True is it should be stretched, false otherwise
    • isAutoSize

      public boolean isAutoSize()
      Returns:
      True if the widget should be auto sized according the image size.
    • getOnImagePath

      public String getOnImagePath()
      Returns:
      the path of the on image.
    • getOffImagePath

      public String getOffImagePath()
      Returns:
      the path of the off image.
    • isStopAnimation

      public boolean isStopAnimation()
      Returns:
      True if the animation is stopped.
    • isAlignedToNearestSecond

      public boolean isAlignedToNearestSecond()