Class ColorPickerGrid

    • Constructor Detail

      • ColorPickerGrid

        public ColorPickerGrid()
        Instantiates a new color picker grid.
      • ColorPickerGrid

        public ColorPickerGrid​(int rows,
                               int columns)
        Instantiates a new color picker grid.
        Parameters:
        rows - the rows
        columns - the columns
      • ColorPickerGrid

        public ColorPickerGrid​(com.vaadin.shared.ui.colorpicker.Color[][] colors)
        Instantiates a new color picker grid.
        Parameters:
        colors - the colors
    • Method Detail

      • setColorGrid

        public void setColorGrid​(com.vaadin.shared.ui.colorpicker.Color[][] colors)
        Sets the color grid.
        Parameters:
        colors - the new color grid
      • setPosition

        public void setPosition​(int x,
                                int y)
        Sets the position.
        Parameters:
        x - the x
        y - the y
      • getPosition

        public int[] getPosition()
        Gets the position.
        Returns:
        the position
      • 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 value, 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
      • getState

        protected com.vaadin.shared.ui.colorpicker.ColorPickerGridState 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.ColorPickerGridState 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()