Packageorg.aswing.colorchooser
Interfacepublic interface ColorSelectionModel
ImplementorsDefaultColorSelectionModel

See also

org.aswing.ASColor


Public Methods
 MethodDefined by
  
addChangeListener(func:Function):void
addChangeListener(func:Function)

Add a listener to listen the Model's change event.

ColorSelectionModel
  
addColorAdjustingListener(func:Function):void
addColorAdjustingListener(func:Function)
bject)

Add a listener to listen the color adjusting event.

ColorSelectionModel
  
Fires a event to indicate a color is adjusting, for example: durring swatched rollover or mixer modification.
ColorSelectionModel
  
Returns the selected ASColor which should be non-null.
ColorSelectionModel
  
removeChangeListener(func:Function):void
removeChangeListener(func:Fuction)

Remove the changeListener

ColorSelectionModel
  
removeColorAdjustingListener(func:Function):void
removeColorAdjustingListener(func:Fuction)

Remove the colorAdjustingListener

ColorSelectionModel
  
Sets the selected color to ASColor.
ColorSelectionModel
Method detail
addChangeListener()method
public function addChangeListener(func:Function):void

addChangeListener(func:Function)

Add a listener to listen the Model's change event.

When the selected color changed. onStateChanged(source:ColorSelectionModel) Parameters

func:Function

See also

org.aswing.event.InteractiveEvent.STATE_CHANGED
flash.events.EventDispatcher.addEventListener()
addColorAdjustingListener()method 
public function addColorAdjustingListener(func:Function):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) Parameters

func:Function

See also

org.aswing.event.ColorChooserEvent.COLOR_ADJUSTING
flash.events.EventDispatcher.addEventListener()
fireColorAdjusting()method 
public 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. Parameters

color:ASColor — the new adjusting ASColor

See also

getSelectedColor()method 
public function getSelectedColor():ASColor

Returns the selected ASColor which should be non-null.

Returns
ASColor — the selected ASColor

See also

removeChangeListener()method 
public function removeChangeListener(func:Function):void

removeChangeListener(func:Fuction)

Remove the changeListener

Parameters

func:Function

See also

flash.events.EventDispatcher.removeEventListener()
removeColorAdjustingListener()method 
public function removeColorAdjustingListener(func:Function):void

removeColorAdjustingListener(func:Fuction)

Remove the colorAdjustingListener

Parameters

func:Function

See also

flash.events.EventDispatcher.removeEventListener()
setSelectedColor()method 
public 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.

Parameters
color:ASColor — the new ASColor

See also