Class VisualColor

All Implemented Interfaces:
ComponentProducer, VisualObject

public class VisualColor extends AbstractVisualObject
The VisualColor class represents a color as a button with an icon of the color. When the button is pressed, a JColorChooser appears that allows the user to select a color.
Since:
3.1.7
Author:
Peter Hollemans
  • Constructor Details

    • VisualColor

      public VisualColor(Color color)
      Creates a new visual color object using the specified color.
  • Method Details

    • getComponent

      public Component getComponent()
      Gets the button used to represent the color.
    • getValue

      public Object getValue()
      Gets the color value.
      Returns:
      the value that this visual object currently holds.
    • main

      public static void main(String[] argv)
      Tests this class.
      Parameters:
      argv - the array of command line parameters.