class sap.ui.vbm.Routes

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

Type specific Visual Object aggregation for Route elements.
Routes 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 Routes.

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

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

Route object aggregation


Events Overview

Event Description
click

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

contextMenu

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

drop

The event is raised when something is dropped on a Route.

click

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

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

contextMenu

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

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

drop

The event is raised when something is dropped on a Route.

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

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.

attachClick

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

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

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

attachContextMenu

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

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

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

attachDrop

Attaches event handler fnFunction to the drop event of this sap.ui.vbm.Routes.

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

The event is raised when something is dropped on a Route.

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.

detachClick

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

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

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

detachDrop

Detaches event handler fnFunction from the drop event of this sap.ui.vbm.Routes.

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

sap.ui.vbm.Routes.extend

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

fireClick

Fires event click to attached listeners.

fireContextMenu

Fires event contextMenu to attached listeners.

fireDrop

Fires event drop to attached listeners.

getDragSource

Gets content of aggregation dragSource.

DragSource aggregation

getDropTarget

Gets content of aggregation dropTarget.

DropTarget aggregation

getItems

Gets content of aggregation items.

Route object aggregation

sap.ui.vbm.Routes.getMetadata

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

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.

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

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

The item to add; if empty, nothing is inserted

attachClick

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

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

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

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

attachContextMenu

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

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

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

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

attachDrop

Attaches event handler fnFunction to the drop event of this sap.ui.vbm.Routes.

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

The event is raised when something is dropped on a Route.

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

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.

detachClick

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

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

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

detachDrop

Detaches event handler fnFunction from the drop event of this sap.ui.vbm.Routes.

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

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

fireClick

Fires event click to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireContextMenu

Fires event contextMenu to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireDrop

Fires event drop to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getDragSource

Gets content of aggregation dragSource.

DragSource aggregation

getDropTarget

Gets content of aggregation dropTarget.

DropTarget aggregation

getItems

Gets content of aggregation items.

Route object aggregation

sap.ui.vbm.Routes.getMetadata

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

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.

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.Route in the aggregation items. and returns its index if found or -1 otherwise.

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

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

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

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