Class DHTMLSuite.colorWidget
Object
|
+--DHTMLSuite.colorWidget
- class
DHTMLSuite.colorWidget
This class provides some methods for working with colors.
Defined in dhtml-suite-for-applications.js
Author: Alf Magne Kalleland(www.dhtmlgoodies.com)
Version: 1.0
circleOffsetBecauseOfWinWidget
Object circleOffsetBecauseOfWinWidget
circleOffsetSize
Object circleOffsetSize
colorHelper
Object colorHelper
currentBrightness
Object currentBrightness
currentHue
Object currentHue
currentRgbCode
Object currentRgbCode
currentSaturation
Object currentSaturation
displayHsv
Object displayHsv
displayRgb
Object displayRgb
displayRgbCode
Object displayRgbCode
hueSliderPosition
Object hueSliderPosition
layoutCSS
Object layoutCSS
objectIndex
Object objectIndex
paletteSize
Object paletteSize
posdivElPalette
Object posdivElPalette
updateFormDuringMoveOnPalette
Object updateFormDuringMoveOnPalette
DHTMLSuite.colorWidget
DHTMLSuite.colorWidget(propertyArray)
Parameters:
Array
- properties - Possible keys: hueSliderPosition("horizontal" or "vertical"(default): displayHsv (true or false if hsv form fields should be shown - true is default) displayRgb (true or false if rgb form fields should be shown - true is default) displayRgbCode ( true or false if the rgb code field should be shown - true is default) callbackOnChangeRgb ( callback function to execute when rgb code changes) updateFormDuringMoveOnPalette - Update the form with hsv and rgb codes during drag on palette(default = true) - setting this value to false spees up the widget a little bit css file used for this widget: color-widget.css Demo: (demo 1)
Author: Alf Magne Kalleland(www.dhtmlgoodies.com)
Version: 1.0
__initHorHueMove
Object __initHorHueMove(e)
__initHueMove
Object __initHueMove(e)
getDivElement
Object getDivElement()
Return a reference to main div element for the widget.
init
void init()
setBrightness
void setBrightness(brightness)
Parameters:
Int
- brightness - value between 0 and 100
setCallbackOnChangeRgb
void setCallbackOnChangeRgb(functionName)
Specify call back function which is executed when the rgb value is modified. Only the name of the function should be sent to this method.
When the callback is executed, an associative array will be sent as argument. Keys in this array will be rgb,hue,saturation and brightness.
Parameters:
String
- functionName - Name of function to execute when the rgb color is changed.
setHue
void setHue(hue)
Set new hue, i.e. position on the color circle.
Parameters:
Int
- hue - value between 0 and 359
setHueSliderPosition
void setHueSliderPosition(hueSliderPosition)
Specify position of hue slider, vertical or horizontal
Parameters:
String
- hueSliderPosition - Hue slider position - "vertical" or "horizontal"
setRgbColor
void setRgbColor(rgbColor)
Set new rgb color for the slider.
setSaturation
void setSaturation(saturation)
Set new saturation, i.e. amount of color(hue)
Parameters:
Int
- saturation - value between 0 and 100
Documentation generated by
JSDoc on Mon Oct 8 10:17:27 2007