Class ColorChooserPanel

    • Constructor Detail

      • ColorChooserPanel

        public ColorChooserPanel()
        Initializes the panel with BLACK.
      • ColorChooserPanel

        public ColorChooserPanel​(Color color)
        Initializes the panel with the given color.
        Parameters:
        color - the color to use
    • Method Detail

      • doChoose

        protected Color doChoose()
        Performs the actual choosing of an object.
        Specified by:
        doChoose in class AbstractChooserPanel<Color>
        Returns:
        the chosen object or null if none chosen
      • toString

        protected String toString​(Color value)
        Converts the value into its string representation.
        Specified by:
        toString in class AbstractChooserPanel<Color>
        Parameters:
        value - the value to convert
        Returns:
        the generated string
      • fromString

        protected Color fromString​(String value)
        Converts the string representation into its object representation.
        Specified by:
        fromString in class AbstractChooserPanel<Color>
        Parameters:
        value - the string value to convert
        Returns:
        the generated object
      • isValid

        protected boolean isValid​(String value)
        Checks whether the string value is valid and can be parsed.
        Overrides:
        isValid in class AbstractChooserPanel<Color>
        Parameters:
        value - the value to check
        Returns:
        true if valid