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

public class SwatchPanel extends JPanel
SwatchPanel.

Code derived from javax.swing.colorchooser.DefaultSwatchChooserPanel.

Version:
1.0 30 March 2005 Created.
See Also:
  • Field Details

    • colors

      protected Color[] colors
    • swatchSize

      protected Dimension swatchSize
    • defaultSwatchSize

      protected Dimension defaultSwatchSize
    • numSwatches

      protected Dimension numSwatches
    • gap

      protected Dimension gap
  • Constructor Details

    • SwatchPanel

      public SwatchPanel()
      Creates new form.
  • Method Details

    • initComponents

      private void initComponents()
      This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
    • isFocusable

      public boolean isFocusable()
      Overrides:
      isFocusable in class Component
    • initValues

      protected void initValues()
    • setBounds

      public void setBounds(int x, int y, int width, int height)
      Overrides:
      setBounds in class Component
    • setColors

      public void setColors(Color[] colors)
    • setNumSwatches

      public void setNumSwatches(int rows, int columns)
    • paintComponent

      public void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • getSwatchesSize

      public Dimension getSwatchesSize()
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class JComponent
    • initColors

      protected void initColors()
    • getToolTipText

      public String getToolTipText(MouseEvent e)
      Overrides:
      getToolTipText in class JComponent
    • getColorForLocation

      public Color getColorForLocation(int x, int y)
    • getColorForCell

      private Color getColorForCell(int column, int row)