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​(Color[][] colors)
        Instantiates a new color picker grid.
        Parameters:
        colors - the colors
    • Method Detail

      • setColorGrid

        public void setColorGrid​(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
      • getValue

        public 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​(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<Color>
        Parameters:
        color - the new value of the field
      • getState

        protected 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<Color>
        Returns:
        updated component shared state