ColorPicker
that depicts a wide range of colors. This panel can operate in 6 different modes. In each mode a different property is held constant: hue, saturation, brightness, red, green, or blue. (Each property is identified with a constant in the ColorPicker
class, such as: ColorPicker.HUE
or ColorPicker.GREEN
.)
In saturation and brightness mode, a wheel is used. Although it doesn't use as many pixels as a square does: it is a very aesthetic model since the hue can wrap around in a complete circle. (Also, on top of looks, this is how most people learn to think the color spectrum, so it has that advantage, too). In all other modes a square is used.
The user can click in this panel to select a new color. The selected color is highlighted with a circle drawn around it. Also once this component has the keyboard focus, the user can use the arrow keys to traverse the available colors.
Note this component is public and exists independently of the ColorPicker
class. The only way this class is dependent on the ColorPicker
class is when the constants for the modes are used.
The graphic in this panel will be based on either the width or the height of this component: depending on which is smaller.
|
|
|
|
|
|