Instances of this class allow the user to select a color from a predefined set of available colors.
IMPORTANT: This class is not intended to be subclassed.
Constructs a new instance of this class given only its parent.
| name | type | description |
|---|---|---|
| parent | org.eclipse.swt.widgets.Shell | a composite control which will be the parent of the new instance |
| IllegalArgumentException |
|
|
| SWTException |
|
|
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
The style value is either one of the style constants defined in
class SWT which is applicable to instances of this
class, or must be built by bitwise OR'ing together
(that is, using the int "|" operator) two or more
of those SWT style constants. The class description
lists the style constants that are applicable to the class.
Style bits are also inherited from superclasses.
| name | type | description |
|---|---|---|
| parent | org.eclipse.swt.widgets.Shell | a composite control which will be the parent of the new instance (cannot be null) |
| style | int | the style of control to construct |
| IllegalArgumentException |
|
|
| SWTException |
|
|
Makes the receiver visible and brings it to the front of the display.
Returns: the selected color, or null if the dialog was cancelled, no color was selected, or an error occurred
| SWTException |
|
|
Returns an array of RGBs which are the list of
custom colors selected by the user in the receiver, or null
if no custom colors were selected.
Returns: the array of RGBs, which may be null
Sets the receiver's list of custom colors to be the given array
of RGBs, which may be null to let the platform select
a default when open() is called.
| name | type | description |
|---|---|---|
| rgbs | org.eclipse.swt.graphics.RGB[] | the array of RGBs, which may be null |
| IllegalArgumentException |
|
|
Returns the currently selected color in the receiver.
Returns: the RGB value for the selected color, may be null
Sets the receiver's selected color to be the argument.
| name | type | description |
|---|---|---|
| rgb | org.eclipse.swt.graphics.RGB | the new RGB value for the selected color, may be null to let the platform select a default when open() is called |
Returns the receiver's parent, which must be a Shell
or null.
Returns: the receiver's parent
| SWTException |
|
|
getStyle() · also: get_styleReturns the receiver's style information.
Note that, the value which is returned by this method may not match the value which was provided to the constructor when the receiver was created.
Returns: the style bits
| SWTException |
|
|
getText() · also: get_textReturns the receiver's text, which is the string that the window manager will typically display as the receiver's title. If the text has not previously been set, returns an empty string.
Returns: the text
| SWTException |
|
|
setText(String string) · also: set_textSets the receiver's text, which is the string that the window manager will typically display as the receiver's title, to the argument, which must not be null.
| name | type | description |
|---|---|---|
| string | String | the new text |
| IllegalArgumentException |
|
|
| SWTException |
|
|