Class sap.ui.vbm.RoutesModule: sap/ui/vbm/Routes


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 Summary
new sap.ui.vbm.Routes(sId?, mSettings?)Constructor for a new Routes.
Event Summary
click(oControlEvent)The event is raised when there is a click action on a Route.
contextMenu(oControlEvent)The event is raised when there is a right click or a tap and hold action on a Route.
drop(oControlEvent)The event is raised when something is dropped on a Route.
Method Summary
sap.ui.vbm.Routes.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.vbm.Routes with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.vbm.Routes.getMetadata()Returns a metadata object for class sap.ui.vbm.Routes.
addDragSource(oDragSource)Adds some dragSource to the aggregation dragSource.
addDropTarget(oDropTarget)Adds some dropTarget to the aggregation dropTarget.
addItem(oItem)Adds some item to the aggregation items.
attachClick(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the click event of this sap.ui.vbm.Routes.
attachContextMenu(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the contextMenu event of this sap.ui.vbm.Routes.
attachDrop(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the drop event of this sap.ui.vbm.Routes.
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(fnFunction, oListener)Detaches event handler fnFunction from the click event of this sap.ui.vbm.Routes.
detachContextMenu(fnFunction, oListener)Detaches event handler fnFunction from the contextMenu event of this sap.ui.vbm.Routes.
detachDrop(fnFunction, oListener)Detaches event handler fnFunction from the drop event of this sap.ui.vbm.Routes.
fireClick(mArguments?)Fires event click to attached listeners.
fireContextMenu(mArguments?)Fires event contextMenu to attached listeners.
fireDrop(mArguments?)Fires event drop to attached listeners.
getDragSource()Gets content of aggregation dragSource.
getDropTarget()Gets content of aggregation dropTarget.
getItems()Gets content of aggregation items.
getPosChangeable()Gets current value of property posChangeable.
indexOfDragSource(oDragSource)Checks for the provided sap.ui.vbm.DragSource in the aggregation dragSource.
indexOfDropTarget(oDropTarget)Checks for the provided sap.ui.vbm.DropTarget in the aggregation dropTarget.
indexOfItem(oItem)Checks for the provided sap.ui.vbm.Route in the aggregation items.
insertDragSource(oDragSource, iIndex)Inserts a dragSource into the aggregation dragSource.
insertDropTarget(oDropTarget, iIndex)Inserts a dropTarget into the aggregation dropTarget.
insertItem(oItem, iIndex)Inserts a item into the aggregation items.
removeAllDragSource()Removes all the controls from the aggregation dragSource.
removeAllDropTarget()Removes all the controls from the aggregation dropTarget.
removeAllItems()Removes all the controls from the aggregation items.
removeDragSource(vDragSource)Removes a dragSource from the aggregation dragSource.
removeDropTarget(vDropTarget)Removes a dropTarget from the aggregation dropTarget.
removeItem(vItem)Removes a item from the aggregation items.
setPosChangeable(bPosChangeable)Sets a new value for property posChangeable.
Methods borrowed from class sap.ui.vbm.VoAbstract
Constructor Detail
new sap.ui.vbm.Routes(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

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

In addition, all settings applicable to the base type sap.ui.vbm.VoAggregation 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 Route.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
contextMenu(oControlEvent)
The event is raised when there is a right click or a tap and hold action on a Route.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
drop(oControlEvent)
The event is raised when something is dropped on a Route.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.ui.vbm.Routes.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

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.Routes.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.vbm.Routes.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addDragSource(oDragSource): sap.ui.vbm.Routes
Adds some dragSource to the aggregation dragSource.
Parameters:
{sap.ui.vbm.DragSource}oDragSource the dragSource to add; if empty, nothing is inserted
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
addDropTarget(oDropTarget): sap.ui.vbm.Routes
Adds some dropTarget to the aggregation dropTarget.
Parameters:
{sap.ui.vbm.DropTarget}oDropTarget the dropTarget to add; if empty, nothing is inserted
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
addItem(oItem): sap.ui.vbm.Routes
Adds some item to the aggregation items.
Parameters:
{sap.ui.vbm.Route}oItem the item to add; if empty, nothing is inserted
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
attachClick(oData?, fnFunction, oListener?): sap.ui.vbm.Routes
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.

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.Routes itself
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
attachContextMenu(oData?, fnFunction, oListener?): sap.ui.vbm.Routes
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.

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.Routes itself
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
attachDrop(oData?, fnFunction, oListener?): sap.ui.vbm.Routes
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.

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.Routes itself
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
destroyDragSource(): sap.ui.vbm.Routes
Destroys all the dragSource in the aggregation dragSource.
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
destroyDropTarget(): sap.ui.vbm.Routes
Destroys all the dropTarget in the aggregation dropTarget.
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
destroyItems(): sap.ui.vbm.Routes
Destroys all the items in the aggregation items.
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
detachClick(fnFunction, oListener): sap.ui.vbm.Routes
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.

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.Routes} Reference to this in order to allow method chaining
detachContextMenu(fnFunction, oListener): sap.ui.vbm.Routes
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.

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.Routes} Reference to this in order to allow method chaining
detachDrop(fnFunction, oListener): sap.ui.vbm.Routes
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.

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.Routes} Reference to this in order to allow method chaining
fireClick(mArguments?): sap.ui.vbm.Routes
Fires event click to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
fireContextMenu(mArguments?): sap.ui.vbm.Routes
Fires event contextMenu to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
fireDrop(mArguments?): sap.ui.vbm.Routes
Fires event drop to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
getDragSource(): sap.ui.vbm.DragSource[]
Gets content of aggregation dragSource.

DragSource aggregation

Returns:
{sap.ui.vbm.DragSource[]}
getDropTarget(): sap.ui.vbm.DropTarget[]
Gets content of aggregation dropTarget.

DropTarget aggregation

Returns:
{sap.ui.vbm.DropTarget[]}
getItems(): sap.ui.vbm.Route[]
Gets content of aggregation items.

Route object aggregation

Returns:
{sap.ui.vbm.Route[]}
getPosChangeable(): boolean
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.

Returns:
{boolean} Value of property posChangeable
indexOfDragSource(oDragSource): int
Checks for the provided sap.ui.vbm.DragSource in the aggregation dragSource. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.vbm.DragSource}oDragSource The dragSource whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfDropTarget(oDropTarget): int
Checks for the provided sap.ui.vbm.DropTarget in the aggregation dropTarget. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.vbm.DropTarget}oDropTarget The dropTarget whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfItem(oItem): int
Checks for the provided sap.ui.vbm.Route in the aggregation items. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.vbm.Route}oItem The item whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertDragSource(oDragSource, iIndex): sap.ui.vbm.Routes
Inserts a dragSource into the aggregation dragSource.
Parameters:
{sap.ui.vbm.DragSource}oDragSource the dragSource to insert; if empty, nothing is inserted
{int}iIndex 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
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
insertDropTarget(oDropTarget, iIndex): sap.ui.vbm.Routes
Inserts a dropTarget into the aggregation dropTarget.
Parameters:
{sap.ui.vbm.DropTarget}oDropTarget the dropTarget to insert; if empty, nothing is inserted
{int}iIndex 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
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
insertItem(oItem, iIndex): sap.ui.vbm.Routes
Inserts a item into the aggregation items.
Parameters:
{sap.ui.vbm.Route}oItem the item to insert; if empty, nothing is inserted
{int}iIndex 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
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining
removeAllDragSource(): sap.ui.vbm.DragSource[]
Removes all the controls from the aggregation dragSource.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.vbm.DragSource[]} An array of the removed elements (might be empty)
removeAllDropTarget(): sap.ui.vbm.DropTarget[]
Removes all the controls from the aggregation dropTarget.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.vbm.DropTarget[]} An array of the removed elements (might be empty)
removeAllItems(): sap.ui.vbm.Route[]
Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.vbm.Route[]} An array of the removed elements (might be empty)
removeDragSource(vDragSource): sap.ui.vbm.DragSource
Removes a dragSource from the aggregation dragSource.
Parameters:
{int|string|sap.ui.vbm.DragSource}vDragSource The dragSourceto remove or its index or id
Returns:
{sap.ui.vbm.DragSource} The removed dragSource or null
removeDropTarget(vDropTarget): sap.ui.vbm.DropTarget
Removes a dropTarget from the aggregation dropTarget.
Parameters:
{int|string|sap.ui.vbm.DropTarget}vDropTarget The dropTargetto remove or its index or id
Returns:
{sap.ui.vbm.DropTarget} The removed dropTarget or null
removeItem(vItem): sap.ui.vbm.Route
Removes a item from the aggregation items.
Parameters:
{int|string|sap.ui.vbm.Route}vItem The itemto remove or its index or id
Returns:
{sap.ui.vbm.Route} The removed item or null
setPosChangeable(bPosChangeable): sap.ui.vbm.Routes
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.

Parameters:
{boolean}bPosChangeable New value for property posChangeable
Returns:
{sap.ui.vbm.Routes} Reference to this in order to allow method chaining