java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.Crayons
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class Crayons extends JPanel
A panel which displays a selection of color crayons. The user can click at a crayon to pick a color.
See Also:
  • Constructor Details

    • Crayons

      public Crayons()
      Creates a new instance.
  • Method Details

    • createCrayonsImage

      protected Image createCrayonsImage()
    • createCrayons

      protected org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.Crayons.Crayon[] createCrayons()
      Creates the crayons.
      Returns:
      Array of crayons in z-order from bottom to top.
    • setColor

      public void setColor(Color newValue)
      Sets the current color. This results in a selection of a crayon, if a crayon with the same RGB values exists.
    • getColor

      public Color getColor()
      Returns the current color.
    • paintComponent

      public void paintComponent(Graphics gr)
      Overrides:
      paintComponent in class JComponent