class sap.ui.vbm.ClusterBase

Control sample: sap.ui.vbm.ClusterBase
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vbm/ClusterBase
Application Component: CA-GTF-VBZ

Abtract base class for Clustering types. This element implements the common part for all specific Cluster elements. It must not be used directly, but is the base for further extension.
There are two optional aggregations: vizTemplate and vizVo determining how cluster objects should be visualized. Only the one or the other should be provided.
With aggregation vizTemplate you can provide an arbitrary SAPUI5 control for the actual visualization. If you want this control to display the number of clustered object you need to provide the name of the receiving property of the template via property textProperty. For interaction with the cluster you can either use the events provided by the visualization template or, if it does not provide appropriate events, the cluster element events click and contextMenu. The event handler will receive an instance of sap.ui.vbm.ClusterContainer.
With aggregation vizVo you provide an instance of sap.ui.vbm.Spot as visualization object. Spots are based on an image. The text for the number of clustered objects needs to be placed over the image. The actual color, font, size, and positioning of the text can be influence via property textSettings. For interaction with the cluster you can use the events provided by the spot.


Constructor

Constructor for a new ClusterBase.

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.vbm.ClusterBase(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
areaAlwaysVisible boolean false

Flag controlling the visibility of the area convered by a cluster object.

Visibility: public
areaColor sap.ui.core.CSSColor rgba(200,0,0,0.2)

Fill color for the area covered by a cluster object

Visibility: public
areaColorBorder sap.ui.core.CSSColor rgba(220,220,220,0.5)

Border color for the area covered by a cluster object

Visibility: public
rule string

Clustering rule, describing which visual objects should be considered for clustering

Visibility: public
textProperty string text

Name of property of the visualization control receiving the number of clustered objects. This setting applys only if aggregation vizTemplate is used.

Visibility: public
textSettings object

Settings for the text placed on the given Spot telling the number of clustered objects. This setting applys only if aggregation vizVo is used. If omitted the number of clustered object will not be shown!

Visibility: public

Aggregations

Default Aggregation: vizTemplate

Name Cardinality Type Description
clusterContainers 0..n sap.ui.vbm.ClusterContainer

Hidden aggregation for host container VOs

clusterVos 0..n sap.ui.core.Control

Hidden aggregation for cluster visualization controls

vizTemplate (default) 0..1 sap.ui.core.Control

Optional: Instance of a control, which is used as template for visualizing cluster objects. This is the prefered choise.

vizVo 0..1 sap.ui.vbm.Spot

Optional: Instance of a spot, which is used as template for visualizing cluster objects


Events Overview

Event Description
click

The event is raised when there is a click action on a Cluster Object.

contextMenu

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

click

The event is raised when there is a click action on a Cluster Object.

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

ID of the clicked cluster object. Can serve as input for GeoMap function getInfoForCluster

contextMenu

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

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

ID of the clicked cluster object. Can serve as input for GeoMap function getInfoForCluster

menu sap.ui.unified.Menu

Menu to open


Methods Overview

Method Description
addClusterContainer

Adds some clusterContainer to the aggregation clusterContainers.

addClusterVo

Adds some clusterVo to the aggregation clusterVos.

attachClick

Attaches event handler fnFunction to the click event of this sap.ui.vbm.ClusterBase.

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

The event is raised when there is a click action on a Cluster Object.

attachContextMenu

Attaches event handler fnFunction to the contextMenu event of this sap.ui.vbm.ClusterBase.

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

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

destroyClusterContainers

Destroys all the clusterContainers in the aggregation clusterContainers.

destroyClusterVos

Destroys all the clusterVos in the aggregation clusterVos.

destroyVizTemplate

Destroys the vizTemplate in the aggregation vizTemplate.

destroyVizVo

Destroys the vizVo in the aggregation vizVo.

detachClick

Detaches event handler fnFunction from the click event of this sap.ui.vbm.ClusterBase.

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

detachContextMenu

Detaches event handler fnFunction from the contextMenu event of this sap.ui.vbm.ClusterBase.

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

sap.ui.vbm.ClusterBase.extend

Creates a new subclass of class sap.ui.vbm.ClusterBase 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.

fireClick

Fires event click to attached listeners.

fireContextMenu

Fires event contextMenu to attached listeners.

getAreaAlwaysVisible

Gets current value of property areaAlwaysVisible.

Flag controlling the visibility of the area convered by a cluster object.

Default value is false.

getAreaColor

Gets current value of property areaColor.

Fill color for the area covered by a cluster object

Default value is "rgba(200,0,0,0.2)".

getAreaColorBorder

Gets current value of property areaColorBorder.

Border color for the area covered by a cluster object

Default value is "rgba(220,220,220,0.5)".

getClusterContainers

Gets content of aggregation clusterContainers.

Hidden aggregation for host container VOs

getClusterVos

Gets content of aggregation clusterVos.

Hidden aggregation for cluster visualization controls

sap.ui.vbm.ClusterBase.getMetadata

Returns a metadata object for class sap.ui.vbm.ClusterBase.

getRule

Gets current value of property rule.

Clustering rule, describing which visual objects should be considered for clustering

getTextProperty

Gets current value of property textProperty.

Name of property of the visualization control receiving the number of clustered objects. This setting applys only if aggregation vizTemplate is used.

Default value is "text".

getTextSettings

Gets current value of property textSettings.

Settings for the text placed on the given Spot telling the number of clustered objects. This setting applys only if aggregation vizVo is used. If omitted the number of clustered object will not be shown!

getVizTemplate

Gets content of aggregation vizTemplate.

Optional: Instance of a control, which is used as template for visualizing cluster objects. This is the prefered choise.

getVizVo

Gets content of aggregation vizVo.

Optional: Instance of a spot, which is used as template for visualizing cluster objects

indexOfClusterContainer

Checks for the provided sap.ui.vbm.ClusterContainer in the aggregation clusterContainers. and returns its index if found or -1 otherwise.

indexOfClusterVo

Checks for the provided sap.ui.core.Control in the aggregation clusterVos. and returns its index if found or -1 otherwise.

insertClusterContainer

Inserts a clusterContainer into the aggregation clusterContainers.

insertClusterVo

Inserts a clusterVo into the aggregation clusterVos.

openContextMenu

Open a context menu

openDetailWindow

Open a Detail Window. This function can only be used with a Spot as Cluster visualization object!

removeAllClusterContainers

Removes all the controls from the aggregation clusterContainers.

Additionally, it unregisters them from the hosting UIArea.

removeAllClusterVos

Removes all the controls from the aggregation clusterVos.

Additionally, it unregisters them from the hosting UIArea.

removeClusterContainer

Removes a clusterContainer from the aggregation clusterContainers.

removeClusterVo

Removes a clusterVo from the aggregation clusterVos.

setAreaAlwaysVisible

Sets a new value for property areaAlwaysVisible.

Flag controlling the visibility of the area convered by a cluster object.

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

Default value is false.

setAreaColor

Sets a new value for property areaColor.

Fill color for the area covered by a cluster object

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

Default value is "rgba(200,0,0,0.2)".

setAreaColorBorder

Sets a new value for property areaColorBorder.

Border color for the area covered by a cluster object

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

Default value is "rgba(220,220,220,0.5)".

setRule

Sets a new value for property rule.

Clustering rule, describing which visual objects should be considered for clustering

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

setTextProperty

Sets a new value for property textProperty.

Name of property of the visualization control receiving the number of clustered objects. This setting applys only if aggregation vizTemplate is used.

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

Default value is "text".

setTextSettings

Set the settings for the text placed on the Spot for number of clustered objects

setVizTemplate

Sets the aggregated vizTemplate.

setVizVo

Sets the aggregated vizVo.

addClusterContainer

Adds some clusterContainer to the aggregation clusterContainers.

Param Type DefaultValue Description
oClusterContainer sap.ui.vbm.ClusterContainer

The clusterContainer to add; if empty, nothing is inserted

addClusterVo

Adds some clusterVo to the aggregation clusterVos.

Param Type DefaultValue Description
oClusterVo sap.ui.core.Control

The clusterVo to add; if empty, nothing is inserted

attachClick

Attaches event handler fnFunction to the click event of this sap.ui.vbm.ClusterBase.

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

The event is raised when there is a click action on a Cluster Object.

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

attachContextMenu

Attaches event handler fnFunction to the contextMenu event of this sap.ui.vbm.ClusterBase.

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

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

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

destroyClusterContainers

Destroys all the clusterContainers in the aggregation clusterContainers.

destroyClusterVos

Destroys all the clusterVos in the aggregation clusterVos.

destroyVizTemplate

Destroys the vizTemplate in the aggregation vizTemplate.

destroyVizVo

Destroys the vizVo in the aggregation vizVo.

detachClick

Detaches event handler fnFunction from the click event of this sap.ui.vbm.ClusterBase.

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

detachContextMenu

Detaches event handler fnFunction from the contextMenu event of this sap.ui.vbm.ClusterBase.

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.vbm.ClusterBase.extend

Creates a new subclass of class sap.ui.vbm.ClusterBase 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.

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

fireClick

Fires event click to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

clusterID string

ID of the clicked cluster object. Can serve as input for GeoMap function getInfoForCluster

fireContextMenu

Fires event contextMenu to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

clusterID string

ID of the clicked cluster object. Can serve as input for GeoMap function getInfoForCluster

menu sap.ui.unified.Menu

Menu to open

getAreaAlwaysVisible

Gets current value of property areaAlwaysVisible.

Flag controlling the visibility of the area convered by a cluster object.

Default value is false.

getAreaColor

Gets current value of property areaColor.

Fill color for the area covered by a cluster object

Default value is "rgba(200,0,0,0.2)".

getAreaColorBorder

Gets current value of property areaColorBorder.

Border color for the area covered by a cluster object

Default value is "rgba(220,220,220,0.5)".

getClusterContainers

Gets content of aggregation clusterContainers.

Hidden aggregation for host container VOs

getClusterVos

Gets content of aggregation clusterVos.

Hidden aggregation for cluster visualization controls

sap.ui.vbm.ClusterBase.getMetadata

Returns a metadata object for class sap.ui.vbm.ClusterBase.

getRule

Gets current value of property rule.

Clustering rule, describing which visual objects should be considered for clustering

getTextProperty

Gets current value of property textProperty.

Name of property of the visualization control receiving the number of clustered objects. This setting applys only if aggregation vizTemplate is used.

Default value is "text".

getTextSettings

Gets current value of property textSettings.

Settings for the text placed on the given Spot telling the number of clustered objects. This setting applys only if aggregation vizVo is used. If omitted the number of clustered object will not be shown!

getVizTemplate

Gets content of aggregation vizTemplate.

Optional: Instance of a control, which is used as template for visualizing cluster objects. This is the prefered choise.

getVizVo

Gets content of aggregation vizVo.

Optional: Instance of a spot, which is used as template for visualizing cluster objects

indexOfClusterContainer

Checks for the provided sap.ui.vbm.ClusterContainer in the aggregation clusterContainers. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oClusterContainer sap.ui.vbm.ClusterContainer

The clusterContainer whose index is looked for

indexOfClusterVo

Checks for the provided sap.ui.core.Control in the aggregation clusterVos. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oClusterVo sap.ui.core.Control

The clusterVo whose index is looked for

insertClusterContainer

Inserts a clusterContainer into the aggregation clusterContainers.

Param Type DefaultValue Description
oClusterContainer sap.ui.vbm.ClusterContainer

The clusterContainer to insert; if empty, nothing is inserted

iIndex int

The 0-based index the clusterContainer should be inserted at; for a negative value of iIndex, the clusterContainer is inserted at position 0; for a value greater than the current size of the aggregation, the clusterContainer is inserted at the last position

insertClusterVo

Inserts a clusterVo into the aggregation clusterVos.

Param Type DefaultValue Description
oClusterVo sap.ui.core.Control

The clusterVo to insert; if empty, nothing is inserted

iIndex int

The 0-based index the clusterVo should be inserted at; for a negative value of iIndex, the clusterVo is inserted at position 0; for a value greater than the current size of the aggregation, the clusterVo is inserted at the last position

openContextMenu

Open a context menu

Param Type DefaultValue Description
sType string

Type of VO

oContainer sap.ui.vbm.ClusterContainer

VO instance for which the Context Menu should be opened

oMenu sap.ui.unified.Menu

the context menu to be opened

openDetailWindow

Open a Detail Window. This function can only be used with a Spot as Cluster visualization object!

Param Type DefaultValue Description
oSpotInst sap.ui.vbm.Spot

Spot instance for which the Detail Window should be opened

oParams object

Parameter object

caption string

Text for Detail Window caption

offsetX string

position offset in x-direction from the anchor point

offsetY string

position offset in y-direction from the anchor point

removeAllClusterContainers

Removes all the controls from the aggregation clusterContainers.

Additionally, it unregisters them from the hosting UIArea.

removeAllClusterVos

Removes all the controls from the aggregation clusterVos.

Additionally, it unregisters them from the hosting UIArea.

removeClusterContainer

Removes a clusterContainer from the aggregation clusterContainers.

Param Type DefaultValue Description
vClusterContainer int string sap.ui.vbm.ClusterContainer

The clusterContainer to remove or its index or id

removeClusterVo

Removes a clusterVo from the aggregation clusterVos.

Param Type DefaultValue Description
vClusterVo int string sap.ui.core.Control

The clusterVo to remove or its index or id

setAreaAlwaysVisible

Sets a new value for property areaAlwaysVisible.

Flag controlling the visibility of the area convered by a cluster object.

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

Default value is false.

Param Type DefaultValue Description
bAreaAlwaysVisible boolean false

New value for property areaAlwaysVisible

setAreaColor

Sets a new value for property areaColor.

Fill color for the area covered by a cluster object

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

Default value is "rgba(200,0,0,0.2)".

Param Type DefaultValue Description
sAreaColor sap.ui.core.CSSColor "rgba(200,0,0,0.2)"

New value for property areaColor

setAreaColorBorder

Sets a new value for property areaColorBorder.

Border color for the area covered by a cluster object

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

Default value is "rgba(220,220,220,0.5)".

Param Type DefaultValue Description
sAreaColorBorder sap.ui.core.CSSColor "rgba(220,220,220,0.5)"

New value for property areaColorBorder

setRule

Sets a new value for property rule.

Clustering rule, describing which visual objects should be considered for clustering

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

Param Type DefaultValue Description
sRule string

New value for property rule

setTextProperty

Sets a new value for property textProperty.

Name of property of the visualization control receiving the number of clustered objects. This setting applys only if aggregation vizTemplate is used.

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

Default value is "text".

Param Type DefaultValue Description
sTextProperty string "text"

New value for property textProperty

setTextSettings

Set the settings for the text placed on the Spot for number of clustered objects

Param Type DefaultValue Description
oSettings object

Settings object

setVizTemplate

Sets the aggregated vizTemplate.

Param Type DefaultValue Description
oVizTemplate sap.ui.core.Control

The vizTemplate to set

setVizVo

Sets the aggregated vizVo.

Param Type DefaultValue Description
oVizVo sap.ui.vbm.Spot

The vizVo to set