Class ColorPickerGradient

    • Constructor Detail

      • ColorPickerGradient

        public ColorPickerGradient​(java.lang.String id,
                                   AbstractColorPicker.Coordinates2Color converter)
        Instantiates a new color picker gradient.
        Parameters:
        id - the id
        converter - the converter
    • Method Detail

      • setValue

        public void setValue​(com.vaadin.shared.ui.colorpicker.Color color)
        Sets the value of this object. If the new value is not equal to getValue(), fires a HasValue.ValueChangeEvent. Throws NullPointerException if the value is null.
        Specified by:
        setValue in interface HasValue<com.vaadin.shared.ui.colorpicker.Color>
        Overrides:
        setValue in class AbstractField<com.vaadin.shared.ui.colorpicker.Color>
        Parameters:
        color - the new color, not null
        Throws:
        java.lang.NullPointerException - if color is null
      • getValue

        public com.vaadin.shared.ui.colorpicker.Color getValue()
        Description copied from interface: HasValue
        Returns the current value of this object.

        Implementation note: the implementing class should document whether null values may be returned or not.

        Returns:
        the current value
      • doSetValue

        protected void doSetValue​(com.vaadin.shared.ui.colorpicker.Color color)
        Description copied from class: AbstractField
        Sets the value of this field. May do sanitization or throw IllegalArgumentException if the value is invalid. Typically saves the value to shared state.
        Specified by:
        doSetValue in class AbstractField<com.vaadin.shared.ui.colorpicker.Color>
        Parameters:
        color - the new value of the field
      • setBackgroundColor

        public void setBackgroundColor​(com.vaadin.shared.ui.colorpicker.Color color)
        Sets the background color.
        Parameters:
        color - the new background color
      • getState

        protected com.vaadin.shared.ui.colorpicker.ColorPickerGradientState getState()
        Description copied from class: AbstractComponent
        Returns the shared state bean with information to be sent from the server to the client. Subclasses should override this method and set any relevant fields of the state returned by super.getState().
        Overrides:
        getState in class AbstractField<com.vaadin.shared.ui.colorpicker.Color>
        Returns:
        updated component shared state
      • getState

        protected com.vaadin.shared.ui.colorpicker.ColorPickerGradientState getState​(boolean markAsDirty)
        Description copied from class: AbstractClientConnector
        Returns the shared state for this connector.
        Overrides:
        getState in class AbstractField<com.vaadin.shared.ui.colorpicker.Color>
        Parameters:
        markAsDirty - true if the connector should automatically be marked dirty, false otherwise
        Returns:
        The shared state for this connector. Never null.
        See Also:
        AbstractClientConnector.getState()