Class ColorPickerPopup

    • Constructor Detail

      • ColorPickerPopup

        public ColorPickerPopup​(Color initialColor)
        Instantiates a new color picker popup.
        Parameters:
        initialColor - the initially selected color
    • Method Detail

      • getHistory

        public ColorPickerHistory getHistory()
        Gets the history.
        Returns:
        the history
      • setValue

        public void setValue​(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<Color>
        Parameters:
        color - the new value, not null
        Throws:
        NullPointerException - if color is null
      • 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.

        Specified by:
        getValue in interface HasValue<Color>
        Returns:
        the current value
      • addValueChangeListener

        public Registration addValueChangeListener​(HasValue.ValueChangeListener<Color> listener)
        Description copied from interface: HasValue
        Adds a value change listener. The listener is called when the value of this HasValue is changed either by the user or programmatically.
        Specified by:
        addValueChangeListener in interface HasValue<Color>
        Parameters:
        listener - the value change listener, not null
        Returns:
        a registration for the listener
      • getColorHistory

        public List<Color> getColorHistory()
        Gets the color history.
        Returns:
        the color history
      • setRGBTabVisible

        public void setRGBTabVisible​(boolean visible)
        Sets the RGB tab visibility.
        Parameters:
        visible - The visibility of the RGB tab
      • setHSVTabVisible

        public void setHSVTabVisible​(boolean visible)
        Sets the HSV tab visibility.
        Parameters:
        visible - The visibility of the HSV tab
      • setSwatchesTabVisible

        public void setSwatchesTabVisible​(boolean visible)
        Sets the visibility of the Swatches tab.
        Parameters:
        visible - The visibility of the Swatches tab
      • setHistoryVisible

        public void setHistoryVisible​(boolean visible)
        Sets the visibility of the History.
        Parameters:
        visible - true to show the history, false to hide it
      • setPreviewVisible

        public void setPreviewVisible​(boolean visible)
        Sets the preview visibility.
        Parameters:
        visible - true to show the preview, false to hide it
      • setReadOnly

        public void setReadOnly​(boolean readOnly)
        Description copied from class: AbstractComponent
        Sets the read-only status in the state of this AbstractComponent. This method should be made public in Components that implement HasValue.
        Specified by:
        setReadOnly in interface HasValue<Color>
        Overrides:
        setReadOnly in class AbstractComponent
        Parameters:
        readOnly - a boolean value specifying whether the component is put read-only mode or not
      • setModal

        public void setModal​(boolean modal)
        Description copied from class: Window
        Sets window modality. When a modal window is open, components outside that window cannot be accessed.

        Keyboard navigation is restricted by blocking the tab key at the top and bottom of the window by activating the tab stop function internally.

        Overrides:
        setModal in class Window
        Parameters:
        modal - true if modality is to be turned on