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
-
ColorChooser()
-
-
addLayoutComponent(String, Component)
-
-
ask(JFrame, String, Color, ChangeListener)
- Convenience method to prompt for a color.
-
getColor()
-
-
getIntColor()
-
-
getValue()
-
-
layoutContainer(Container)
-
-
minimumLayoutSize(Container)
-
-
preferredLayoutSize(Container)
-
-
removeLayoutComponent(Component)
-
-
setColor(Color)
-
-
setColor(int)
-
-
setColor(int, int, int)
-
-
setValue(Object)
-
ColorChooser
public ColorChooser()
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
addLayoutComponent
public void addLayoutComponent(String name,
Component comp)
removeLayoutComponent
public void removeLayoutComponent(Component comp)
preferredLayoutSize
public Dimension preferredLayoutSize(Container parent)
minimumLayoutSize
public Dimension minimumLayoutSize(Container parent)
setColor
public void setColor(int r,
int g,
int b)
setColor
public void setColor(Color c)
setColor
public void setColor(int c)
getColor
public Color getColor()
getIntColor
public int getIntColor()
getValue
public Object getValue()
setValue
public void setValue(Object o)
layoutContainer
public void layoutContainer(Container parent)
All Packages Class Hierarchy This Package Previous Next Index