class sap.ui.vbm.Spot

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

Specific Visual Object element for a Spot. A Spot is actually an image drawn at the given position. There are two modes for using spots:

Beside the visualization with an image a spot can have an icon or text, which can be controlled and positioned using the content properties.
A Spot supports 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. Drag source and drop target types defined on element level apply only for a single element instance, except the element is used as template.


Constructor

Constructor for a new Spot.

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.Spot(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
alignment string 5

Alignment of the spot to its position:

  • 0: center
  • 1: top center
  • 2: top right
  • 3: center right
  • 4: bottom right
  • 5: bottom center
  • 6: bottom left
  • 7: center left
  • 8: top left

Visibility: public
contentColor string

The color of the content ( icon or text ).

Visibility: public
contentFont string arial

The font of the spot's text. If icon is used then the font is automatically set to"SAP-icons".

Visibility: public
contentOffset string 0;0

The offset from the center of the image where to place the content ( text or icon ) in x;y- direction

Visibility: public
contentSize string

The font size to be used for text or icon

Visibility: public
icon string

The icon to be rendered on the spot. Note that either text or icon may be displayed ( not both together ). Use the CharCode-Id of SAPUI5-Icons (e.g.: "\ue146")

Visibility: public
image string

The image for the spot. This must be a reference to a resource.

Visibility: public
imageSelected string

The image for the spot when selected. This must be a reference to a resource.

Visibility: public
position string 0;0;0

The position of the spot. The format is "lon;lat;0"

Visibility: public
scale string 1;1;1

The scale of the spot. The format is "x-Scale;y-Scale;z-Scale". The z-Scale is curretly ignored.

Visibility: public
text string

The text that is displayed on the spot. The text should not exceed a few characters. Note that either text or icon may be displayed ( not both together ).

Visibility: public
type sap.ui.vbm.SemanticType

Spot type for semantic spots. A given semantic type will overrule settings for image, scale, and content.

Visibility: public

Borrowed Properties

Name Type Default Value Description
changeable boolean false

Set to true if VO is changeable. Which properties are actually changeable can be controlled on the related VO aggregation.

Visibility: public
dragData string

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

Visibility: public
entity string

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.

Visibility: public
fxdir string true

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.

Visibility: public
fxsize string true

The visual object should keep its size when the map is zoomed. Default value is 'true'. Only meaningful for some VOs.

Visibility: public
hotDeltaColor string RHLSA(0;1.3;1.0;1.0)

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

Visibility: public
hotScale string 1.0;1.0;1.0

Scaling factor applied when visual object is hovered. This is only supported on selected VOs, which do not present a defined geo area.

Visibility: public
key string

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.

Visibility: public
labelArrow boolean false

The visual objects label arrow. For left/right/top/bottom aligned labels an additional arrow points to the label's object.

Visibility: public
labelBgColor string RGB(255;255;255)

The visual objects label background color. The default value is white.

Visibility: public
labelBorderColor string

The visual objects label border color. The default is no border.

Visibility: public
labelPos string

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
The default alignment is VO specific.
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.

Visibility: public
labelText string

The visual objects label text. Providing a label text required, but also sufficient the get a label displayed.

Visibility: public
labelType sap.ui.vbm.SemanticType None

Type for semantic labels. A given semantic type will overrule color settings and add an icon.

Visibility: public
select boolean false

Set to true if the element is selected

Visibility: public
selectColor string RHLSA(0.0;1.0;1.0;1.0)

Color change applied when visual object is selected. This can be explicit or a relative one. See above.

Visibility: public

Aggregations

Default Aggregation:

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

DragSource aggregation

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

DropTarget aggregation


Methods Overview

Method Description
addDragSource

Adds some dragSource to the aggregation dragSource.

addDropTarget

Adds some dropTarget to the aggregation dropTarget.

destroyDragSource

Destroys all the dragSource in the aggregation dragSource.

destroyDropTarget

Destroys all the dropTarget in the aggregation dropTarget.

sap.ui.vbm.Spot.extend

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

getAlignment

Gets current value of property alignment.

Alignment of the spot to its position:

  • 0: center
  • 1: top center
  • 2: top right
  • 3: center right
  • 4: bottom right
  • 5: bottom center
  • 6: bottom left
  • 7: center left
  • 8: top left

Default value is '5'.

getContentColor

Gets current value of property contentColor.

The color of the content ( icon or text ).

getContentFont

Gets current value of property contentFont.

The font of the spot's text. If icon is used then the font is automatically set to"SAP-icons".

Default value is 'arial'.

getContentOffset

Gets current value of property contentOffset.

The offset from the center of the image where to place the content ( text or icon ) in x;y- direction

Default value is '0;0'.

getContentSize

Gets current value of property contentSize.

The font size to be used for text or icon

getDragSource

Gets content of aggregation dragSource.

DragSource aggregation

getDropTarget

Gets content of aggregation dropTarget.

DropTarget aggregation

getIcon

Gets current value of property icon.

The icon to be rendered on the spot. Note that either text or icon may be displayed ( not both together ). Use the CharCode-Id of SAPUI5-Icons (e.g.: "\ue146")

getImage

Gets current value of property image.

The image for the spot. This must be a reference to a resource.

getImageSelected

Gets current value of property imageSelected.

The image for the spot when selected. This must be a reference to a resource.

sap.ui.vbm.Spot.getMetadata

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

getPosition

Gets current value of property position.

The position of the spot. The format is "lon;lat;0"

Default value is '0;0;0'.

getScale

Gets current value of property scale.

The scale of the spot. The format is "x-Scale;y-Scale;z-Scale". The z-Scale is curretly ignored.

Default value is '1;1;1'.

getText

Gets current value of property text.

The text that is displayed on the spot. The text should not exceed a few characters. Note that either text or icon may be displayed ( not both together ).

getType

Gets current value of property type.

Spot type for semantic spots. A given semantic type will overrule settings for image, scale, and content.

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.

insertDragSource

Inserts a dragSource into the aggregation dragSource.

insertDropTarget

Inserts a dropTarget into the aggregation dropTarget.

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.

removeDragSource

Removes a dragSource from the aggregation dragSource.

removeDropTarget

Removes a dropTarget from the aggregation dropTarget.

setAlignment

Sets a new value for property alignment.

Alignment of the spot to its position:

  • 0: center
  • 1: top center
  • 2: top right
  • 3: center right
  • 4: bottom right
  • 5: bottom center
  • 6: bottom left
  • 7: center left
  • 8: top left

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

Default value is '5'.

setContentColor

Sets a new value for property contentColor.

The color of the content ( icon or text ).

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

setContentFont

Sets a new value for property contentFont.

The font of the spot's text. If icon is used then the font is automatically set to"SAP-icons".

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

Default value is 'arial'.

setContentOffset

Sets a new value for property contentOffset.

The offset from the center of the image where to place the content ( text or icon ) in x;y- direction

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

Default value is '0;0'.

setContentSize

Sets a new value for property contentSize.

The font size to be used for text or icon

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

setIcon

Sets a new value for property icon.

The icon to be rendered on the spot. Note that either text or icon may be displayed ( not both together ). Use the CharCode-Id of SAPUI5-Icons (e.g.: "\ue146")

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

setImage

Sets a new value for property image.

The image for the spot. This must be a reference to a resource.

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

setImageSelected

Sets a new value for property imageSelected.

The image for the spot when selected. This must be a reference to a resource.

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

setPosition

Sets a new value for property position.

The position of the spot. The format is "lon;lat;0"

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

Default value is '0;0;0'.

setScale

Sets a new value for property scale.

The scale of the spot. The format is "x-Scale;y-Scale;z-Scale". The z-Scale is curretly ignored.

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

Default value is '1;1;1'.

setText

Sets a new value for property text.

The text that is displayed on the spot. The text should not exceed a few characters. Note that either text or icon may be displayed ( not both together ).

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

setType

Sets a new value for property type.

Spot type for semantic spots. A given semantic type will overrule settings for image, scale, and content.

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

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

destroyDragSource

Destroys all the dragSource in the aggregation dragSource.

destroyDropTarget

Destroys all the dropTarget in the aggregation dropTarget.

sap.ui.vbm.Spot.extend

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

getAlignment

Gets current value of property alignment.

Alignment of the spot to its position:

Default value is '5'.

getContentColor

Gets current value of property contentColor.

The color of the content ( icon or text ).

getContentFont

Gets current value of property contentFont.

The font of the spot's text. If icon is used then the font is automatically set to"SAP-icons".

Default value is 'arial'.

getContentOffset

Gets current value of property contentOffset.

The offset from the center of the image where to place the content ( text or icon ) in x;y- direction

Default value is '0;0'.

getContentSize

Gets current value of property contentSize.

The font size to be used for text or icon

getDragSource

Gets content of aggregation dragSource.

DragSource aggregation

getDropTarget

Gets content of aggregation dropTarget.

DropTarget aggregation

getIcon

Gets current value of property icon.

The icon to be rendered on the spot. Note that either text or icon may be displayed ( not both together ). Use the CharCode-Id of SAPUI5-Icons (e.g.: "\ue146")

getImage

Gets current value of property image.

The image for the spot. This must be a reference to a resource.

getImageSelected

Gets current value of property imageSelected.

The image for the spot when selected. This must be a reference to a resource.

sap.ui.vbm.Spot.getMetadata

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

getPosition

Gets current value of property position.

The position of the spot. The format is "lon;lat;0"

Default value is '0;0;0'.

getScale

Gets current value of property scale.

The scale of the spot. The format is "x-Scale;y-Scale;z-Scale". The z-Scale is curretly ignored.

Default value is '1;1;1'.

getText

Gets current value of property text.

The text that is displayed on the spot. The text should not exceed a few characters. Note that either text or icon may be displayed ( not both together ).

getType

Gets current value of property type.

Spot type for semantic spots. A given semantic type will overrule settings for image, scale, and content.

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

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

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.

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

setAlignment

Sets a new value for property alignment.

Alignment of the spot to its position:

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

Default value is '5'.

Param Type DefaultValue Description
sAlignment string '5'

New value for property alignment

setContentColor

Sets a new value for property contentColor.

The color of the content ( icon or text ).

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

Param Type DefaultValue Description
sContentColor string

New value for property contentColor

setContentFont

Sets a new value for property contentFont.

The font of the spot's text. If icon is used then the font is automatically set to"SAP-icons".

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

Default value is 'arial'.

Param Type DefaultValue Description
sContentFont string 'arial'

New value for property contentFont

setContentOffset

Sets a new value for property contentOffset.

The offset from the center of the image where to place the content ( text or icon ) in x;y- direction

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

Default value is '0;0'.

Param Type DefaultValue Description
sContentOffset string '0;0'

New value for property contentOffset

setContentSize

Sets a new value for property contentSize.

The font size to be used for text or icon

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

Param Type DefaultValue Description
sContentSize string

New value for property contentSize

setIcon

Sets a new value for property icon.

The icon to be rendered on the spot. Note that either text or icon may be displayed ( not both together ). Use the CharCode-Id of SAPUI5-Icons (e.g.: "\ue146")

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

Param Type DefaultValue Description
sIcon string

New value for property icon

setImage

Sets a new value for property image.

The image for the spot. This must be a reference to a resource.

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

Param Type DefaultValue Description
sImage string

New value for property image

setImageSelected

Sets a new value for property imageSelected.

The image for the spot when selected. This must be a reference to a resource.

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

Param Type DefaultValue Description
sImageSelected string

New value for property imageSelected

setPosition

Sets a new value for property position.

The position of the spot. The format is "lon;lat;0"

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

Default value is '0;0;0'.

Param Type DefaultValue Description
sPosition string '0;0;0'

New value for property position

setScale

Sets a new value for property scale.

The scale of the spot. The format is "x-Scale;y-Scale;z-Scale". The z-Scale is curretly ignored.

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

Default value is '1;1;1'.

Param Type DefaultValue Description
sScale string '1;1;1'

New value for property scale

setText

Sets a new value for property text.

The text that is displayed on the spot. The text should not exceed a few characters. Note that either text or icon may be displayed ( not both together ).

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

Param Type DefaultValue Description
sText string

New value for property text

setType

Sets a new value for property type.

Spot type for semantic spots. A given semantic type will overrule settings for image, scale, and content.

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

Param Type DefaultValue Description
sType sap.ui.vbm.SemanticType

New value for property type