class sap.ui.commons.ImageMap

Control sample: sap.ui.commons.ImageMap
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/commons/ImageMap
Application Component: CA-UI5-CTR

Combination of image areas where at runtime these areas are starting points for hyperlinks or actions


Constructor

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


Properties

Name Type Default Value Description
name string

Name for the image that serves as reference

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
areas 0..n sap.ui.commons.Area

Area representing the reference to the target location


Events Overview

Event Description
press

Event for the areas that can be clicked in an ImageMap

press

Event for the areas that can be clicked in an ImageMap

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
areaId string

Id of clicked Area.


Methods Overview

Method Description
addArea

Adds some area to the aggregation areas.

attachPress

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

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 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.

sap.ui.commons.ImageMap.extend

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.

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 sap.ui.commons.Area in the aggregation areas. and returns its index if found or -1 otherwise.

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 null or undefined, the default value of the property will be restored.

addArea

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

attachPress

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 sap.ui.commons.ImageMap itself

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.

Param Type DefaultValue Description
content any

Area content to add

destroyAreas

Destroys all the areas in the aggregation areas.

detachPress

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

sap.ui.commons.ImageMap.extend

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

firePress

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.

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 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

insertArea

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 0-based index the area should be inserted at; for a negative value of iIndex, the area is inserted at position 0; for a value greater than the current size of the aggregation, the area is inserted at the last position

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.

Param Type DefaultValue Description
vArea int string sap.ui.commons.Area

The area to remove or its index or id

setName

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 name