class sap.ui.vk.RedlineSurface

Control sample: sap.ui.vk.RedlineSurface
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vk/RedlineSurface
Application Component: CA-UI5-VTK

Provides a bass class control for redlining.


Constructor

Constructor for a new RedlineSurface.

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

Properties

Name Type Default Value Description
panningRatio float 1 Visibility: public
virtualLeft float Visibility: public
virtualSideLength float Visibility: public
virtualTop float Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
redlineElements 0..n sap.ui.vk.RedlineElement

Events Overview

Event Description
pan
zoom

pan

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
deltaX float
deltaY float

zoom

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
originX float
originY float
zoomFactor float

Methods Overview

Method Description
addRedlineElement

Adds some redlineElement to the aggregation redlineElements.

attachPan

Attaches event handler fnFunction to the pan event of this sap.ui.vk.RedlineSurface.

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

attachZoom

Attaches event handler fnFunction to the zoom event of this sap.ui.vk.RedlineSurface.

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

destroyRedlineElements

Destroys all the redlineElements in the aggregation redlineElements.

detachPan

Detaches event handler fnFunction from the pan event of this sap.ui.vk.RedlineSurface.

The passed function and listener object must match the ones used for event registration.

detachZoom

Detaches event handler fnFunction from the zoom event of this sap.ui.vk.RedlineSurface.

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

Creates a new subclass of class sap.ui.vk.RedlineSurface 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.core.Control.extend.

firePan

Fires event pan to attached listeners.

fireZoom

Fires event zoom to attached listeners.

sap.ui.vk.RedlineSurface.getMetadata

Returns a metadata object for class sap.ui.vk.RedlineSurface.

getPanningRatio

Gets current value of property panningRatio.

Default value is 1.

getRedlineElements

Gets content of aggregation redlineElements.

getVirtualLeft

Gets current value of property virtualLeft.

getVirtualSideLength

Gets current value of property virtualSideLength.

getVirtualTop

Gets current value of property virtualTop.

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.

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.

setPanningRatio

Sets a new value for property panningRatio.

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

Default value is 1.

setVirtualLeft

Sets a new value for property virtualLeft.

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

setVirtualSideLength

Sets a new value for property virtualSideLength.

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

setVirtualTop

Sets a new value for property virtualTop.

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

updatePanningRatio

Updates the panning ratio by making calculations based on virtual viewport size and actual viewport size.

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

attachPan

Attaches event handler fnFunction to the pan event of this sap.ui.vk.RedlineSurface.

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

attachZoom

Attaches event handler fnFunction to the zoom event of this sap.ui.vk.RedlineSurface.

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

destroyRedlineElements

Destroys all the redlineElements in the aggregation redlineElements.

detachPan

Detaches event handler fnFunction from the pan event of this sap.ui.vk.RedlineSurface.

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

detachZoom

Detaches event handler fnFunction from the zoom event of this sap.ui.vk.RedlineSurface.

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

Creates a new subclass of class sap.ui.vk.RedlineSurface 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.core.Control.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

firePan

Fires event pan to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

deltaX float
deltaY float

fireZoom

Fires event zoom to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

originX float
originY float
zoomFactor float

sap.ui.vk.RedlineSurface.getMetadata

Returns a metadata object for class sap.ui.vk.RedlineSurface.

getPanningRatio

Gets current value of property panningRatio.

Default value is 1.

getRedlineElements

Gets content of aggregation redlineElements.

getVirtualLeft

Gets current value of property virtualLeft.

getVirtualSideLength

Gets current value of property virtualSideLength.

getVirtualTop

Gets current value of property virtualTop.

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

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

setPanningRatio

Sets a new value for property panningRatio.

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

Default value is 1.

Param Type DefaultValue Description
fPanningRatio float 1

New value for property panningRatio

setVirtualLeft

Sets a new value for property virtualLeft.

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

Param Type DefaultValue Description
fVirtualLeft float

New value for property virtualLeft

setVirtualSideLength

Sets a new value for property virtualSideLength.

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

Param Type DefaultValue Description
fVirtualSideLength float

New value for property virtualSideLength

setVirtualTop

Sets a new value for property virtualTop.

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

Param Type DefaultValue Description
fVirtualTop float

New value for property virtualTop

updatePanningRatio

Updates the panning ratio by making calculations based on virtual viewport size and actual viewport size.