Class AbstractBoolWidgetModel

All Implemented Interfaces:
IPVWidgetModel, IAdaptable, IPropertySource
Direct Known Subclasses:
AbstractBoolControlModel, ImageBoolIndicatorModel, LEDModel

public abstract class AbstractBoolWidgetModel extends AbstractPVWidgetModel
This class defines a common widget model for all the boolean widgets.
  • Field Details

    • PROP_BIT

      public static final String PROP_BIT
      Bit of the PV to be read and controlled. Set to -1 will write value 0/1 to the PV.
      See Also:
    • PROP_ON_LABEL

      public static final String PROP_ON_LABEL
      Label text when boolean widget is on.
      See Also:
    • PROP_OFF_LABEL

      public static final String PROP_OFF_LABEL
      Label text when boolean widget is off.
      See Also:
    • PROP_ON_COLOR

      public static final String PROP_ON_COLOR
      Widget color when boolean widget is on.
      See Also:
    • PROP_OFF_COLOR

      public static final String PROP_OFF_COLOR
      Widget color when boolean widget is off.
      See Also:
    • PROP_SHOW_BOOL_LABEL

      public static final String PROP_SHOW_BOOL_LABEL
      True if the boolean label should be visible.
      See Also:
    • PROP_BOOL_LABEL_POS

      public static final String PROP_BOOL_LABEL_POS
      See Also:
    • PROP_DATA_TYPE

      public static final String PROP_DATA_TYPE
      Data type to be operated by this widget, could be Bit or Enum. If it is Bit, the widget will write 0/1 to the corresponding bit of the PV. If it is ENUM, it will write On State/Off State property value to the PV.
      See Also:
    • PROP_ON_STATE

      public static final String PROP_ON_STATE
      If data type is Enum, it is the string value which will be written to the PV when widget is on.
      See Also:
    • PROP_OFF_STATE

      public static final String PROP_OFF_STATE
      If data type is Enum, it is the string value which will be written to the PV when widget is off.
      See Also:
  • Constructor Details

    • AbstractBoolWidgetModel

      public AbstractBoolWidgetModel()
  • 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.
      Specified by:
      configureProperties in class AbstractWidgetModel
    • getBit

      public Integer getBit()
      Returns:
      the bit. If bit is -1, the value channel must be enum, otherwise, it must be numeric value
    • getOnLabel

      public String getOnLabel()
      Returns:
      the on label
    • getOffLabel

      public String getOffLabel()
      Returns:
      the off label
    • getOnColor

      public Color getOnColor()
      Returns:
      the on color
    • getOffColor

      public Color getOffColor()
      Returns:
      the off color
    • isShowBoolLabel

      public boolean isShowBoolLabel()
      Returns:
      true if the boolean label should be shown, false otherwise
    • getDataType

      public int getDataType()
    • getOnState

      public String getOnState()
    • getOffState

      public String getOffState()
    • getBoolLabelPosition

      public AbstractBoolFigure.BoolLabelPosition getBoolLabelPosition()