Class sap.ui.vbm.RegionModule: sap/ui/vbm/Region

extends Element

Region properties.

Constructor Summary
new sap.ui.vbm.Region(sId?, mSettings?)Constructor for a new Region.
Event Summary
click(oControlEvent)The event is raised when there is a click action on a region.
contextMenu(oControlEvent)The event is raised when there is a right click or a tap and hold action on a region.
Method Summary
sap.ui.vbm.Region.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.vbm.Region with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.vbm.Region.getMetadata()Returns a metadata object for class sap.ui.vbm.Region.
attachClick(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the click event of this sap.ui.vbm.Region.
attachContextMenu(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the contextMenu event of this sap.ui.vbm.Region.
detachClick(fnFunction, oListener)Detaches event handler fnFunction from the click event of this sap.ui.vbm.Region.
detachContextMenu(fnFunction, oListener)Detaches event handler fnFunction from the contextMenu event of this sap.ui.vbm.Region.
fireClick(mArguments?)Fires event click to attached listeners.
fireContextMenu(mArguments?)Fires event contextMenu to attached listeners.
getCode()Gets current value of property code.
getColor()Gets current value of property color.
getInfo()Returns Infos for the Region like name, bounding box and midpoint
getSelect()Gets current value of property select.
setCode(sCode)Sets a new value for property code.
setColor(sColor)Sets a new value for property color.
setSelect(bSelect)Sets a new value for property select.
Constructor Detail
new sap.ui.vbm.Region(sId?, mSettings?)
Constructor for a new Region.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

  • Properties
  • Events
    • click : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • contextMenu : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.ui.core.Element can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Event Detail
click(oControlEvent)
The event is raised when there is a click action on a region.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.code The region code.
contextMenu(oControlEvent)
The event is raised when there is a right click or a tap and hold action on a region.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.code The region code.
Method Detail
sap.ui.vbm.Region.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.vbm.Region 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.Element.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.vbm.Region.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.vbm.Region.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachClick(oData?, fnFunction, oListener?): sap.ui.vbm.Region
Attaches event handler fnFunction to the click event of this sap.ui.vbm.Region.

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.vbm.Region itself.

The event is raised when there is a click action on a region.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.ui.vbm.Region itself
Returns:
{sap.ui.vbm.Region} Reference to this in order to allow method chaining
attachContextMenu(oData?, fnFunction, oListener?): sap.ui.vbm.Region
Attaches event handler fnFunction to the contextMenu event of this sap.ui.vbm.Region.

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.vbm.Region itself.

The event is raised when there is a right click or a tap and hold action on a region.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.ui.vbm.Region itself
Returns:
{sap.ui.vbm.Region} Reference to this in order to allow method chaining
detachClick(fnFunction, oListener): sap.ui.vbm.Region
Detaches event handler fnFunction from the click event of this sap.ui.vbm.Region.

The passed function and listener object must match the ones used for event registration.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.ui.vbm.Region} Reference to this in order to allow method chaining
detachContextMenu(fnFunction, oListener): sap.ui.vbm.Region
Detaches event handler fnFunction from the contextMenu event of this sap.ui.vbm.Region.

The passed function and listener object must match the ones used for event registration.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.ui.vbm.Region} Reference to this in order to allow method chaining
fireClick(mArguments?): sap.ui.vbm.Region
Fires event click to attached listeners.

Expects the following event parameters:

  • code of type stringThe region code.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.vbm.Region} Reference to this in order to allow method chaining
fireContextMenu(mArguments?): sap.ui.vbm.Region
Fires event contextMenu to attached listeners.

Expects the following event parameters:

  • code of type stringThe region code.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.vbm.Region} Reference to this in order to allow method chaining
getCode(): string
Gets current value of property code.

The region code.

Returns:
{string} Value of property code
Gets current value of property color.

The color, this must be provided in the rgba(r,g,b,a) format.

Returns:
{sap.ui.core.CSSColor} Value of property color
getInfo(): object
Returns Infos for the Region like name, bounding box and midpoint
Returns:
{object} Region Information Object. Object has the properties BBox: Bounding Box for Region in format "lonMin;latMin;lonMax;latMax", Midpoint: Centerpoint for Region in format "lon;lat", Name: Name of the region, and Properties: Array of name-value-pair associated with the region
getSelect(): boolean
Gets current value of property select.

set to true if the element is selected

Default value is false.

Returns:
{boolean} Value of property select
setCode(sCode): sap.ui.vbm.Region
Sets a new value for property code.

The region code.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sCode New value for property code
Returns:
{sap.ui.vbm.Region} Reference to this in order to allow method chaining
setColor(sColor): sap.ui.vbm.Region
Sets a new value for property color.

The color, this must be provided in the rgba(r,g,b,a) format.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{sap.ui.core.CSSColor}sColor New value for property color
Returns:
{sap.ui.vbm.Region} Reference to this in order to allow method chaining
setSelect(bSelect): sap.ui.vbm.Region
Sets a new value for property select.

set to true if the element is selected

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Parameters:
{boolean}bSelect New value for property select
Returns:
{sap.ui.vbm.Region} Reference to this in order to allow method chaining