borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.control
java.lang.Object +----borland.jbcl.control.ColorChooser
Variables Constructors Properties Methods Event Listeners
Implements WindowListener, EventListener
A wrapper for ColorChooserDialog, which allows graphical selection of color values. This creates a data-aware, fully-enabled version of ColorChooserDialog.
After adding a ColorChooser to your program using the UI Designer, you usually need to set the frame to this, in the Component Inspector. Otherwise, the ColorChooser will not appear when you try to open it.
Relationship of the JBCL color chooser classes:
public static final int CANCEL = ButtonDialog.CANCEL
public static final int OK = ButtonDialog.OK
protected Array aList
protected ColorChooserDialog dialog
protected Component focus
protected Frame frame
protected int result
protected String title
protected Color value
public ColorChooser()Creates a new color chooser dialog box without a frame or any title bar text. No initial color value is selected.
public ColorChooser(java.awt.Frame frame)Creates a new color chooser dialog, specifying the frame as the parent, with no title bar text. No initial color value is selected.
Parameters:
public ColorChooser(java.awt.Frame frame, java.lang.String title)Creates a new color chooser dialog using the specified frame and title bar text. No initial color value is selected.
Parameters:
public ColorChooser(java.awt.Frame frame, java.lang.String title, java.awt.Color value)Creates a new color chooser dialog. If a frame is specified, the dialog is created using ColorChooserDialog.
Parameters:
public Frame getFrame() public void setFrame(java.awt.Frame frame)The parent frame of the color chooser dialog box.
public int getResult() public void setResult(int i)Uses jbcl.control.ButtonDialog.setResult() or getResult(), to determine whether OK or Cancel was clicked. (See the result property, not the result variable, in that file.)
public String getTitle() public void setTitle(java.lang.String title)The title text of the color chooser dialog box, usually shown in the title bar.
public Color getValue() public void setValue(java.awt.Color value)The active color value. Typically, this value determines the color that is initially displayed when the dialog box appears.
public boolean isVisible() public void setVisible(boolean visible)The visible property stores whether this ColorChooser is visible. true, by default.
Returns java.awt.Component.isVisible() for this dialog box. If this dialog box is null, returns false.
public void show()Displays a color chooser dialog box (if the default constructor was invoked), registers itself as a window listener for the dialog box, and shows the dialog using java.awt.Dialog.show().
public void addActionListener(java.awt.event.ActionListener l) public void removeActionListener(java.awt.event.ActionListener l)