Class sap.ushell.components.factsheet.controls.PictureViewerModule: sap/ushell/components/factsheet/controls/PictureViewer
Picture viewer control relying on the TileContainer control
Deprecated API:Since version 1.22. PictureViewer was replacing the Carousel as it wasn't supporting some versions of MS Internet Explorer. Now, the sap.m.Carousel is fully functional, please use sap.m.Carousel instead. This control will not be supported anymore.
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the 'pictureDeleted' event of this sap.ushell.components.factsheet.controls.PictureViewer
.fnFunction
from the 'pictureDeleted' event of this sap.ushell.components.factsheet.controls.PictureViewer
.sap.ushell.components.factsheet.controls.PictureViewerItem
in the aggregation named items
and returns its index if found or -1 otherwise. Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers.
If the name of a setting is ambiguous (e.g. a property has the same name as an event), then the framework assumes property, aggregation, association, event in that order. To override this automatic resolution, one of the prefixes "aggregation:", "association:" or "event:" can be added to the name of the setting (such a prefixed name must be enclosed in single or double quotes).
The supported settings are:
- Properties
- tileScaling : float (default: 0.95)
- removable : boolean (default: false)
- Aggregations
- items(default aggregation) : sap.ushell.components.factsheet.controls.PictureViewerItem[]
- Associations
- Events
- pictureDeleted : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.m.TileContainer can be used as well.
{string} | sId? | id for the new control, generated automatically if no id is given |
{object} | mSettings? | initial settings for the new control |
- Deprecated:
- Since version 1.22. PictureViewer was replacing the Carousel as it wasn't supporting some versions of MS Internet Explorer. Now, the sap.m.Carousel is fully functional, please use sap.m.Carousel instead. This control will not be supported anymore.
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters |
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of informations as described in Element.extend.
{string} | sClassName | name of the class to be created |
{object} | oClassInfo? | object literal with informations about the class |
{function} | FNMetaImpl? | constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata. |
{function} | the created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
fnFunction
to the 'pictureDeleted' event of this sap.ushell.components.factsheet.controls.PictureViewer
.. When called, the context of the event handler (its
this
) will be bound to oListener if specified otherwise to this sap.ushell.components.factsheet.controls.PictureViewer
.
itself. Thrown when user delete an image
Parameters:
{object} | oData? | An application specific payload object, that will be passed to the event handler along with the event object when firing the event. |
{function} | fnFunction | The function to call, when the event occurs. |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ushell.components.factsheet.controls.PictureViewer .itself. |
Returns:
{sap.ushell.components.factsheet.controls.PictureViewer} | this to allow method chaining |
deletePicture(iIndex, iIndex): sap.ushell.components.factsheet.controls.PictureViewer Removes the picture at index iIndex
from the items
aggregation. Parameters:{sap.ushell.components.factsheet.controls.PictureViewerItem} iIndex the index of the picture to delete; if empty, the current picture is deleted {int} iIndex the 0
-based index of the picture collection to delete; if iIndex
is out of range or empty, the current image will be deleted.
Returns:{sap.ushell.components.factsheet.controls.PictureViewer} this
to allow method chaining
destroyItems(): sap.ushell.components.factsheet.controls.PictureViewer Destroys all the items in the aggregation named items
. Returns:{sap.ushell.components.factsheet.controls.PictureViewer} this
to allow method chaining
detachPictureDeleted(fnFunction, oListener): sap.ushell.components.factsheet.controls.PictureViewer Detach event handler fnFunction
from the 'pictureDeleted' event of this sap.ushell.components.factsheet.controls.PictureViewer
.
The passed function and listener object must match the ones used for event registration.
Parameters:{function} fnFunction The function to call, when the event occurs. {object} oListener Context object on which the given function had to be called.
Returns:{sap.ushell.components.factsheet.controls.PictureViewer} this
to allow method chaining
firePictureDeleted(mArguments?): sap.ushell.components.factsheet.controls.PictureViewer Fire event pictureDeleted to attached listeners. Parameters:{Map} mArguments? the arguments to pass along with the event.
Returns:{sap.ushell.components.factsheet.controls.PictureViewer} this
to allow method chaining
getCurrentPictureIndex(): sap.ushell.components.factsheet.controls.PictureViewer Gets the current picture index. Returns:{sap.ushell.components.factsheet.controls.PictureViewer} the current picture index
Getter for aggregation items
.
Aggregation of PictureViewerItem that contains either a picture URI or the actual Image control. Note: this is the default aggregation for components/factsheet/controls/PictureViewer.
Returns:{sap.ushell.components.factsheet.controls.PictureViewerItem[]}
getRemovable(): boolean Getter for property removable
. Defines whether or not you can remove a picture Default value is false
Returns:{boolean} the value of property removable
getTileScaling(): float Getter for property tileScaling
. Percentage of the space occupied by the image in the picture viewer control. Please note that if the factor is too close to 1, the navigation arrows usually displayed in desktop mode will not be available Default value is 0.95
Returns:{float} the value of property tileScaling
indexOfItem(oItem): int Checks for the provided sap.ushell.components.factsheet.controls.PictureViewerItem
in the aggregation named items
and returns its index if found or -1 otherwise. Parameters:{sap.ushell.components.factsheet.controls.PictureViewerItem} oItem the item whose index is looked for.
Returns:{int} the index of the provided control in the aggregation if found, or -1 otherwise
removeAllItems(): sap.ushell.components.factsheet.controls.PictureViewerItem[] Removes all the controls in the aggregation named items
.
Additionally unregisters them from the hosting UIArea. Returns:{sap.ushell.components.factsheet.controls.PictureViewerItem[]} an array of the removed elements (might be empty)
removeItem(vItem): sap.ushell.components.factsheet.controls.PictureViewerItem Removes an item from the aggregation named items
. Parameters:{int|string|sap.ushell.components.factsheet.controls.PictureViewerItem} vItem the item to remove or its index or id
Returns:{sap.ushell.components.factsheet.controls.PictureViewerItem} the removed item or null
selectPicture(iIndex, iIndex): sap.ushell.components.factsheet.controls.PictureViewer Select the picture at index iIndex
from the items
aggregation. Parameters:{sap.ushell.components.factsheet.controls.PictureViewerItem} iIndex the index of the picture to select; if empty, the first picture is selected {int} iIndex the 0
-based index of the aggregation to select; for a negative value of iIndex
, the picture at position 0 is selected; for a value greater than the current size of the aggregation, the selected picture at the last position is selected
Returns:{sap.ushell.components.factsheet.controls.PictureViewer} this
to allow method chaining
setRemovable() Specify whether or not you can delete a picture. If FALSE the delete button will never be visible. Default value is TRUE
setTileScaling(fTileScale) Set the percentage of the space occupied by the image in the picture viewer control. Please note that if the factor is too close to 1, the navigation arrows usually displayed in desktop mode will not be available Parameters:fTileScale
addItem(oItem): sap.ushell.components.factsheet.controls.PictureViewer Adds some item oItem
to the aggregation named items
. Parameters:{sap.ushell.components.factsheet.controls.PictureViewerItem} oItem the item to add; if empty, nothing is inserted
- Deprecated:
- Use aggregation "tiles"
Returns:{sap.ushell.components.factsheet.controls.PictureViewer} this
to allow method chaining
insertItem(oItem, iIndex): sap.ushell.components.factsheet.controls.PictureViewer Inserts a item into the aggregation named items
. When adding a new item to the aggregation, a sap.ca.ui.PictureTile is actually created with its own ID and added to the internal TileContainer. Parameters:{sap.ushell.components.factsheet.controls.PictureViewerItem} oItem the item to insert; if empty, nothing is inserted {int} iIndex the 0
-based index the item should be inserted at; for a negative value of iIndex
, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position
- Deprecated:
- Use aggregation "tiles"
Returns:{sap.ushell.components.factsheet.controls.PictureViewer} this
to allow method chaining