interface org.aswing.colorchooser.ColorSelectionModel
Implementors | ||||
DefaultColorSelectionModel |
|
@author paling
A model that supports selecting a Color
.
@see org.aswing.ASColor
Instance Fields
function addChangeListener(func:Dynamic ->Void): Void
addChangeListener(func:Function)
Add a listener to listen the Model's change event.
When the selected color changed.
onStateChanged(source:ColorSelectionModel) @see org.aswing.event.InteractiveEvent#STATE_CHANGED @see flash.events.EventDispatcher#addEventListener()
function addColorAdjustingListener(func:Dynamic ->Void): Void
addColorAdjustingListener(func:Function)
bject)
Add a listener to listen the color adjusting event.
When user adjusting to a new color.
onColorAdjusting(source:ColorSelectionModel, color:ASColor) @see org.aswing.event.ColorChooserEvent#COLOR_ADJUSTING @see flash.events.EventDispatcher#addEventListener()
function fireColorAdjusting(color:ASColor): Void
Fires a event to indicate a color is adjusting, for example: durring swatched rollover or mixer modification.
This should be called by AsWing core(generally called by UI classes), client app should not call this generally.
@see #addColorAdjustingListener()
color | the new adjusting |
function getSelectedColor(): ASColor
Returns the selected ASColor
which should be
non-null
.
@see #setSelectedColor()
returns | the selected |
function removeChangeListener(func:Dynamic ->Void): Void
removeChangeListener(func:Fuction)
Remove the changeListener
@see flash.events.EventDispatcher#removeEventListener()
function removeColorAdjustingListener(func:Dynamic ->Void): Void
removeColorAdjustingListener(func:Fuction)
Remove the colorAdjustingListener
@see flash.events.EventDispatcher#removeEventListener()
function setSelectedColor(color:ASColor): Void
Sets the selected color to ASColor
.
Note that setting the color to null
is undefined and may have unpredictable results.
This method fires a state changed event if it sets the
current color to a new non-null
color.
@see #getSelectedColor() @see #addChangeListener()
color | the new |