1. /*
  2. * @(#)ColorChooserComponentFactory.java 1.17 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.swing.colorchooser;
  8. import javax.swing.*;
  9. /**
  10. * A class designed to produce preconfigured "accessory" objects to
  11. * insert into color choosers.
  12. *
  13. * <p>
  14. * <strong>Warning:</strong>
  15. * Serialized objects of this class will not be compatible with
  16. * future Swing releases. The current serialization support is
  17. * appropriate for short term storage or RMI between applications running
  18. * the same version of Swing. As of 1.4, support for long term storage
  19. * of all JavaBeans<sup><font size="-2">TM</font></sup>
  20. * has been added to the <code>java.beans</code> package.
  21. * Please see {@link java.beans.XMLEncoder}.
  22. *
  23. * @version 1.17 12/19/03
  24. * @author Steve Wilson
  25. */
  26. public class ColorChooserComponentFactory {
  27. private ColorChooserComponentFactory() { } // can't instantiate
  28. public static AbstractColorChooserPanel[] getDefaultChooserPanels() {
  29. AbstractColorChooserPanel[] choosers = { new DefaultSwatchChooserPanel(),
  30. new DefaultHSBChooserPanel(),
  31. new DefaultRGBChooserPanel() };
  32. return choosers;
  33. }
  34. public static JComponent getPreviewPanel() {
  35. return new DefaultPreviewPanel();
  36. }
  37. }