Class sap.ui.vbm.VoBaseModule: sap/ui/vbm/VoBase
Abstract aggregation element for VO aggregations. This element implements the common part for all specific VO elements. It must not be used directly, but is the base for further extension.
As a common feature it provides the Label, which may be attached to any visual object. There are two modes for using labels:
- A controlled mode by providing a label type. In this mode most parameters for the label are automatically set by programmed defaults according to the Fiori guidelines.
- A freestyle mode, providing the full control on colors and layout.
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the click
event of this sap.ui.vbm.VoBase
.fnFunction
to the contextMenu
event of this sap.ui.vbm.VoBase
.fnFunction
to the drop
event of this sap.ui.vbm.VoBase
.fnFunction
to the handleClick
event of this sap.ui.vbm.VoBase
.fnFunction
to the handleContextMenu
event of this sap.ui.vbm.VoBase
.fnFunction
to the handleMoved
event of this sap.ui.vbm.VoBase
.fnFunction
from the click
event of this sap.ui.vbm.VoBase
.fnFunction
from the contextMenu
event of this sap.ui.vbm.VoBase
.fnFunction
from the drop
event of this sap.ui.vbm.VoBase
.fnFunction
from the handleClick
event of this sap.ui.vbm.VoBase
.fnFunction
from the handleContextMenu
event of this sap.ui.vbm.VoBase
.fnFunction
from the handleMoved
event of this sap.ui.vbm.VoBase
. 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
- key : string
- hotScale : string (default: 1.0;1.0;1.0)
- hotDeltaColor : string (default: RHLSA(0;1.3;1.0;1.0))
- selectColor : string (default: RHLSA(0.0;1.0;1.0;1.0))
- fxsize : string (default: true)
- fxdir : string (default: true)
- entity : string
- labelText : string
- labelType : sap.ui.vbm.SemanticType (default: None)
- labelBgColor : string (default: RGB(255;255;255))
- labelBorderColor : string
- labelArrow : boolean (default: false)
- labelPos : string
- changeable : boolean (default: false)
- dragData : string
- select : boolean (default: false)
- Events
- click : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- contextMenu : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- handleMoved : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- handleContextMenu : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- handleClick : 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.core.Element can be used as well.
{string} | sId? | id for the new control, generated automatically if no id is given |
{object} | mSettings? | initial settings for the new control |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{sap.ui.unified.Menu} | oControlEvent.getParameters.menu | Menu to open |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{sap.ui.vbm.VoBase} | oControlEvent.getParameters.dragSource | Dragged instance |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{int} | oControlEvent.getParameters.handle | The number of the handle where the click occured. Handles are numbered zero based. |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{int} | oControlEvent.getParameters.handle | The number of the handle where the click occured. Handles are numbered zero based. |
{sap.ui.unified.Menu} | oControlEvent.getParameters.menu | Menu to open |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{int} | oControlEvent.getParameters.handle | The number of the handle where the click occured. Handles are numbered zero based. |
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.
{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 |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
fnFunction
to the click
event of this sap.ui.vbm.VoBase
. 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.VoBase
itself.
The event is raised when there is a click action on a visual object.
{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.VoBase itself |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fnFunction
to the contextMenu
event of this sap.ui.vbm.VoBase
. 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.VoBase
itself.
The event is raised when there is a right click or a tap and hold action on a visual object.
{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.VoBase itself |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fnFunction
to the drop
event of this sap.ui.vbm.VoBase
. 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.VoBase
itself.
The event is raised when something is dropped on the object.
{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.VoBase itself |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fnFunction
to the handleClick
event of this sap.ui.vbm.VoBase
. 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.VoBase
itself.
This event is raised when the design handle is clicked.
{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.VoBase itself |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fnFunction
to the handleContextMenu
event of this sap.ui.vbm.VoBase
. 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.VoBase
itself.
This event is raised when the design handle is right clicked.
{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.VoBase itself |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fnFunction
to the handleMoved
event of this sap.ui.vbm.VoBase
. 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.VoBase
itself.
This event is raised when the design handle is moved.
{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.VoBase itself |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fnFunction
from the click
event of this sap.ui.vbm.VoBase
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fnFunction
from the contextMenu
event of this sap.ui.vbm.VoBase
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fnFunction
from the drop
event of this sap.ui.vbm.VoBase
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fnFunction
from the handleClick
event of this sap.ui.vbm.VoBase
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fnFunction
from the handleContextMenu
event of this sap.ui.vbm.VoBase
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fnFunction
from the handleMoved
event of this sap.ui.vbm.VoBase
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
click
to attached listeners. {Map} | mArguments? | The arguments to pass along with the event |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
contextMenu
to attached listeners. Expects the following event parameters:
menu
of typesap.ui.unified.Menu
Menu to open
{Map} | mArguments? | The arguments to pass along with the event |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
drop
to attached listeners. Expects the following event parameters:
dragSource
of typesap.ui.vbm.VoBase
Dragged instance
{Map} | mArguments? | The arguments to pass along with the event |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
handleClick
to attached listeners. Expects the following event parameters:
handle
of typeint
The number of the handle where the click occured. Handles are numbered zero based.
{Map} | mArguments? | The arguments to pass along with the event |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
handleContextMenu
to attached listeners. Expects the following event parameters:
handle
of typeint
The number of the handle where the click occured. Handles are numbered zero based.menu
of typesap.ui.unified.Menu
Menu to open
{Map} | mArguments? | The arguments to pass along with the event |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
handleMoved
to attached listeners. Expects the following event parameters:
handle
of typeint
The number of the handle where the click occured. Handles are numbered zero based.
{Map} | mArguments? | The arguments to pass along with the event |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
changeable
. Set to true if VO is changeable. Which properties are actually changeable can be controlled on the related VO aggregation.
Default value is false
.
{boolean} | Value of property changeable |
dragData
. Data to be dragged. This property allows you to provide an arbitrary data string, which is transfered to the target in a drag'n drop operation
{string} | Value of property dragData |
entity
. The visual object builds an entity/group with other VO elements when it is hovered. The property is not supported when the PlugIn is used.
{string} | Value of property entity |
fxdir
. The visual object is not rotated when the map is rotated. The property is only required when the PlugIn is used and only meaningful for some VOs.
Default value is true
.
{string} | Value of property fxdir |
fxsize
. The visual object should keep its size when the map is zoomed. Default value is 'true'. Only meaningful for some VOs.
Default value is true
.
{string} | Value of property fxsize |
hotDeltaColor
. Color change applied when visual object is hovered. The format is RHLSA(<hue>;<lightness>;<saturation>;<opacity>). The hue shift is given in degree (0 to 360). The other parameters are given as multipliers, where 1 means the component remains unchanged.
Beside the delta color approach it is also possible to specify an absolute color in the usual CSS color formats (except named colors).
Default value is RHLSA(0;1.3;1.0;1.0)
.
{string} | Value of property hotDeltaColor |
hotScale
. Scaling factor applied when visual object is hovered. This is only supported on selected VOs, which do not present a defined geo area.
Default value is 1.0;1.0;1.0
.
{string} | Value of property hotScale |
key
. Unique identifier for the object. This is optional. If not provided the default identifier sId is used. However, sId is generated if template binding is used and thus it is not stable. Provide the key if the object really needs to have a unique and stable identifier.
{string} | Value of property key |
labelArrow
. The visual objects label arrow. For left/right/top/bottom aligned labels an additional arrow points to the label's object.
Default value is false
.
{boolean} | Value of property labelArrow |
labelBgColor
. The visual objects label background color. The default value is white.
Default value is RGB(255;255;255)
.
{string} | Value of property labelBgColor |
labelBorderColor
. The visual objects label border color. The default is no border.
{string} | Value of property labelBorderColor |
labelPos
. The visual objects label position. This property determines the positioning of the label relative to the VO it belongs to. Possible values are:
- 0: centered
- 1: top
- 2: top right
- 3: right
- 4: bottom right
- 5: bottom
- 6: bottom left
- 7: left
- 8: top left
For multiple position based VOs, like Route, or Area the label is dynamically positioned. If the current display of a VO consists of multiple disconnected parts, each part gets an own label.
{string} | Value of property labelPos |
labelText
. The visual objects label text. Providing a label text required, but also sufficient the get a label displayed.
{string} | Value of property labelText |
labelType
. Type for semantic labels. A given semantic type will overrule color settings and add an icon.
Default value is None
.
{sap.ui.vbm.SemanticType} | Value of property labelType |
select
. Set to true if the element is selected
Default value is false
.
{boolean} | Value of property select |
selectColor
. Color change applied when visual object is selected. This can be explicit or a relative one. See above.
Default value is RHLSA(0.0;1.0;1.0;1.0)
.
{string} | Value of property selectColor |
{object} | oMenu | The context menu to be opened. The object is expected the have an attribute |
{string} | sCaption | Caption of detail window |
{string} | sOffsetX | Position offset in x-direction from the anchor point |
{string} | sOffsetY | Position offset in y-direction from the anchor point |
changeable
. Set to true if VO is changeable. Which properties are actually changeable can be controlled on the related VO aggregation.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bChangeable | New value for property changeable |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
dragData
. Data to be dragged. This property allows you to provide an arbitrary data string, which is transfered to the target in a drag'n drop operation
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sDragData | New value for property dragData |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
entity
. The visual object builds an entity/group with other VO elements when it is hovered. The property is not supported when the PlugIn is used.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sEntity | New value for property entity |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fxdir
. The visual object is not rotated when the map is rotated. The property is only required when the PlugIn is used and only meaningful for some VOs.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{string} | sFxdir | New value for property fxdir |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
fxsize
. The visual object should keep its size when the map is zoomed. Default value is 'true'. Only meaningful for some VOs.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{string} | sFxsize | New value for property fxsize |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
hotDeltaColor
. Color change applied when visual object is hovered. The format is RHLSA(<hue>;<lightness>;<saturation>;<opacity>). The hue shift is given in degree (0 to 360). The other parameters are given as multipliers, where 1 means the component remains unchanged.
Beside the delta color approach it is also possible to specify an absolute color in the usual CSS color formats (except named colors).
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is RHLSA(0;1.3;1.0;1.0)
.
{string} | sHotDeltaColor | New value for property hotDeltaColor |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
hotScale
. Scaling factor applied when visual object is hovered. This is only supported on selected VOs, which do not present a defined geo area.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1.0;1.0;1.0
.
{string} | sHotScale | New value for property hotScale |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
key
. Unique identifier for the object. This is optional. If not provided the default identifier sId is used. However, sId is generated if template binding is used and thus it is not stable. Provide the key if the object really needs to have a unique and stable identifier.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sKey | New value for property key |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
labelArrow
. The visual objects label arrow. For left/right/top/bottom aligned labels an additional arrow points to the label's object.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bLabelArrow | New value for property labelArrow |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
labelBgColor
. The visual objects label background color. The default value is white.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is RGB(255;255;255)
.
{string} | sLabelBgColor | New value for property labelBgColor |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
labelBorderColor
. The visual objects label border color. The default is no border.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sLabelBorderColor | New value for property labelBorderColor |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
labelPos
. The visual objects label position. This property determines the positioning of the label relative to the VO it belongs to. Possible values are:
- 0: centered
- 1: top
- 2: top right
- 3: right
- 4: bottom right
- 5: bottom
- 6: bottom left
- 7: left
- 8: top left
For multiple position based VOs, like Route, or Area the label is dynamically positioned. If the current display of a VO consists of multiple disconnected parts, each part gets an own label.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sLabelPos | New value for property labelPos |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
labelText
. The visual objects label text. Providing a label text required, but also sufficient the get a label displayed.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sLabelText | New value for property labelText |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
labelType
. Type for semantic labels. A given semantic type will overrule color settings and add an icon.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is None
.
{sap.ui.vbm.SemanticType} | sLabelType | New value for property labelType |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
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
.
{boolean} | bSelect | New value for property select |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |
selectColor
. Color change applied when visual object is selected. This can be explicit or a relative one. See above.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is RHLSA(0.0;1.0;1.0;1.0)
.
{string} | sSelectColor | New value for property selectColor |
{sap.ui.vbm.VoBase} | Reference to this in order to allow method chaining |