Class LEDModel

All Implemented Interfaces:
IPVWidgetModel, IAdaptable, IPropertySource

public class LEDModel extends AbstractBoolWidgetModel
The widget model for LED.
  • Field Details

    • PROP_EFFECT3D

      public static final String PROP_EFFECT3D
      The ID of the effect 3D property.
      See Also:
    • PROP_SQUARE_LED

      public static final String PROP_SQUARE_LED
      The ID of the square LED property.
      See Also:
    • PROP_NSTATES

      public static final String PROP_NSTATES
      Number of states for this multi state widget
      See Also:
    • PROP_STATE_LABEL

      public static final String PROP_STATE_LABEL
      Label text for multi state X
      See Also:
    • PROP_STATE_COLOR

      public static final String PROP_STATE_COLOR
      Widget color for multi state X
      See Also:
    • DESC_STATE_COLOR

      public static final String DESC_STATE_COLOR
      Description for widget color properties
      See Also:
    • PROP_STATE_VALUE

      public static final String PROP_STATE_VALUE
      State value for multi state X
      See Also:
    • DESC_STATE_VALUE

      public static final String DESC_STATE_VALUE
      Description for state value properties
      See Also:
    • PROP_STATE_FALLBACK_LABEL

      public static final String PROP_STATE_FALLBACK_LABEL
      State fallback label property
      See Also:
    • PROP_STATE_FALLBACK_COLOR

      public static final String PROP_STATE_FALLBACK_COLOR
      State fallback color property
      See Also:
    • MINIMUM_SIZE

      public static final int MINIMUM_SIZE
      See Also:
    • PROP_BULB_BORDER

      public static final String PROP_BULB_BORDER
      Border around the bulb - this is drawn in addition to the 'widget border' set by the widget border style/color/width properties. For round LEDs this is a round border,
      See Also:
    • PROP_BULB_BORDER_COLOR

      public static final String PROP_BULB_BORDER_COLOR
      Color of bulb border LEDs
      See Also:
    • ID

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

    • LEDModel

      public LEDModel()
  • 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.
    • isEffect3D

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

      public boolean isSquareLED()
      Returns:
      true if the LED is square, false otherwise
    • getNStates

      public int getNStates()
    • getStateLabel

      public String getStateLabel(int state)
    • getStateValue

      public double getStateValue(int state)
    • getStateColor

      public Color getStateColor(int state)
    • getStateFallbackLabel

      public String getStateFallbackLabel()
    • getStateFallbackColor

      public Color getStateFallbackColor()
    • getBulbBorderWidth

      public int getBulbBorderWidth()
    • getBulbBorderColor

      public Color getBulbBorderColor()