Class sap.ca.ui.PictureItemModule: sap/ca/ui/PictureItem

extends Control

A picture / photo Item for AddPicture and PictureViewer Controls

Deprecated API:Since version 1.22. This control has been made available in sap.m. Please use the sap.m.Carousel instead! This control will not be supported anymore.

Constructor Summary
new sap.ca.ui.PictureItem(sId?, mSettings?)Constructor for a new PictureItem.
Event Summary
loaded(oControlEvent)Fired when the Image is really loaded
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ca.ui.PictureItem.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ca.ui.PictureItem with name sClassName and enriches it with the information contained in oClassInfo.
sap.ca.ui.PictureItem.getMetadata()Returns a metadata object for class sap.ca.ui.PictureItem.
attachLoaded(oData?, fnFunction, oListener?)Attach event handler fnFunction to the 'loaded' event of this sap.ca.ui.PictureItem.
detachLoaded(fnFunction, oListener)Detach event handler fnFunction from the 'loaded' event of this sap.ca.ui.PictureItem.
fireLoaded(mArguments?)Fire event loaded to attached listeners.
getName()Getter for property name.
getSource()Getter for property source.
getStatus()Getter for property status.
setFile(file, oConfig)Set the File object
setName(sName)Setter for property name.
setSource(sValue)Set the source for the picture, either uri or data url scheme (base64 information).
setStatus(sStatus)Setter for property status.
getHeight()Getter for property height.
getWidth()Getter for property width.
setHeight(sHeight)Setter for property height.
setWidth(sWidth)Setter for property width.
Constructor Detail
new sap.ca.ui.PictureItem(sId?, mSettings?)
Constructor for a new PictureItem.

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
    • Associations
      • Events
        • loaded : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
      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. This control has been made available in sap.m. Please use the sap.m.Carousel instead! This control will not be supported anymore.
      Event Detail
      loaded(oControlEvent)
      Fired when the Image is really loaded
      Parameters:
      {sap.ui.base.Event}oControlEvent
      {sap.ui.base.EventProvider}oControlEvent.getSource
      {object}oControlEvent.getParameters
      Method Detail
      sap.ca.ui.PictureItem.extend(sClassName, oClassInfo?, FNMetaImpl?): function
      Creates a new subclass of class sap.ca.ui.PictureItem 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.ca.ui.PictureItem.getMetadata(): sap.ui.base.Metadata
      Returns a metadata object for class sap.ca.ui.PictureItem.
      Returns:
      {sap.ui.base.Metadata} Metadata object describing this class
      attachLoaded(oData?, fnFunction, oListener?): sap.ca.ui.PictureItem
      Attach event handler fnFunction to the 'loaded' event of this sap.ca.ui.PictureItem.
      . When called, the context of the event handler (its this) will be bound to oListener if specified otherwise to this sap.ca.ui.PictureItem.
      itself.

      Fired when the Image is really loaded

      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.ca.ui.PictureItem.
      itself.
      Returns:
      {sap.ca.ui.PictureItem}this to allow method chaining
      detachLoaded(fnFunction, oListener): sap.ca.ui.PictureItem
      Detach event handler fnFunction from the 'loaded' event of this sap.ca.ui.PictureItem.

      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.ca.ui.PictureItem}this to allow method chaining
      fireLoaded(mArguments?): sap.ca.ui.PictureItem
      Fire event loaded to attached listeners.
      Parameters:
      {Map}mArguments? the arguments to pass along with the event.
      Returns:
      {sap.ca.ui.PictureItem}this to allow method chaining
      getName(): string
      Getter for property name. The original name of the picture.

      Default value is empty/undefined

      Returns:
      {string} the value of property name
      getSource(): string
      Getter for property source. The content of the picture. Either the uri or base64 content.

      Default value is empty/undefined

      Returns:
      {string} the value of property source
      getStatus(): string
      Getter for property status. The status of the picture / photo : Added, Deleted, Read

      Default value is empty/undefined

      Returns:
      {string} the value of property status
      setFile(file, oConfig)
      Set the File object
      Parameters:
      {File}file
      {Object}oConfig Canvas config
      setName(sName): sap.ca.ui.PictureItem
      Setter for property name.

      Default value is empty/undefined

      Parameters:
      {string}sName new value for property name
      Returns:
      {sap.ca.ui.PictureItem}this to allow method chaining
      setSource(sValue)
      Set the source for the picture, either uri or data url scheme (base64 information).
      Parameters:
      {string}sValue The URI of the image or the DATA URL scheme.
      Samples:
      1 - "./images/IMG_0095.PNG"
      2 - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAKCAYAAABWiWWfAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAhtJREFUOE+tkF9oUlEcx11pmbnVkw+lvkQwWPXQoMegl57qrZcIpjEqqociiOoloraBIIxRG7UoSNhsq1axGpmatRUEaTljbm56s6b3rnmdXv+k13/ffsfYIPKxH3y53/M953zOl6tYN57y/Q81vUxdVCiHeajtAvRjP9E8IkA5xGPDsFD3m0kq8lr6toz+ydi+iu6wM6tSPRTs658n1Yp9T+LwiTISxSrCmTI63MswPPiBCPlJoQDlAAdbKIvvuTI4yhyLBeweiUFz5xs0g6S70RcbbTGtgs2zhQxShQpOT8TR+zGBvfcjOPNaAJtqDWi/F8ErLguJHrviXkLyVwWPQxmorbNo6Z2b0vaHdXUQm6EvSZQqNYwF0zg6GsWW69N4H83BF8tDzJfR83YJEyEJy9SsrS+IkFjEB9rfdM3/aatlRr8GYqatx49Hn0UIkoxiuQarR4BM8C5HDJ4FCQE+D8dsGhWqyUslZIsVWFzxgOayd8dfILZov+HDfosfR/pn6g3ZJTacWIBIbeqQtAyJfsUFexjHBoPzO6/6Wv8BseC2axEruRL4lIwcvSqXq4gmCuh+ysE6HqW2VZRI8ZUidKfe8bqzk3sagli469wUTgx8xSXbHA51eXH8ZgCHu73Qmd3Y1vkGpr5pdN4KsDy1/aTngLHD2Ww0ORvzjGYnDCYn9KRVb6CM+bW1yZnXm10HCdJKOk9qakT7DfsPyGaTv0W2AAAAAElFTkSuQmCC"
      setStatus(sStatus): sap.ca.ui.PictureItem
      Setter for property status.

      Default value is empty/undefined

      Parameters:
      {string}sStatus new value for property status
      Returns:
      {sap.ca.ui.PictureItem}this to allow method chaining
      getHeight(): sap.ui.core.CSSSize
      Getter for property height. The height of the picture.

      Default value is 62px

      Deprecated:
      Since version 1.16.2. Height is defined by the AddPicture control
      Returns:
      {sap.ui.core.CSSSize} the value of property height
      getWidth(): sap.ui.core.CSSSize
      Getter for property width. The width of the picture.

      Default value is 62px

      Deprecated:
      Since version 1.16.2. Width is defined by the AddPicture control
      Returns:
      {sap.ui.core.CSSSize} the value of property width
      setHeight(sHeight): sap.ca.ui.PictureItem
      Setter for property height.

      Default value is 62px

      Parameters:
      {sap.ui.core.CSSSize}sHeight new value for property height
      Deprecated:
      Since version 1.16.2. Height is defined by the AddPicture control
      Returns:
      {sap.ca.ui.PictureItem}this to allow method chaining
      setWidth(sWidth): sap.ca.ui.PictureItem
      Setter for property width.

      Default value is 62px

      Parameters:
      {sap.ui.core.CSSSize}sWidth new value for property width
      Deprecated:
      Since version 1.16.2. Width is defined by the AddPicture control
      Returns:
      {sap.ca.ui.PictureItem}this to allow method chaining