Class ColorPickerHistory

    • Constructor Detail

      • ColorPickerHistory

        public ColorPickerHistory()
        Instantiates a new color picker history.
    • Method Detail

      • attach

        public void attach()
        Description copied from interface: ClientConnector
        Notifies the connector that it is connected to a VaadinSession (and therefore also to a UI).

        The caller of this method is #setParent(ClientConnector) if the parent is itself already attached to the session. If not, the parent will call the ClientConnector.attach() for all its children when it is attached to the session. This method is always called before the connector's data is sent to the client-side for the first time.

        The attachment logic is implemented in AbstractClientConnector.

        Specified by:
        attach in interface ClientConnector
        Specified by:
        attach in interface Component
        Overrides:
        attach in class AbstractComponent
      • setHeight

        public void setHeight​(String height)
        Description copied from interface: Sizeable
        Sets the height of the component using String presentation. String presentation is similar to what is used in Cascading Style Sheets. Size can be length or percentage of available size. The empty string ("") or null will unset the height and set the units to pixels. See CSS specification for more details.
        Specified by:
        setHeight in interface Sizeable
        Overrides:
        setHeight in class AbstractComponent
        Parameters:
        height - in CSS style string representation
      • 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
      • getHistory

        public List<Color> getHistory()
        Gets the history.
        Returns:
        the history
      • hasColor

        public boolean hasColor​(Color c)
        Checks if the history contains given color.
        Parameters:
        c - the color
        Returns:
        true, if successful