Class CheckableLabelComponent<M,VM extends CheckableLabelViewModel>

All Implemented Interfaces:
IComponent<IValue<M>>, IEventChannel
Direct Known Subclasses:
ExtendedLabelComponent

public class CheckableLabelComponent<M,VM extends CheckableLabelViewModel> extends AbstractControlComponent<IValue<M>,ILabeledParametrization,VM>
Checkable label component that shows lable and checkbox.
  • Constructor Details

  • Method Details

    • attachToModel

      protected void attachToModel()
      Description copied from class: Component
      Attaches this component to the model. Override it to add some listeners to the model.
      Overrides:
      attachToModel in class Component<IValue<M>,ILabeledParametrization>
    • detachFromModel

      protected void detachFromModel()
      Description copied from class: Component
      Detaches this component from the model. Override it to remove listeners from the model.
      Overrides:
      detachFromModel in class Component<IValue<M>,ILabeledParametrization>
    • createControlViewModel

      protected VM createControlViewModel()
      Description copied from class: AbstractControlComponent
      Creates control view model instance.
      Specified by:
      createControlViewModel in class AbstractControlComponent<IValue<M>,ILabeledParametrization,VM extends CheckableLabelViewModel>
      Returns:
      a newly created control view model.
    • createCheckedLabelViewModel

      protected VM createCheckedLabelViewModel()
      Creates view model.
      Returns:
      the checked label view model, cannot be null
    • convertBooleanToValue

      protected M convertBooleanToValue(Boolean viewValue)
      Converts the checkbox state value to model value.
      Parameters:
      value - the boolean value, cannot be null
      Returns:
      the model value, cannot be null
    • convertValueToBoolean

      protected Boolean convertValueToBoolean(M modelValue)
      Converts the model value to the checkbox state.
      Parameters:
      modelValue - the model value, cannot be null
      Returns:
      the boolean value, cannot be null