Provides a bass class control for redlining.
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()
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
redlineElements | 0..n | sap.ui.vk.RedlineElement |
Method | Description |
---|---|
addRedlineElement |
Adds some redlineElement to the aggregation redlineElements. |
attachPan |
Attaches event handler When called, the context of the event handler (its |
attachZoom |
Attaches event handler When called, the context of the event handler (its |
destroyRedlineElements |
Destroys all the redlineElements in the aggregation redlineElements. |
detachPan |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachZoom |
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.RedlineSurface.extend |
Creates a new subclass of class sap.ui.vk.RedlineSurface with name
|
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 |
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 |
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 Default value is |
setVirtualLeft |
Sets a new value for property virtualLeft. When called with a value of |
setVirtualSideLength |
Sets a new value for property virtualSideLength. When called with a value of |
setVirtualTop |
Sets a new value for property virtualTop. When called with a value of |
updatePanningRatio |
Updates the panning ratio by making calculations based on virtual viewport size and actual viewport size. |
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 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 |
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 |
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 |
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 |
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 |
Fires event pan to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
deltaX | float | ||
deltaY | float |
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 |
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 |
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 |
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 |
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 |
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 |
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 |