A thin wrapper over sap.ui.unified.ColorPicker allowing the latter to be used in a popover.
Constructor for a new ColorPickerPopover
.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.unified.ColorPickerPopover(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new control, generated automatically if no ID is given |
|
mSettings? | object | Initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
colorString | string | Determines the input parameter that can be a string of type HEX, RGB, HSV, or a CSS color name:
Since: 1.60.0.Visibility: public |
|
displayMode | sap.ui.unified.ColorPickerDisplayMode | Default | Determines the display mode of the |
mode | sap.ui.unified.ColorPickerMode | HSV | Determines the color mode of the |
Event | Description |
---|---|
change |
Fired when the submit button of the popover is clicked. |
liveChange |
Fired when the value is changed by user interaction in the internal ColorPicker |
Fired when the submit button of the popover is clicked.
Since: 1.60.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
r | int |
Parameter containing the RED value (0-255). |
g | int |
Parameter containing the GREEN value (0-255). |
b | int |
Parameter containing the BLUE value (0-255). |
h | int |
Parameter containing the HUE value (0-360). |
s | int |
Parameter containing the SATURATION value (0-100). |
v | int |
Parameter containing the VALUE value (0-100). |
l | int |
Parameter containing the LIGHTNESS value (0-100). |
hex | string |
Parameter containing the Hexadecimal string (#FFFFFF). |
alpha | string |
Parameter containing the alpha value (transparency). |
Fired when the value is changed by user interaction in the internal ColorPicker
Since: 1.85.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
r | int |
Parameter containing the RED value (0-255). |
g | int |
Parameter containing the GREEN value (0-255). |
b | int |
Parameter containing the BLUE value (0-255). |
h | int |
Parameter containing the HUE value (0-360). |
s | int |
Parameter containing the SATURATION value (0-100). |
v | int |
Parameter containing the VALUE value (0-100). |
l | int |
Parameter containing the LIGHTNESS value (0-100). |
hex | string |
Parameter containing the Hexadecimal string (#FFFFFF). |
alpha | string |
Parameter containing the alpha value (transparency). |
Method | Description |
---|---|
attachChange |
Attaches event handler When called, the context of the event handler (its Fired when the submit button of the popover is clicked. |
attachLiveChange |
Attaches event handler When called, the context of the event handler (its Fired when the value is changed by user interaction in the internal ColorPicker |
close |
Closes the |
detachChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachLiveChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.unified.ColorPickerPopover.extend |
Creates a new subclass of class sap.ui.unified.ColorPickerPopover with name
|
fireChange |
Fires event change to attached listeners. |
fireLiveChange |
Fires event liveChange to attached listeners. |
getColorString |
Gets current value of property colorString. Determines the input parameter that can be a string of type HEX, RGB, HSV, or a CSS color name:
|
getDisplayMode |
Gets current value of property displayMode. Determines the display mode of the Default value is |
sap.ui.unified.ColorPickerPopover.getMetadata |
Returns a metadata object for class sap.ui.unified.ColorPickerPopover. |
getMode |
Gets current value of property mode. Determines the color mode of the Default value is |
openBy |
Opens the |
setColorString |
Sets a new value for property colorString. Determines the input parameter that can be a string of type HEX, RGB, HSV, or a CSS color name:
When called with a value of |
setDisplayMode |
Sets a new value for property displayMode. Determines the display mode of the When called with a value of Default value is |
setMode |
Sets a new value for property mode. Determines the color mode of the When called with a value of Default value is |
Attaches event handler fnFunction
to the change event of this sap.ui.unified.ColorPickerPopover
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.unified.ColorPickerPopover
itself.
Fired when the submit button of the popover is clicked.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the liveChange event of this sap.ui.unified.ColorPickerPopover
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.unified.ColorPickerPopover
itself.
Fired when the value is changed by user interaction in the internal ColorPicker
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Detaches event handler fnFunction
from the change event of this sap.ui.unified.ColorPickerPopover
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the liveChange event of this sap.ui.unified.ColorPickerPopover
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Creates a new subclass of class sap.ui.unified.ColorPickerPopover with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event change to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
r | int |
Parameter containing the RED value (0-255). |
|
g | int |
Parameter containing the GREEN value (0-255). |
|
b | int |
Parameter containing the BLUE value (0-255). |
|
h | int |
Parameter containing the HUE value (0-360). |
|
s | int |
Parameter containing the SATURATION value (0-100). |
|
v | int |
Parameter containing the VALUE value (0-100). |
|
l | int |
Parameter containing the LIGHTNESS value (0-100). |
|
hex | string |
Parameter containing the Hexadecimal string (#FFFFFF). |
|
alpha | string |
Parameter containing the alpha value (transparency). |
Fires event liveChange to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
r | int |
Parameter containing the RED value (0-255). |
|
g | int |
Parameter containing the GREEN value (0-255). |
|
b | int |
Parameter containing the BLUE value (0-255). |
|
h | int |
Parameter containing the HUE value (0-360). |
|
s | int |
Parameter containing the SATURATION value (0-100). |
|
v | int |
Parameter containing the VALUE value (0-100). |
|
l | int |
Parameter containing the LIGHTNESS value (0-100). |
|
hex | string |
Parameter containing the Hexadecimal string (#FFFFFF). |
|
alpha | string |
Parameter containing the alpha value (transparency). |
Gets current value of property colorString.
Determines the input parameter that can be a string of type HEX, RGB, HSV, or a CSS color name:
Gets current value of property displayMode.
Determines the display mode of the ColorPicker
among three types - Default, Large and Simplified
Default value is Default
.
Returns a metadata object for class sap.ui.unified.ColorPickerPopover.
Gets current value of property mode.
Determines the color mode of the ColorPicker
.
Default value is HSV
.
Opens the ColorPickerPopover
. The popover is positioned relative to the control parameter on tablet or desktop and is full screen on phone. Therefore the openBy parameter is only used on tablet or desktop and is ignored on phone.
Param | Type | DefaultValue | Description |
---|---|---|---|
openBy | Object |
When this control is displayed on tablet or desktop, the |
Sets a new value for property colorString.
Determines the input parameter that can be a string of type HEX, RGB, HSV, or a CSS color name:
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sColorString | string |
New value for property |
Sets a new value for property displayMode.
Determines the display mode of the ColorPicker
among three types - Default, Large and Simplified
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Default
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDisplayMode | sap.ui.unified.ColorPickerDisplayMode | Default |
New value for property |
Sets a new value for property mode.
Determines the color mode of the ColorPicker
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is HSV
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sMode | sap.ui.unified.ColorPickerMode | HSV |
New value for property |