summaryrefslogtreecommitdiff
path: root/javax/swing/colorchooser/ColorChooserComponentFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/colorchooser/ColorChooserComponentFactory.java')
-rw-r--r--javax/swing/colorchooser/ColorChooserComponentFactory.java78
1 files changed, 40 insertions, 38 deletions
diff --git a/javax/swing/colorchooser/ColorChooserComponentFactory.java b/javax/swing/colorchooser/ColorChooserComponentFactory.java
index ffd8718ea..6e7ca33d7 100644
--- a/javax/swing/colorchooser/ColorChooserComponentFactory.java
+++ b/javax/swing/colorchooser/ColorChooserComponentFactory.java
@@ -35,49 +35,51 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
package javax.swing.colorchooser;
import javax.swing.JComponent;
+
/**
* ColorChooserComponentFactory
- * @author Andrew Selkirk
- * @version 1.0
+ *
+ * @author Andrew Selkirk
+ * @version 1.0
*/
-public class ColorChooserComponentFactory {
-
- //-------------------------------------------------------------
- // Initialization ---------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * Constructor ColorChooserComponentFactory
- */
- private ColorChooserComponentFactory() {
- // TODO
- } // ColorChooserComponentFactory()
-
-
- //-------------------------------------------------------------
- // Methods ----------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * getDefaultChooserPanels
- * @returns AbstractColorChooserPanel[]
- */
- public static AbstractColorChooserPanel[] getDefaultChooserPanels() {
- return null; // TODO
- } // getDefaultChooserPanels()
-
- /**
- * getPreviewPanel
- * @returns JComponent
- */
- public static JComponent getPreviewPanel() {
- return null; // TODO
- } // getPreviewPanel()
-
-
+public class ColorChooserComponentFactory
+{
+ /**
+ * Constructor ColorChooserComponentFactory
+ */
+ private ColorChooserComponentFactory()
+ {
+ } // ColorChooserComponentFactory()
+
+ /**
+ * This method returns the three default chooser panels to be used in
+ * JColorChooser.
+ *
+ * @return The default chooser panels.
+ */
+ public static AbstractColorChooserPanel[] getDefaultChooserPanels()
+ {
+ AbstractColorChooserPanel[] values =
+ {
+ new DefaultSwatchChooserPanel(),
+ new DefaultHSBChooserPanel(),
+ new DefaultRGBChooserPanel()
+ };
+ return values;
+ }
+
+ /**
+ * This method returns the default preview panel to be used with
+ * JColorChoosers.
+ *
+ * @return The default preview panel.
+ */
+ public static JComponent getPreviewPanel()
+ {
+ return new DefaultPreviewPanel();
+ } // getPreviewPanel()
} // ColorChooserComponentFactory