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.

Constructor Summary
new sap.ushell.components.factsheet.controls.PictureViewer(sId?, mSettings?)Constructor for a new components/factsheet/controls/PictureViewer.
Event Summary
pictureDeleted(oControlEvent)Thrown when user delete an image
Events borrowed from class sap.m.TileContainer
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ushell.components.factsheet.controls.PictureViewer.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ushell.components.factsheet.controls.PictureViewer with name sClassName and enriches it with the information contained in oClassInfo.
sap.ushell.components.factsheet.controls.PictureViewer.getMetadata()Returns a metadata object for class sap.ushell.components.factsheet.controls.PictureViewer.
attachPictureDeleted(oData?, fnFunction, oListener?)Attach event handler fnFunction to the 'pictureDeleted' event of this sap.ushell.components.factsheet.controls.PictureViewer.
deletePicture(iIndex, iIndex)Removes the picture at index iIndex from the items aggregation.
destroyItems()Destroys all the items in the aggregation named items.
detachPictureDeleted(fnFunction, oListener)Detach event handler fnFunction from the 'pictureDeleted' event of this sap.ushell.components.factsheet.controls.PictureViewer.
firePictureDeleted(mArguments?)Fire event pictureDeleted to attached listeners.
getCurrentPictureIndex()Gets the current picture index.
getItems()Getter for aggregation items.
getRemovable()Getter for property removable.
getTileScaling()Getter for property tileScaling.
indexOfItem(oItem)Checks for the provided sap.ushell.components.factsheet.controls.PictureViewerItem in the aggregation named items and returns its index if found or -1 otherwise.
removeAllItems()Removes all the controls in the aggregation named items.
removeItem(vItem)Removes an item from the aggregation named items.
selectPicture(iIndex, iIndex)Select the picture at index iIndex from the items aggregation.
setRemovable()Specify whether or not you can delete a picture.
setTileScaling(fTileScale)Set the percentage of the space occupied by the image in the picture viewer control.
addItem(oItem)Adds some item oItem to the aggregation named items.
insertItem(oItem, iIndex)Inserts a item into the aggregation named items.
Constructor Detail
new sap.ushell.components.factsheet.controls.PictureViewer(sId?, mSettings?)
Constructor for a new components/factsheet/controls/PictureViewer.

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

    Parameters:
    {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.
    Event Detail
    pictureDeleted(oControlEvent)
    Thrown when user delete an image
    Parameters:
    {sap.ui.base.Event}oControlEvent
    {sap.ui.base.EventProvider}oControlEvent.getSource
    {object}oControlEvent.getParameters
    Method Detail
    sap.ushell.components.factsheet.controls.PictureViewer.extend(sClassName, oClassInfo?, FNMetaImpl?): function
    Creates a new subclass of class sap.ushell.components.factsheet.controls.PictureViewer with name sClassName and enriches it with the information contained in oClassInfo.

    oClassInfo might contain the same kind of informations as described in Element.extend.

    Parameters:
    {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.
    Returns:
    {function} the created class / constructor function
    sap.ushell.components.factsheet.controls.PictureViewer.getMetadata(): sap.ui.base.Metadata
    Returns a metadata object for class sap.ushell.components.factsheet.controls.PictureViewer.
    Returns:
    {sap.ui.base.Metadata} Metadata object describing this class
    attachPictureDeleted(oData?, fnFunction, oListener?): sap.ushell.components.factsheet.controls.PictureViewer
    Attach event handler 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
    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
    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
    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
    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
    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)
    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
    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
    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
    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