class sap.ui.vk.tools.RedlineTool

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vk/tools/RedlineTool
Application Component: CA-UI5-VTK

The RedlineTool allows applications to display custom tooltip text on top of 3D object over which pointer is hovering


Constructor

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. sIdis generated automatically if no non-empty ID is given. Note: this can be omitted, regardless of whether mSettings will be provided or not.

mSettings? object

An optional map/JSON object with initial property values, aggregated objects etc. for the new tool instance.

Borrowed Properties

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

Aggregations

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.

Borrowed Aggregations

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


Events Overview

Event Description
elementClicked
elementCreated
elementHovered

elementClicked

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
elementId string

elementCreated

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
element object

elementHovered

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
elementId string

Methods Overview

Method Description
addRedlineElement

Adds some redlineElement to the aggregation redlineElements.

attachElementClicked

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.

attachElementCreated

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.

attachElementHovered

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.

destroyRedlineElements

Destroys all the redlineElements in the aggregation redlineElements.

detachElementClicked

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.

detachElementCreated

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.

detachElementHovered

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.

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

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 sap.ui.vk.RedlineElement in the aggregation redlineElements. and returns its index if found or -1 otherwise.

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.

addRedlineElement

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

attachElementClicked

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 sap.ui.vk.tools.RedlineTool itself

attachElementCreated

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 sap.ui.vk.tools.RedlineTool itself

attachElementHovered

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 sap.ui.vk.tools.RedlineTool itself

destroyRedlineElements

Destroys all the redlineElements in the aggregation redlineElements.

detachElementClicked

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

detachElementCreated

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

detachElementHovered

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

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

fireElementClicked

Fires event elementClicked to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

elementId string

fireElementCreated

Fires event elementCreated to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

element object

fireElementHovered

Fires event elementHovered to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

elementId string

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.

Param Type DefaultValue Description
jsonElements object[]

An array of serialized redline elements.

importSVG

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.

indexOfRedlineElement

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

insertRedlineElement

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 0-based index the redlineElement should be inserted at; for a negative value of iIndex, the redlineElement is inserted at position 0; for a value greater than the current size of the aggregation, the redlineElement is inserted at the last position

queueCommand

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.

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.

Param Type DefaultValue Description
vRedlineElement int string sap.ui.vk.RedlineElement

The redlineElement to remove or its index or id

startAdding

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.

stopAdding

Stops the mode for adding redlining, which begins when the startAdding method is called.