Class DtMappedCheckboxComponent<T>

All Implemented Interfaces:
IComponent<IValue<T>>, IEventChannel

public abstract class DtMappedCheckboxComponent<T> extends AbstractControlComponent<IValue<T>,ILabeledParametrization,CheckboxViewModel>
The DT checkbox component that can be mapped on any model type.
  • Constructor Details

    • DtMappedCheckboxComponent

      public DtMappedCheckboxComponent(ILabeledParametrization parameterization)
      Creates a new instance with parameterization.
      Parameters:
      parameterization - the parameterization.
    • DtMappedCheckboxComponent

      public DtMappedCheckboxComponent()
      Creates a new instance.
  • Method Details

    • createControlViewModel

      protected CheckboxViewModel createControlViewModel()
      Description copied from class: AbstractControlComponent
      Creates control view model instance.
      Specified by:
      createControlViewModel in class AbstractControlComponent<IValue<T>,ILabeledParametrization,CheckboxViewModel>
      Returns:
      a newly created control view model.
    • convertBooleanToValue

      protected abstract T convertBooleanToValue(Boolean value)
      Converts the checkbox state value to model value.
      Parameters:
      value - the boolean value
      Returns:
      the model value
    • convertValueToBoolean

      protected abstract boolean convertValueToBoolean(T modelValue)
      Converts the model value to the checkbox state.
      Parameters:
      modelValue - the model value
      Returns:
      the boolean value