Class DHTMLSuite.colorPalette
Object
|
+--DHTMLSuite.colorPalette
- class
DHTMLSuite.colorPalette
This class simply creates a color palette
Defined in dhtml-suite-for-applications.js
Author: Alf Magne Kalleland(www.dhtmlgoodies.com) css file used for this widget: color-widget.css Demo: (demo 1)
Version: 1.0
Method Summary |
void
|
addAllNamedColors()
Add all named colors to the palette
|
void
|
addAllWebColors()
Add all 216 web colors to the palette.
|
void
|
addColor(color,name)
Add a single color to the palette
|
void
|
addGrayScaleColors(numberOfColors,rangeFrom,rangeTo)
Add gray scale colors to the palette
|
Object
|
getDivElement()
Returns a reference to the div element for this widget.
|
void
|
init()
Initializes the widget.
|
void
|
setCallbackOnColorClick(functionName)
Specify callback function executed when user clicks on a color.
|
void
|
setLayoutCss(cssFileName)
Specify name of css file.
|
colorHelper
Object colorHelper
colors
Object colors
currentColor
Object currentColor
layoutCSS
Object layoutCSS
objectIndex
Object objectIndex
DHTMLSuite.colorPalette
DHTMLSuite.colorPalette(propertyArray)
Parameters:
colorProperties
- - associative array of palette properties, possible keys: width, callbackOnColorClick
Author: Alf Magne Kalleland(www.dhtmlgoodies.com) css file used for this widget: color-widget.css Demo: (demo 1)
Version: 1.0
addAllNamedColors
void addAllNamedColors()
Add all named colors to the palette
addAllWebColors
void addAllWebColors()
Add all 216 web colors to the palette.
addColor
void addColor(color,name)
Add a single color to the palette
Parameters:
String
- color - Rgb code of color, example. #FF0000
String
- name - Name of color (optional parameter)
addGrayScaleColors
void addGrayScaleColors(numberOfColors,rangeFrom,rangeTo)
Add gray scale colors to the palette
Parameters:
Int
- numberOfColors - Number of colors to add
Int
- rangeFrom - Optional parameter between 0 and 255(default is 0)
Int
- rangeTo - Optional parameter between 0 and 255 ( default is 255)
getDivElement
Object getDivElement()
Returns a reference to the div element for this widget.
Returns:
Object DivElement - Reference to div element.
init
void init()
Initializes the widget. Call this method after all colors has been added to the palette.
setCallbackOnColorClick
void setCallbackOnColorClick(functionName)
Specify callback function executed when user clicks on a color. A callback function cal also be specified in the constructor.
setLayoutCss
void setLayoutCss(cssFileName)
Specify name of css file.
Parameters:
String
- cssFileName - Name of css file. path will be the config path + this name.(DHTMLSuite.configObj.cssPath)
Documentation generated by
JSDoc on Mon Oct 8 10:17:27 2007