Class HexStringT2MConverter

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

    public class HexStringT2MConverter
    extends org.eclipse.core.databinding.conversion.Converter<String,​Color>
    This class is a target to model converter, which is intended to be used while (data-)binding an observable target that represents the color as a hex string ("RRGGBB") to an observable Color model object.
    • Constructor Detail

      • HexStringT2MConverter

        public HexStringT2MConverter()
        Creates a target to model converter, which is intended to be used while (data-)binding an observable target that represents the color as a hex string ("RRGGBB") to an observable Color model object.
    • Method Detail

      • convert

        public Color convert​(String fromObject)
        Creates a Color object out of the provided hex string ("RRGGBB"). The string must be 6 characters long and it must contain only valid hex characters