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
      • setColor

        public void setColor​(Color color)
        Description copied from interface: ColorSelector
        Sets the color.
        Specified by:
        setColor in interface ColorSelector
        Parameters:
        color - the new color
      • 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
      • fireColorChanged

        public void fireColorChanged​(Color color)
        Notifies the listeners that a color change has occurred
        Parameters:
        color - The color which it changed to
      • 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 AbstractComponent
        Returns:
        updated component shared state