KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > colorchooser > ColorChooserComponentFactory


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
8 package javax.swing.colorchooser;
9
10 import javax.swing.*;
11
12
13
14 /**
15  * A class designed to produce preconfigured "accessory" objects to
16  * insert into color choosers.
17  *
18  * <p>
19  * <strong>Warning:</strong>
20  * Serialized objects of this class will not be compatible with
21  * future Swing releases. The current serialization support is
22  * appropriate for short term storage or RMI between applications running
23  * the same version of Swing. As of 1.4, support for long term storage
24  * of all JavaBeans<sup><font size="-2">TM</font></sup>
25  * has been added to the <code>java.beans</code> package.
26  * Please see {@link java.beans.XMLEncoder}.
27  *
28  * @version 1.17 12/19/03
29  * @author Steve Wilson
30  */

31 public class ColorChooserComponentFactory {
32
33     private ColorChooserComponentFactory() { } // can't instantiate
34

35
36     public static AbstractColorChooserPanel JavaDoc[] getDefaultChooserPanels() {
37         AbstractColorChooserPanel JavaDoc[] choosers = { new DefaultSwatchChooserPanel JavaDoc(),
38                          new DefaultHSBChooserPanel JavaDoc(),
39                          new DefaultRGBChooserPanel JavaDoc() };
40         return choosers;
41     }
42
43     public static JComponent getPreviewPanel() {
44         return new DefaultPreviewPanel JavaDoc();
45     }
46
47 }
48
Popular Tags