Public Member Functions | |
| void | ColorSelector () |
| Boolean | run () |
| void ColorSelector::ColorSelector | ( | ) |
| Boolean ColorSelector::run | ( | ) |
Functional part of this snippet, creates a Window and its ScriptUI components. Defines three panels: an instruction panel, a panel that displays the current color values, and a control panel.
The control panel contains radio buttons to choose the background or foreground, and sliders to choose new color values. As the sliders move, their event handlers apply the new colors to the background or foreground of the window. The event handlers use a helper function, changeColor(), which actually performs the color change, by creating Pen and Brush objects and using them to set the color properties of the graphics objects associated with the window and with each panel.


Copyright© 2008 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks