Yahoo! UI Library

codecola-gradient  1.0.0

Yahoo! UI Library > codecola-gradient > Y.codecolaGradient
Search:
 
Filters

Class Y.codecolaGradient - extends Widget

a gradient control for css3 property

Constructor

Y.codecolaGradient ( config )
Parameters:
config <Object> Object literal specifying codecolaGradient configuration properties.

Methods

able

void able ( )
able all controls
Returns: void
Chainable: This method is chainable.

disable

void disable ( )
disable all controls
Returns: void
Chainable: This method is chainable.

getGradient

String|Object getGradient ( , isPanel )
get the current gradient
Parameters:
<Boolean} isAll if return all of webkit|moz|o|ms gradient {webkit:xxx, moz:xxx, o:xxx, ms:xxx>
isPanel <Boolean> if for update panel
Returns: String|Object

setGradient

void setGradient ( param.gradient )
update the attribute 'gradient', init all the controls, fire the onChange event
Parameters:
param.gradient <Object> for update the attribute 'gradient'
Returns: void
Chainable: This method is chainable.

Events

gradientChange

gradientChange ( event )
Fires when the value for the configuration attribute 'gradient' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

isAllChange

isAllChange ( event )
Fires when the value for the configuration attribute 'isAll' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

onChangeChange

onChangeChange ( event )
Fires when the value for the configuration attribute 'onChange' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

onInitChange

onInitChange ( event )
Fires when the value for the configuration attribute 'onInit' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

panelWidthChange

panelWidthChange ( event )
Fires when the value for the configuration attribute 'panelWidth' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

wrapChange

wrapChange ( event )
Fires when the value for the configuration attribute 'wrap' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Configuration Attributes

gradient - String

gradient for init
Default Value: "-webkit-gradient(linear, 0% 0%, 100% 0%, from(#000), to(#fff))" or "-moz-linear-gradient(left , #000 0%, #fff 100%)" or "-o-linear-gradient(left , #000 0%, #fff 100%)" or "-ms-linear-gradient(left , #000 0%, #fff 100%)"

isAll - Boolean

if the param include all private property when run the callback
Default Value: false

onChange - Function

callback when gradient change
Default Value: function(){}

onInit - Function

callback when widget init
Default Value: function(){}

panelWidth - Number

the control's width
Default Value: 200

wrap - String

a css selector for Y.one(),controls will insert into the wrap
Default Value: 'body'


Copyright © 2011 Yahoo! Inc. All rights reserved.