The RedlineTool allows applications to display custom tooltip text on top of 3D object over which pointer is hovering
Constructor for a new RedlineTool.
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.vk.tools.RedlineTool(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID of the new tool instance. |
|
mSettings? | object | An optional map/JSON object with initial property values, aggregated objects etc. for the new tool instance. |
Name | Type | Default Value | Description |
---|---|---|---|
active | boolean | false | Used to control the tool rendering and interaction pipeline. Visibility: public |
footprint | string[] | Used to decide whether this tool should be enabled for the target viewport. Visibility: public |
|
targetViewportType | any | Visibility: public | |
toolid | string | GUID identifier for the tool to prevent naming conflicts. Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
redlineElements | 0..n | sap.ui.vk.RedlineElement |
The redline element/elements which will be rendered as soon as the redline tool is activated. |
Name | Cardinality | Type | Description |
---|---|---|---|
gizmo | 0..1 | sap.ui.vk.tools.Gizmo |
sap.ui.vk.tools.Gizmo owned by this control and used for rendering floating UI |
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
elementId | string |
Method | Description |
---|---|
addRedlineElement |
Adds some redlineElement to the aggregation redlineElements. |
attachElementClicked |
Attaches event handler When called, the context of the event handler (its |
attachElementCreated |
Attaches event handler When called, the context of the event handler (its |
attachElementHovered |
Attaches event handler When called, the context of the event handler (its |
destroyRedlineElements |
Destroys all the redlineElements in the aggregation redlineElements. |
detachElementClicked |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachElementCreated |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachElementHovered |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
exportJSON |
Exports all the current redline elements as an array of JSON objects. |
exportSVG |
Exports all the current redline elements as an array of SVG objects. |
sap.ui.vk.tools.RedlineTool.extend |
Creates a new subclass of class sap.ui.vk.tools.RedlineTool with name
|
fireElementClicked |
Fires event elementClicked to attached listeners. |
fireElementCreated |
Fires event elementCreated to attached listeners. |
fireElementHovered |
Fires event elementHovered to attached listeners. |
sap.ui.vk.tools.RedlineTool.getMetadata |
Returns a metadata object for class sap.ui.vk.tools.RedlineTool. |
getRedlineElements |
Gets content of aggregation redlineElements. The redline element/elements which will be rendered as soon as the redline tool is activated. |
importJSON |
Iterates through all JSON objects from the array passed as parameter, and creates and restores the redline elements serialized in the array. |
importSVG |
Iterates through all SVG objects from the array passed as parameter, and creates and restores the redline elements in the array. |
indexOfRedlineElement |
Checks for the provided |
insertRedlineElement |
Inserts a redlineElement into the aggregation redlineElements. |
queueCommand |
MOVE TO BASE Queues a command for execution during the rendering cycle. All gesture operations should be called using this method. |
removeAllRedlineElements |
Removes all the controls from the aggregation redlineElements. Additionally, it unregisters them from the hosting UIArea. |
removeRedlineElement |
Removes a redlineElement from the aggregation redlineElements. |
startAdding |
Prepares the RedlineTool control for adding a new instance of {sap.ui.vk.RedlineElement}. |
stopAdding |
Stops the mode for adding redlining, which begins when the startAdding method is called. |
Adds some redlineElement to the aggregation redlineElements.
Param | Type | DefaultValue | Description |
---|---|---|---|
oRedlineElement | sap.ui.vk.RedlineElement |
The redlineElement to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the elementClicked event of this sap.ui.vk.tools.RedlineTool
.
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.vk.tools.RedlineTool
itself.
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 |
Attaches event handler fnFunction
to the elementCreated event of this sap.ui.vk.tools.RedlineTool
.
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.vk.tools.RedlineTool
itself.
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 |
Attaches event handler fnFunction
to the elementHovered event of this sap.ui.vk.tools.RedlineTool
.
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.vk.tools.RedlineTool
itself.
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 |
Detaches event handler fnFunction
from the elementClicked event of this sap.ui.vk.tools.RedlineTool
.
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 |
Detaches event handler fnFunction
from the elementCreated event of this sap.ui.vk.tools.RedlineTool
.
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 |
Detaches event handler fnFunction
from the elementHovered event of this sap.ui.vk.tools.RedlineTool
.
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 |
Creates a new subclass of class sap.ui.vk.tools.RedlineTool 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.vk.tools.Tool.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 |
Fires event elementClicked to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
elementId | string |
Fires event elementCreated to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
element | object |
Fires event elementHovered to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
elementId | string |
Returns a metadata object for class sap.ui.vk.tools.RedlineTool.
Gets content of aggregation redlineElements.
The redline element/elements which will be rendered as soon as the redline tool is activated.
Iterates through all JSON objects from the array passed as parameter, and creates and restores the redline elements serialized in the array.
Param | Type | DefaultValue | Description |
---|---|---|---|
jsonElements | object[] |
An array of serialized redline elements. |
Iterates through all SVG objects from the array passed as parameter, and creates and restores the redline elements in the array.
Param | Type | DefaultValue | Description |
---|---|---|---|
svg | object[] |
An array of redline elements in SVG format. |
Checks for the provided sap.ui.vk.RedlineElement
in the aggregation redlineElements. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oRedlineElement | sap.ui.vk.RedlineElement |
The redlineElement whose index is looked for |
Inserts a redlineElement into the aggregation redlineElements.
Param | Type | DefaultValue | Description |
---|---|---|---|
oRedlineElement | sap.ui.vk.RedlineElement |
The redlineElement to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
MOVE TO BASE Queues a command for execution during the rendering cycle. All gesture operations should be called using this method.
Param | Type | DefaultValue | Description |
---|---|---|---|
command | function |
The command to be executed. |
Removes all the controls from the aggregation redlineElements.
Additionally, it unregisters them from the hosting UIArea.
Removes a redlineElement from the aggregation redlineElements.
Param | Type | DefaultValue | Description |
---|---|---|---|
vRedlineElement | int string sap.ui.vk.RedlineElement |
The redlineElement to remove or its index or id |
Prepares the RedlineTool control for adding a new instance of {sap.ui.vk.RedlineElement}.
Param | Type | DefaultValue | Description |
---|---|---|---|
elementInstance | sap.ui.vk.RedlineElement |
The redlining element which needs to be added. |