class sap.ui.vbm.Spots

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

Type specific Visual Object aggregation for Spot elements.
Spots support GeoMap internal drag'n drop with fine grained control on matching drag sources and drop targets. A drag'n drop operation is possible if any type in the drag source aggregation of the dragged visual object matches a type in the drop target aggregation of the target vo. If drag source and drop target types are defined on aggregation level they apply for all aggregated elements.


Constructor

Constructor for a new Spots.

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.Spots(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
posChangeable boolean true

Set to true if position may be changed at runtime. The actual changeability is control on each aggregated element with property changeable.

Visibility: public
scaleChangeable boolean true

Set to true if scale may be changed at runtime. The actual changeability is control on each aggregated element with property changeable.

Visibility: public

Borrowed Properties

Name Type Default Value Description
customProperties string[]

If you want to add custom data to VO instances and make the GeoMap control aware of it, e.g. for basing clustering rules on it, you can provide an array of property names specifying the keys to consider.

Visibility: public
maxSel string n

Selection cardinality: maximum selectable elements ( valid values are "0", "1", and "n" )

Visibility: public
minSel string 0

Selection cardinality: minimum selected elements ("0" or "1" )

Visibility: public

Aggregations

Default Aggregation: items

Name Cardinality Type Description
dragSource 0..n sap.ui.vbm.DragSource

DragSource aggregation

dropTarget 0..n sap.ui.vbm.DropTarget

DropTarget aggregation

items (default) 0..n sap.ui.vbm.Spot

spot object aggregation


Methods Overview

Method Description
addDragSource

Adds some dragSource to the aggregation dragSource.

addDropTarget

Adds some dropTarget to the aggregation dropTarget.

addItem

Adds some item to the aggregation items.

destroyDragSource

Destroys all the dragSource in the aggregation dragSource.

destroyDropTarget

Destroys all the dropTarget in the aggregation dropTarget.

destroyItems

Destroys all the items in the aggregation items.

sap.ui.vbm.Spots.extend

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

getDragSource

Gets content of aggregation dragSource.

DragSource aggregation

getDropTarget

Gets content of aggregation dropTarget.

DropTarget aggregation

getItems

Gets content of aggregation items.

spot object aggregation

sap.ui.vbm.Spots.getMetadata

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

getPosChangeable

Gets current value of property posChangeable.

Set to true if position may be changed at runtime. The actual changeability is control on each aggregated element with property changeable.

Default value is true.

getScaleChangeable

Gets current value of property scaleChangeable.

Set to true if scale may be changed at runtime. The actual changeability is control on each aggregated element with property changeable.

Default value is true.

indexOfDragSource

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

indexOfDropTarget

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

indexOfItem

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

insertDragSource

Inserts a dragSource into the aggregation dragSource.

insertDropTarget

Inserts a dropTarget into the aggregation dropTarget.

insertItem

Inserts a item into the aggregation items.

removeAllDragSource

Removes all the controls from the aggregation dragSource.

Additionally, it unregisters them from the hosting UIArea.

removeAllDropTarget

Removes all the controls from the aggregation dropTarget.

Additionally, it unregisters them from the hosting UIArea.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeDragSource

Removes a dragSource from the aggregation dragSource.

removeDropTarget

Removes a dropTarget from the aggregation dropTarget.

removeItem

Removes a item from the aggregation items.

setPosChangeable

Sets a new value for property posChangeable.

Set to true if position may be changed at runtime. The actual changeability is control on each aggregated element with property changeable.

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

Default value is true.

setScaleChangeable

Sets a new value for property scaleChangeable.

Set to true if scale may be changed at runtime. The actual changeability is control on each aggregated element with property changeable.

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

Default value is true.

addDragSource

Adds some dragSource to the aggregation dragSource.

Param Type DefaultValue Description
oDragSource sap.ui.vbm.DragSource

The dragSource to add; if empty, nothing is inserted

addDropTarget

Adds some dropTarget to the aggregation dropTarget.

Param Type DefaultValue Description
oDropTarget sap.ui.vbm.DropTarget

The dropTarget to add; if empty, nothing is inserted

addItem

Adds some item to the aggregation items.

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

The item to add; if empty, nothing is inserted

destroyDragSource

Destroys all the dragSource in the aggregation dragSource.

destroyDropTarget

Destroys all the dropTarget in the aggregation dropTarget.

destroyItems

Destroys all the items in the aggregation items.

sap.ui.vbm.Spots.extend

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

getDragSource

Gets content of aggregation dragSource.

DragSource aggregation

getDropTarget

Gets content of aggregation dropTarget.

DropTarget aggregation

getItems

Gets content of aggregation items.

spot object aggregation

sap.ui.vbm.Spots.getMetadata

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

getPosChangeable

Gets current value of property posChangeable.

Set to true if position may be changed at runtime. The actual changeability is control on each aggregated element with property changeable.

Default value is true.

getScaleChangeable

Gets current value of property scaleChangeable.

Set to true if scale may be changed at runtime. The actual changeability is control on each aggregated element with property changeable.

Default value is true.

indexOfDragSource

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

Param Type DefaultValue Description
oDragSource sap.ui.vbm.DragSource

The dragSource whose index is looked for

indexOfDropTarget

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

Param Type DefaultValue Description
oDropTarget sap.ui.vbm.DropTarget

The dropTarget whose index is looked for

indexOfItem

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

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

The item whose index is looked for

insertDragSource

Inserts a dragSource into the aggregation dragSource.

Param Type DefaultValue Description
oDragSource sap.ui.vbm.DragSource

The dragSource to insert; if empty, nothing is inserted

iIndex int

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

insertDropTarget

Inserts a dropTarget into the aggregation dropTarget.

Param Type DefaultValue Description
oDropTarget sap.ui.vbm.DropTarget

The dropTarget to insert; if empty, nothing is inserted

iIndex int

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

insertItem

Inserts a item into the aggregation items.

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

The item to insert; if empty, nothing is inserted

iIndex int

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

removeAllDragSource

Removes all the controls from the aggregation dragSource.

Additionally, it unregisters them from the hosting UIArea.

removeAllDropTarget

Removes all the controls from the aggregation dropTarget.

Additionally, it unregisters them from the hosting UIArea.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeDragSource

Removes a dragSource from the aggregation dragSource.

Param Type DefaultValue Description
vDragSource int string sap.ui.vbm.DragSource

The dragSource to remove or its index or id

removeDropTarget

Removes a dropTarget from the aggregation dropTarget.

Param Type DefaultValue Description
vDropTarget int string sap.ui.vbm.DropTarget

The dropTarget to remove or its index or id

removeItem

Removes a item from the aggregation items.

Param Type DefaultValue Description
vItem int string sap.ui.vbm.Spot

The item to remove or its index or id

setPosChangeable

Sets a new value for property posChangeable.

Set to true if position may be changed at runtime. The actual changeability is control on each aggregated element with property changeable.

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

Default value is true.

Param Type DefaultValue Description
bPosChangeable boolean true

New value for property posChangeable

setScaleChangeable

Sets a new value for property scaleChangeable.

Set to true if scale may be changed at runtime. The actual changeability is control on each aggregated element with property changeable.

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

Default value is true.

Param Type DefaultValue Description
bScaleChangeable boolean true

New value for property scaleChangeable