All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.ColorChooser

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.ColorChooser

public class ColorChooser
extends JComponent
implements LayoutManager

Constructor Index

 o ColorChooser()

Method Index

 o addLayoutComponent(String, Component)
 o ask(JFrame, String, Color, ChangeListener)
Convenience method to prompt for a color.
 o getColor()
 o getIntColor()
 o getValue()
 o layoutContainer(Container)
 o minimumLayoutSize(Container)
 o preferredLayoutSize(Container)
 o removeLayoutComponent(Component)
 o setColor(Color)
 o setColor(int)
 o setColor(int, int, int)
 o setValue(Object)

Constructors

 o ColorChooser
 public ColorChooser()

Methods

 o ask
 public static Color ask(JFrame parent,
                         String title,
                         Color initial,
                         ChangeListener target)
Convenience method to prompt for a color.

Parameters:
fparent - the parent frame for the dialog box. fparent may be null if a default parent has been established with StandardDialog
title - a title for the dialog box
initial - the initial color
target - the ChangeListener that will be informed if the OK or Apply buttons are hit.
Returns:
If target is null, the dialog box will be modal and the method will return the final result, or null if cancelled. Otherwise, the dialog box is non-modal, the method returns null immediatly, and the listener is informed when appropriate. The source of the change event will be a ColorChooser.
See Also:
StandardDialog
 o addLayoutComponent
 public void addLayoutComponent(String name,
                                Component comp)
 o removeLayoutComponent
 public void removeLayoutComponent(Component comp)
 o preferredLayoutSize
 public Dimension preferredLayoutSize(Container parent)
 o minimumLayoutSize
 public Dimension minimumLayoutSize(Container parent)
 o setColor
 public void setColor(int r,
                      int g,
                      int b)
 o setColor
 public void setColor(Color c)
 o setColor
 public void setColor(int c)
 o getColor
 public Color getColor()
 o getIntColor
 public int getIntColor()
 o getValue
 public Object getValue()
 o setValue
 public void setValue(Object o)
 o layoutContainer
 public void layoutContainer(Container parent)

All Packages  Class Hierarchy  This Package  Previous  Next  Index