Combination of image areas where at runtime these areas are starting points for hyperlinks or actions
Constructor for a new ImageMap.
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.commons.ImageMap(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 |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
areas | 0..n | sap.ui.commons.Area |
Area representing the reference to the target location |
Method | Description |
---|---|
addArea |
Adds some area to the aggregation areas. |
attachPress |
Attaches event handler When called, the context of the event handler (its Event for the areas that can be clicked in an ImageMap |
createArea |
Adds areas to the Image Map. Each argument must be either a JSon object or a list of objects or the area element or elements. |
destroyAreas |
Destroys all the areas in the aggregation areas. |
detachPress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.commons.ImageMap.extend |
Creates a new subclass of class sap.ui.commons.ImageMap with name
|
firePress |
Fires event press to attached listeners. |
getAreas |
Gets content of aggregation areas. Area representing the reference to the target location |
sap.ui.commons.ImageMap.getMetadata |
Returns a metadata object for class sap.ui.commons.ImageMap. |
getName |
Gets current value of property name. Name for the image that serves as reference |
indexOfArea |
Checks for the provided |
insertArea |
Inserts a area into the aggregation areas. |
removeAllAreas |
Removes all the controls from the aggregation areas. Additionally, it unregisters them from the hosting UIArea. |
removeArea |
Removes a area from the aggregation areas. |
setName |
Sets a new value for property name. Name for the image that serves as reference When called with a value of |
Adds some area to the aggregation areas.
Param | Type | DefaultValue | Description |
---|---|---|---|
oArea | sap.ui.commons.Area |
The area to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the press event of this sap.ui.commons.ImageMap
.
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.commons.ImageMap
itself.
Event for the areas that can be clicked in an ImageMap
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 |
Adds areas to the Image Map.
Each argument must be either a JSon object or a list of objects or the area element or elements.
Param | Type | DefaultValue | Description |
---|---|---|---|
content | any |
Area content to add |
Detaches event handler fnFunction
from the press event of this sap.ui.commons.ImageMap
.
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.commons.ImageMap 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 press to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
areaId | string |
Id of clicked Area. |
Checks for the provided sap.ui.commons.Area
in the aggregation areas. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oArea | sap.ui.commons.Area |
The area whose index is looked for |
Inserts a area into the aggregation areas.
Param | Type | DefaultValue | Description |
---|---|---|---|
oArea | sap.ui.commons.Area |
The area to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation areas.
Additionally, it unregisters them from the hosting UIArea.
Removes a area from the aggregation areas.
Param | Type | DefaultValue | Description |
---|---|---|---|
vArea | int string sap.ui.commons.Area |
The area to remove or its index or id |
Sets a new value for property name.
Name for the image that serves as reference
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sName | string |
New value for property |