new Color(model)
A color input component.
Parameters:
Name | Type | Description |
---|---|---|
model |
ICE.UI.Model | The component model. |
Extends
Members
$dom :jQuery
- Inherited From:
The component's DOM.
Type:
$input :jQuery
- Inherited From:
The real input DOM element(s).
Type:
_form :ICE.UI.Form
- Inherited From:
The form.
Type:
_kids :Array.<ICE.UI.Base>|Object.<String, ICE.UI.Base>
- Inherited From:
The children components.
Type:
- Array.<ICE.UI.Base> | Object.<String, ICE.UI.Base>
_locked :Boolean
- Inherited From:
The flag whether component is locked.
Type:
- Boolean
_name :String
- Inherited From:
The name of component.
Type:
- String
_parent :ICE.UI.Base
- Inherited From:
The parent component.
Type:
alpha :boolean
The flag whether alpha channel should be available.
Default value is true.
Type:
- boolean
content :ICE.UI.Content
- Inherited From:
The model of component's content.
Type:
disabled :Boolean
- Inherited From:
The flag whether input is disabled.
Type:
- Boolean
hidden :Boolean
- Inherited From:
The flag whether component is hidden.
Type:
- Boolean
label :String
- Inherited From:
The label.
Type:
- String
lang :String
- Inherited From:
The language tag (if input is NLS-aware).
Type:
- String
messages :Array.<String>
- Inherited From:
The error messages.
Type:
- Array.<String>
model :ICE.UI.Model
- Inherited From:
The component model.
Type:
(nullable) palette :Array
The palette.
Type:
paletteonly :boolean
The flag whether palette should be hidden until "more" button is clicked
Default value is false.
Type:
- boolean
required :Boolean
- Inherited From:
The flag whether input value is required.
Type:
- Boolean
(nullable) selection :nge.Color
The selected color from palette.
Type:
value :*
- Inherited From:
The value.
Type:
- *
Methods
ancestor(type) → {ICE.UI.Base}
- Inherited From:
Returns ancestor of specified type.
Parameters:
Name | Type | Description |
---|---|---|
type |
ICE.UI.Base | The type to look for. |
Returns:
The UI component or null if there is none.
- Type
- ICE.UI.Base
disable()
- Inherited From:
Disables input.
enable()
- Inherited From:
Enables input.
error(message) → {boolean}
- Inherited From:
Adds error message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | The message. |
Returns:
false
- Type
- boolean
fixSelection(The)
Fixes Spectrum palette selection.
Parameters:
Name | Type | Description |
---|---|---|
The |
nge.Color | selected color. |
getSelection() → (nullable) {nge.Color}
Returns selected color from palette.
Returns:
color or null if no color is selected.
- Type
- nge.Color
has(name) → {Boolean}
- Inherited From:
Determines whether component has property set.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The property name. |
Returns:
true if it has property set, false otherwise.
- Type
- Boolean
hide()
- Inherited From:
Hides component.
html(formopt) → {jQuery}
- Overrides:
Returns component's DOM element.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
form |
ICE.UI.Form |
<optional> |
The form. |
Returns:
jQuery collection of DOM element.
- Type
- jQuery
htmlOf(content, formopt) → {jQuery}
- Inherited From:
Returns a collection of DOM elements of a content.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
content |
ICE.UI.Content | The content model. | |
form |
ICE.UI.Form |
<optional> |
The form. |
Returns:
jQuery collection of DOM element(s).
- Type
- jQuery
is(prop)
- Inherited From:
Determines value of boolean property.
Parameters:
Name | Type | Description |
---|---|---|
prop |
string | The property name. |
Returns:
true if property evaluates to true, false otherwise.
lock()
- Inherited From:
Locks root component.
onChange()
- Overrides:
Invoked when input value changes.
postHtml(form)
- Inherited From:
Invoked after html method invocation for component during modeling.
Parameters:
Name | Type | Description |
---|---|---|
form |
ICE.UI.Form | The form |
preHtml(form)
- Inherited From:
Invoked before html method invocation for component during modeling.
Parameters:
Name | Type | Description |
---|---|---|
form |
ICE.UI.Form | The form |
report()
- Inherited From:
Displays error messages.
show()
- Inherited From:
Shows component.
trigger(event)
- Inherited From:
Triggers custom event for component and its descendants.
Parameters:
Name | Type | Description |
---|---|---|
event |
String | The event name. |
unlock()
- Inherited From:
Unlocks root component.
update(model)
- Overrides:
Updates component according to a new model.
Parameters:
Name | Type | Description |
---|---|---|
model |
ICE.UI.Model | The component model. |
updateWith(content)
- Inherited From:
Updates content of component.
Parameters:
Name | Type | Description |
---|---|---|
content |
ICE.UI.Content | The content model. |
val(valueopt) → {*}
- Overrides:
Returns current value.
If value is passed, then value will be set also.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
* |
<optional> |
The value to set. |
Returns:
The current value.
- Type
- *
(abstract) validate() → {boolean}
- Inherited From:
Performs input value validation.
Returns:
true if value is valid, false otherwise.
- Type
- boolean