Class sap.suite.ui.commons.HeaderContainerModule: sap/suite/ui/commons/HeaderContainer

extends Control

The container that provides a horizontal layout. It provides a horizontal scroll on the tablet and phone. On the desktop, it provides scroll left and scroll right buttons. This control supports keyboard navigation. You can use left and right arrow keys to navigate through the inner content. The Home key puts focus on the first control and the End key puts focus on the last control. Use Enter or Space to choose the control.

Constructor Summary
new sap.suite.ui.commons.HeaderContainer(sId?, mSettings?)Constructor for a new HeaderContainer.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.suite.ui.commons.HeaderContainer.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.suite.ui.commons.HeaderContainer with name sClassName and enriches it with the information contained in oClassInfo.
sap.suite.ui.commons.HeaderContainer.getMetadata()Returns a metadata object for class sap.suite.ui.commons.HeaderContainer.
addItem(oItem)Adds some item oItem to the aggregation named items.
destroyItems()Destroys all the items in the aggregation named items.
getBackgroundDesign()Getter for property backgroundDesign.
getItems()Getter for aggregation items.
getScrollStep()Getter for property scrollStep.
getScrollTime()Getter for property scrollTime.
getShowDividers()Getter for property showDividers.
getView()Getter for property view.
indexOfItem(oItem)Checks for the provided sap.ui.core.Control in the aggregation named items and returns its index if found or -1 otherwise.
insertItem(oItem, iIndex)Inserts a item into the aggregation named items.
removeAllItems()Removes all the controls in the aggregation named items.
removeItem(vItem)Removes an item from the aggregation named items.
setBackgroundDesign(oBackgroundDesign)Setter for property backgroundDesign.
setScrollStep(iScrollStep)Setter for property scrollStep.
setScrollTime(iScrollTime)Setter for property scrollTime.
setShowDividers(bShowDividers)Setter for property showDividers.
setView(oView)Setter for property view.
Constructor Detail
new sap.suite.ui.commons.HeaderContainer(sId?, mSettings?)
Constructor for a new HeaderContainer.

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
    • scrollStep : int (default: 300)
    • scrollTime : int (default: 500)
    • showDividers : boolean (default: true)
    • view : sap.suite.ui.commons.HeaderContainerView (default: sap.suite.ui.commons.HeaderContainerView.Horizontal)
    • backgroundDesign : sap.m.BackgroundDesign (default: sap.m.BackgroundDesign.Transparent)
  • Aggregations
    • items : sap.ui.core.Control[]
  • Associations
    • Events
      Parameters:
      {string}sId? id for the new control, generated automatically if no id is given
      {object}mSettings? initial settings for the new control
      Method Detail
      sap.suite.ui.commons.HeaderContainer.extend(sClassName, oClassInfo?, FNMetaImpl?): function
      Creates a new subclass of class sap.suite.ui.commons.HeaderContainer 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.suite.ui.commons.HeaderContainer.getMetadata(): sap.ui.base.Metadata
      Returns a metadata object for class sap.suite.ui.commons.HeaderContainer.
      Returns:
      {sap.ui.base.Metadata} Metadata object describing this class
      Adds some item oItem to the aggregation named items.
      Parameters:
      {sap.ui.core.Control}oItem the item to add; if empty, nothing is inserted
      Returns:
      {sap.suite.ui.commons.HeaderContainer}this to allow method chaining
      Destroys all the items in the aggregation named items.
      Returns:
      {sap.suite.ui.commons.HeaderContainer}this to allow method chaining
      getBackgroundDesign(): sap.m.BackgroundDesign
      Getter for property backgroundDesign. Specifies the background color of the content. The visualization of the different options depends on the used theme.

      Default value is Transparent

      Since:
      1.38
      Returns:
      {sap.m.BackgroundDesign} the value of property backgroundDesign
      getItems(): sap.ui.core.Control[]
      Getter for aggregation items.
      Items to add to HeaderContainer.
      Returns:
      {sap.ui.core.Control[]}
      getScrollStep(): int
      Getter for property scrollStep. Number of pixels to scroll when the user chooses Next or Previous buttons. Relevant only for desktop.

      Default value is 300

      Returns:
      {int} the value of property scrollStep
      getScrollTime(): int
      Getter for property scrollTime. Scroll animation time in milliseconds.

      Default value is 500

      Returns:
      {int} the value of property scrollTime
      getShowDividers(): boolean
      Getter for property showDividers. If set to true, shows dividers between scrollable items.

      Default value is true

      Since:
      1.25
      Returns:
      {boolean} the value of property showDividers
      Getter for property view. The view of the HeaderContainer.

      Default value is Horizontal

      Since:
      1.25
      Returns:
      {sap.suite.ui.commons.HeaderContainerView} the value of property view
      indexOfItem(oItem): int
      Checks for the provided sap.ui.core.Control in the aggregation named items and returns its index if found or -1 otherwise.
      Parameters:
      {sap.ui.core.Control}oItem the item whose index is looked for.
      Returns:
      {int} the index of the provided control in the aggregation if found, or -1 otherwise
      insertItem(oItem, iIndex): sap.suite.ui.commons.HeaderContainer
      Inserts a item into the aggregation named items.
      Parameters:
      {sap.ui.core.Control}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
      Returns:
      {sap.suite.ui.commons.HeaderContainer}this to allow method chaining
      removeAllItems(): sap.ui.core.Control[]
      Removes all the controls in the aggregation named items.
      Additionally unregisters them from the hosting UIArea.
      Returns:
      {sap.ui.core.Control[]} an array of the removed elements (might be empty)
      removeItem(vItem): sap.ui.core.Control
      Removes an item from the aggregation named items.
      Parameters:
      {int|string|sap.ui.core.Control}vItem the item to remove or its index or id
      Returns:
      {sap.ui.core.Control} the removed item or null
      setBackgroundDesign(oBackgroundDesign): sap.suite.ui.commons.HeaderContainer
      Setter for property backgroundDesign.

      Default value is Transparent

      Parameters:
      {sap.m.BackgroundDesign}oBackgroundDesign new value for property backgroundDesign
      Since:
      1.38
      Returns:
      {sap.suite.ui.commons.HeaderContainer}this to allow method chaining
      setScrollStep(iScrollStep): sap.suite.ui.commons.HeaderContainer
      Setter for property scrollStep.

      Default value is 300

      Parameters:
      {int}iScrollStep new value for property scrollStep
      Returns:
      {sap.suite.ui.commons.HeaderContainer}this to allow method chaining
      setScrollTime(iScrollTime): sap.suite.ui.commons.HeaderContainer
      Setter for property scrollTime.

      Default value is 500

      Parameters:
      {int}iScrollTime new value for property scrollTime
      Returns:
      {sap.suite.ui.commons.HeaderContainer}this to allow method chaining
      setShowDividers(bShowDividers): sap.suite.ui.commons.HeaderContainer
      Setter for property showDividers.

      Default value is true

      Parameters:
      {boolean}bShowDividers new value for property showDividers
      Since:
      1.25
      Returns:
      {sap.suite.ui.commons.HeaderContainer}this to allow method chaining
      Setter for property view.

      Default value is Horizontal

      Parameters:
      {sap.suite.ui.commons.HeaderContainerView}oView new value for property view
      Since:
      1.25
      Returns:
      {sap.suite.ui.commons.HeaderContainer}this to allow method chaining