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:
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 |
Name | Type | Default Value | Description |
---|---|---|---|
alignment | string | 5 | Alignment of the spot to its position:
|
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 |
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. |
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:
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 |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
dragSource | 0..n | sap.ui.vbm.DragSource |
DragSource aggregation |
dropTarget | 0..n | sap.ui.vbm.DropTarget |
DropTarget aggregation |
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
|
getAlignment |
Gets current value of property alignment. Alignment of the spot to its position:
Default value is |
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 |
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 |
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 |
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 |
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 |
indexOfDropTarget |
Checks for the provided |
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:
When called with a value of Default value is |
setContentColor |
Sets a new value for property contentColor. The color of the content ( icon or text ). When called with a value of |
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 Default value is |
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 Default value is |
setContentSize |
Sets a new value for property contentSize. The font size to be used for text or icon When called with a value of |
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 |
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 |
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 |
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 Default value is |
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 Default value is |
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 |
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 |
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 |
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 |
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 |
Gets current value of property alignment.
Alignment of the spot to its position:
Default value is '5'
.
Gets current value of property contentColor.
The color of the content ( icon or text ).
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'
.
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'
.
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")
Gets current value of property image.
The image for the spot. This must be a reference to a resource.
Gets current value of property imageSelected.
The image for the spot when selected. This must be a reference to a resource.
Gets current value of property position.
The position of the spot. The format is "lon;lat;0"
Default value is '0;0;0'
.
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'
.
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 ).
Gets current value of property type.
Spot type for semantic spots. A given semantic type will overrule settings for image, scale, and content.
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 |
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 |
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 |
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 |
Removes all the controls from the aggregation dragSource.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation dropTarget.
Additionally, it unregisters them from the hosting UIArea.
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |