Class AbstractBoolControlModel

All Implemented Interfaces:
IPVWidgetModel, IAdaptable, IPropertySource
Direct Known Subclasses:
BoolButtonModel, BoolSwitchModel, ImageBoolButtonModel

public class AbstractBoolControlModel extends AbstractBoolWidgetModel
Abstract model for boolean controls.
  • Field Details

    • PROP_TOGGLE_BUTTON

      public static final String PROP_TOGGLE_BUTTON
      If the button should be a toggle button.
      See Also:
    • PROP_CONFIRM_DIALOG

      public static final String PROP_CONFIRM_DIALOG
      If a confirm dialog should be shown before performing action.
      See Also:
    • PROP_PASSWORD

      public static final String PROP_PASSWORD
      The password needed to perform action
      See Also:
    • PROP_CONFIRM_TIP

      public static final String PROP_CONFIRM_TIP
      The message which will be shown on confirm dialog.
      See Also:
    • DEFAULT_CONFIRM_TIP

      public static final String DEFAULT_CONFIRM_TIP
      See Also:
    • PROP_PUSH_ACTION_INDEX

      public static final String PROP_PUSH_ACTION_INDEX
      The action which will be executed when widget is pushed. It is the index the actions in actions property.
      See Also:
    • PROP_RELEASED_ACTION_INDEX

      public static final String PROP_RELEASED_ACTION_INDEX
      The action which will be executed when widget is released. It is the index the action in actions property.
      See Also:
    • ID

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

    • AbstractBoolControlModel

      public AbstractBoolControlModel()
  • 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.
    • isToggleButton

      public boolean isToggleButton()
      Returns:
      true if the button is toggle.
    • getShowConfirmDialog

      public AbstractBoolControlFigure.ShowConfirmDialog getShowConfirmDialog()
      Returns:
      true if the confirm dialog should be shown, false otherwise
    • getPassword

      public String getPassword()
      Returns:
      the password
    • getConfirmTip

      public String getConfirmTip()
      Returns:
      the confirm tip
    • getPushActionIndex

      public int getPushActionIndex()
      Return the index of the selected WidgetAction from the ActionData. The Action is running when the button is released.
      Returns:
      The index
    • getReleasedActionIndex

      public int getReleasedActionIndex()
      Return the index of the selected WidgetAction from the ActionData. The Action is running when the button is released.
      Returns:
      The index