CPObjectCPResponder
CPWindow
CPPanel
CPColorPanel
@implementation CPColorPanel : CPPanel
CPColorPanel
provides a reusable panel that can be used
displayed on screen to prompt the user for a color selection. To
obtain the panel, call the sharedColorPanel
method.
Method Summary | |
---|---|
+(void) | setPickerMode:(CPColorPanelMode)mode Returns the shared color panel set to display in mode . |
+(CPColorPanel) | sharedColorPanel Returns (and if necessary, creates) the shared color panel. |
-(selector) | action Returns the current target action. |
-(CPColor) | color Returns the panel's currently selected color. |
-(CPColorPanelMode) | mode Returns the color panel's current display mode. |
-(void) | orderFront:(id)aSender Makes the receiver the front most window in the screen ordering. |
-(void) | setAction:(selector)anAction Sets the action that gets sent to the target. |
-(void) | setColor:(CPColor)aColor Sets the color of the panel, and updates the picker. |
-(void) | setMode:(CPColorPanelMode)mode Sets the mode (look) of the color panel. |
-(void) | setTarget:(id)aTarget Sets the target for the color panel. |
-(id) | target Returns the current target. |
Methods inherited from class CPPanel |
---|
becomesKeyOnlyIfNeeded, canBecomeMainWindow, isFloatingPanel, setBecomesKeyOnlyIfNeeded, setFloatingPanel, setWorksWhenModal, worksWhenModal |
Method Detail |
---|
+(void)setPickerMode:(CPColorPanelMode)mode
mode
.mode
- the mode to which the color panel will be set before returning+(CPColorPanel)sharedColorPanel
-(selector)action
-(CPColor)color
-(CPColorPanelMode)mode
-(void)orderFront:(id)aSender
aSender
- the object that requested this-(void)setAction:(selector)anAction
anAction
- the action that will be sent-(void)setColor:(CPColor)aColor
CPColorPanelDidChangeNotification
.aColor
-(void)setMode:(CPColorPanelMode)mode
mode
- the mode in which to display the color panel-(void)setTarget:(id)aTarget
aTarget
-(id)target
Created on Sat Sep 13 14:15:43 PDT 2008