inputEx Documentation Back to homepage

inputEx Documentation > inputEx.ColorField2 0.2.2

Static Class inputEx.ColorField2 - extends inputEx.Field

Create a Color picker input field

Constructor

inputEx.ColorField2 ( options )
Parameters:
options <Object>  - inputEx.Field options object

Properties

cellHeight - Object

Height of every color cell

cellPerLine - Object

How many color cells shall be shown in every line in the popup panel. if defined, cellPerLine*squareWidth+leftMargin = popupPanel.width, otherwise, there is a formula to determine cell size

cellWidth - Object

Width of every color cell. cellPerLine*squareWidth+leftMargin = popupPanel.width

static  groupOptions - Object

group Options for each field

leftMargin - Object

cellPerLine*squareWidth+leftMargin = popupPanel.width

options - Object

Configuration object to set the options for this class and the parent classes. See constructor details for options added by this class.

static  palettes - Object

Default palettes

ratio - Object

x:y ratio to list color cell, it is used only if cellPerLine is not defined. Default is 16:9

Methods

close

close()
Call closeColorPopUp when field is removed

closeColorPopUp

closeColorPopUp()
Close the popup

gettValue

gettValue()
Get the value

initEvents

initEvents()
Register the click and blur events

onColorClick

onColorClick(e)
Handle a color selection
Parameters:
    <Event>  - The original click event

renderColorGrid

renderColorGrid()
This creates a color grid

renderComponent

renderComponent()
Render the color button and the colorpicker popup

renderPopUp

renderPopUp()
Render the color popup

setDefaultColors

<Array> setDefaultColors(index)
Set the colors to set in the picker
Parameters:
    index <int>  - Index of the palette to use
Returns:
    <Array> List of colors to choose from

setValue

setValue(value)
Set the value
Parameters:
    value <String>  - Color to set

toggleColorPopUp

toggleColorPopUp()
Toggle the color picker popup




Copyright (c) 2007-2009 Eric Abouaf. All rights reserved.
Generated by JsDoc Toolkit 2.0.0 on Wed, 04 Mar 2009 15:41:30 GMT using neyricjslibs-template.