Class ColorComponentM2TConverterFactory

  • All Implemented Interfaces:
    org.eclipse.core.databinding.conversion.IConverter<Color,​Integer>

    public abstract class ColorComponentM2TConverterFactory
    extends org.eclipse.core.databinding.conversion.Converter<Color,​Integer>
    This class is a factory of model to target converters, which are intended to be used while (data-)binding an observable Color model object to a target control. The control itself reflects either red, or green, or blue color component.
    Factory usage is either red(), or green(), or blue().
    It would be great if one could use library data binding like PojoObservables#observeDetailValue(), however it is impossible since Color class provides neither getters, nor setters for its red, green, and blue fields.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ColorComponentM2TConverterFactory()
      Initializes the superclass with the correct class objects.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.eclipse.core.databinding.conversion.IConverter<Color,​Integer> blue()
      Creates a new model to target converter to be used when binding an observable Color object (model) with a control reflecting blue color component (target).
      static org.eclipse.core.databinding.conversion.IConverter<Color,​Integer> green()
      Creates a new model to target converter to be used when binding an observable Color object (model) with a control reflecting green color component (target).
      static org.eclipse.core.databinding.conversion.IConverter<Color,​Integer> red()
      Creates a new model to target converter to be used when binding an observable Color object (model) with a control reflecting red color component (target).
      • Methods inherited from class org.eclipse.core.databinding.conversion.Converter

        getFromType, getToType
      • Methods inherited from interface org.eclipse.core.databinding.conversion.IConverter

        convert
    • Constructor Detail

      • ColorComponentM2TConverterFactory

        protected ColorComponentM2TConverterFactory()
        Initializes the superclass with the correct class objects.
    • Method Detail

      • red

        public static org.eclipse.core.databinding.conversion.IConverter<Color,​Integer> red()
        Creates a new model to target converter to be used when binding an observable Color object (model) with a control reflecting red color component (target).
        Returns:
        converter from model to target, whereas model is an observable Color object and target is a control reflecting red color component
      • green

        public static org.eclipse.core.databinding.conversion.IConverter<Color,​Integer> green()
        Creates a new model to target converter to be used when binding an observable Color object (model) with a control reflecting green color component (target).
        Returns:
        converter from model to target, whereas model is an observable Color object and target is a control reflecting green color component
      • blue

        public static org.eclipse.core.databinding.conversion.IConverter<Color,​Integer> blue()
        Creates a new model to target converter to be used when binding an observable Color object (model) with a control reflecting blue color component (target).
        Returns:
        converter from model to target, whereas model is an observable Color object and target is a control reflecting blue color component