sap.m.Bar.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.Bar 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.
Parameters:
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
{function} | Created class / constructor function |
Returns a metadata object for class sap.m.Bar.
Returns:
Adds some contentLeft to the aggregation contentLeft
.
Parameters:
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |
Adds some contentMiddle to the aggregation contentMiddle
.
Parameters:
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |
Adds some contentRight to the aggregation contentRight
.
Parameters:
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |
Destroys all the contentLeft in the aggregation contentLeft
.
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |
Destroys all the contentMiddle in the aggregation contentMiddle
.
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |
Destroys all the contentRight in the aggregation contentRight
.
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |
Gets content of aggregation
contentLeft
.
Represents the left content area, usually containing a button or an app icon. If it is overlapped by the right content, its content will disappear and the text will show an ellipsis.
Returns:
Gets content of aggregation
contentMiddle
.
Represents the middle content area. Controls such as label, segmented buttons or select can be placed here. The content is centrally positioned if there is enough space. If the right or left content overlaps the middle content, the middle content will be centered in the space between the left and the right content.
Returns:
Gets content of aggregation
contentRight
.
Represents the right content area. Controls such as action buttons or search field can be placed here.
Returns:
Gets current value of property
design
.
Determines the design of the bar. If set to auto, it becomes dependent on the place where the bar is placed.
Default value is Auto
.
- Since:
- 1.22
Returns:
indexOfContentLeft(oContentLeft): int
Checks for the provided sap.ui.core.Control
in the aggregation contentLeft
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
indexOfContentMiddle(oContentMiddle): int
Checks for the provided sap.ui.core.Control
in the aggregation contentMiddle
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
indexOfContentRight(oContentRight): int
Checks for the provided sap.ui.core.Control
in the aggregation contentRight
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
insertContentLeft
(oContentLeft, iIndex): sap.m.Bar Inserts a contentLeft into the aggregation contentLeft
.
Parameters:
{sap.ui.core.Control} | oContentLeft | the contentLeft to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the contentLeft should be inserted at; for a negative value of iIndex , the contentLeft is inserted at position 0; for a value greater than the current size of the aggregation, the contentLeft is inserted at the last position |
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |
insertContentMiddle
(oContentMiddle, iIndex): sap.m.Bar Inserts a contentMiddle into the aggregation contentMiddle
.
Parameters:
{sap.ui.core.Control} | oContentMiddle | the contentMiddle to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the contentMiddle should be inserted at; for a negative value of iIndex , the contentMiddle is inserted at position 0; for a value greater than the current size of the aggregation, the contentMiddle is inserted at the last position |
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |
insertContentRight
(oContentRight, iIndex): sap.m.Bar Inserts a contentRight into the aggregation contentRight
.
Parameters:
{sap.ui.core.Control} | oContentRight | the contentRight to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the contentRight should be inserted at; for a negative value of iIndex , the contentRight is inserted at position 0; for a value greater than the current size of the aggregation, the contentRight is inserted at the last position |
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |
Removes all the controls from the aggregation
contentLeft
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
contentMiddle
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
contentRight
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a contentLeft from the aggregation contentLeft
.
Parameters:
Returns:
Removes a contentMiddle from the aggregation contentMiddle
.
Parameters:
Returns:
Removes a contentRight from the aggregation contentRight
.
Parameters:
Returns:
Sets a new value for property
design
.
Determines the design of the bar. If set to auto, it becomes dependent on the place where the bar is placed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Auto
.
Parameters:
- Since:
- 1.22
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |
getEnableFlexBox(): boolean
Gets current value of property
enableFlexBox
.
If this flag is set to true, contentMiddle will be rendered as a HBox and layoutData can be used to allocate available space.
Default value is false
.
- Deprecated:
- Since version 1.16. This property is no longer supported, instead, contentMiddle will always occupy 100% width when no contentLeft and contentRight are being set.
Returns:
{boolean} | Value of property enableFlexBox |
getTranslucent(): boolean
Gets current value of property
translucent
.
Indicates whether the Bar is partially translucent. It is only applied for touch devices.
Default value is false
.
- Deprecated:
- Since version 1.18.6. This property has no effect since release 1.18.6 and should not be used. Translucent bar may overlay an input and make it difficult to edit.
- Since:
- 1.12
Returns:
{boolean} | Value of property translucent |
Sets a new value for property
enableFlexBox
.
If this flag is set to true, contentMiddle will be rendered as a HBox and layoutData can be used to allocate available space.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bEnableFlexBox | New value for property enableFlexBox |
- Deprecated:
- Since version 1.16. This property is no longer supported, instead, contentMiddle will always occupy 100% width when no contentLeft and contentRight are being set.
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |
Sets a new value for property
translucent
.
Indicates whether the Bar is partially translucent. It is only applied for touch devices.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bTranslucent | New value for property translucent |
- Deprecated:
- Since version 1.18.6. This property has no effect since release 1.18.6 and should not be used. Translucent bar may overlay an input and make it difficult to edit.
- Since:
- 1.12
Returns:
{sap.m.Bar} | Reference to this in order to allow method chaining |