class sap.m.FlexItemData

Control sample: sap.m.FlexItemData
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/m/FlexItemData
Application Component: CA-UI5-CTR

Holds layout data for a FlexBox / HBox / VBox.


Constructor

Constructor for a new sap.m.FlexItemData.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.m.FlexItemData(sId?, mSettings?)
Param Type Default Value Description
sId? string

ID for the new element, generated automatically if no ID is given

mSettings? object

Initial settings for the new element.


Properties

Name Type Default Value Description
alignSelf sap.m.FlexAlignSelf Auto

Determines cross-axis alignment of individual element.

Visibility: public
backgroundDesign sap.m.BackgroundDesign Transparent

Defines the background style of the flex item.

Since: 1.38.5.

Visibility: public
baseSize sap.ui.core.CSSSize auto

The base size is the initial main size of the item for the flex algorithm. If set to "auto", this will be the computed size of the item.

Since: 1.32.0.

Visibility: public
growFactor float 0

Determines the flexibility of the flex item when allocatable space is remaining.

Visibility: public
maxHeight sap.ui.core.CSSSize empty string

The maximum height of the flex item.

Since: 1.36.0.

Visibility: public
maxWidth sap.ui.core.CSSSize empty string

The maximum width of the flex item.

Since: 1.36.0.

Visibility: public
minHeight sap.ui.core.CSSSize auto

The minimum height of the flex item.

Since: 1.36.0.

Visibility: public
minWidth sap.ui.core.CSSSize auto

The minimum width of the flex item.

Since: 1.36.0.

Visibility: public
order int 0

Determines the display order of flex items independent of their source code order.

Visibility: public
shrinkFactor float 1

The shrink factor determines how much the flex item will shrink relative to the rest of the flex items in the flex container when negative free space is distributed.

Since: 1.24.0.

Visibility: public
styleClass string empty string

The style class will be applied to the flex item and can be used for CSS selectors.

Visibility: public

Methods Overview

Method Description
sap.m.FlexItemData.extend

Creates a new subclass of class sap.m.FlexItemData 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.LayoutData.extend.

getAlignSelf

Gets current value of property alignSelf.

Determines cross-axis alignment of individual element.

Default value is Auto.

getBackgroundDesign

Gets current value of property backgroundDesign.

Defines the background style of the flex item.

Default value is Transparent.

getBaseSize

Gets current value of property baseSize.

The base size is the initial main size of the item for the flex algorithm. If set to "auto", this will be the computed size of the item.

Default value is "auto".

getDomRef

Returns the correct FlexBox item DOM reference.

getGrowFactor

Gets current value of property growFactor.

Determines the flexibility of the flex item when allocatable space is remaining.

Default value is 0.

getMaxHeight

Gets current value of property maxHeight.

The maximum height of the flex item.

Default value is empty string.

getMaxWidth

Gets current value of property maxWidth.

The maximum width of the flex item.

Default value is empty string.

sap.m.FlexItemData.getMetadata

Returns a metadata object for class sap.m.FlexItemData.

getMinHeight

Gets current value of property minHeight.

The minimum height of the flex item.

Default value is "auto".

getMinWidth

Gets current value of property minWidth.

The minimum width of the flex item.

Default value is "auto".

getOrder

Gets current value of property order.

Determines the display order of flex items independent of their source code order.

Default value is 0.

getShrinkFactor

Gets current value of property shrinkFactor.

The shrink factor determines how much the flex item will shrink relative to the rest of the flex items in the flex container when negative free space is distributed.

Default value is 1.

getStyleClass

Gets current value of property styleClass.

The style class will be applied to the flex item and can be used for CSS selectors.

Default value is empty string.

setAlignSelf

Sets the alignSelf property.

setBackgroundDesign

Sets background design for flex items.

setBaseSize

Sets the base size for flex items.

setGrowFactor

Sets the growFactor property.

setMaxHeight

Sets maximum height.

setMaxWidth

Sets maximum width.

setMinHeight

Sets minimum height.

setMinWidth

Sets minimum width.

setOrder

Sets the order.

setShrinkFactor

Sets the shrinkFactor property.

References:

  • https://www.w3.org/TR/css-flexbox-1/#propdef-flex-shrink

setStyleClass

Sets style class.

sap.m.FlexItemData.extend

Creates a new subclass of class sap.m.FlexItemData 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.LayoutData.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

getAlignSelf

Gets current value of property alignSelf.

Determines cross-axis alignment of individual element.

Default value is Auto.

getBackgroundDesign

Gets current value of property backgroundDesign.

Defines the background style of the flex item.

Default value is Transparent.

getBaseSize

Gets current value of property baseSize.

The base size is the initial main size of the item for the flex algorithm. If set to "auto", this will be the computed size of the item.

Default value is "auto".

getDomRef

Returns the correct FlexBox item DOM reference.

Param Type DefaultValue Description
sSuffix string

ID suffix to get the DOMRef for

getGrowFactor

Gets current value of property growFactor.

Determines the flexibility of the flex item when allocatable space is remaining.

Default value is 0.

getMaxHeight

Gets current value of property maxHeight.

The maximum height of the flex item.

Default value is empty string.

getMaxWidth

Gets current value of property maxWidth.

The maximum width of the flex item.

Default value is empty string.

sap.m.FlexItemData.getMetadata

Returns a metadata object for class sap.m.FlexItemData.

getMinHeight

Gets current value of property minHeight.

The minimum height of the flex item.

Default value is "auto".

getMinWidth

Gets current value of property minWidth.

The minimum width of the flex item.

Default value is "auto".

getOrder

Gets current value of property order.

Determines the display order of flex items independent of their source code order.

Default value is 0.

getShrinkFactor

Gets current value of property shrinkFactor.

The shrink factor determines how much the flex item will shrink relative to the rest of the flex items in the flex container when negative free space is distributed.

Default value is 1.

getStyleClass

Gets current value of property styleClass.

The style class will be applied to the flex item and can be used for CSS selectors.

Default value is empty string.

setAlignSelf

Sets the alignSelf property.

Param Type DefaultValue Description
sValue string

Align option.

setBackgroundDesign

Sets background design for flex items.

Param Type DefaultValue Description
sValue string

Background design in string format.

setBaseSize

Sets the base size for flex items.

Param Type DefaultValue Description
sValue string

Base size in string format.

setGrowFactor

Sets the growFactor property.

Param Type DefaultValue Description
sValue string

Grow factor in string format.

setMaxHeight

Sets maximum height.

Param Type DefaultValue Description
sValue string

Maximum height in string format.

setMaxWidth

Sets maximum width.

Param Type DefaultValue Description
sValue string

Maximum width in string format.

setMinHeight

Sets minimum height.

Param Type DefaultValue Description
sValue string

Minimum height in string format.

setMinWidth

Sets minimum width.

Param Type DefaultValue Description
sValue string

Minimum width in string format.

setOrder

Sets the order.

Param Type DefaultValue Description
sValue string

Order in string format.

setShrinkFactor

Sets the shrinkFactor property.

References:

Param Type DefaultValue Description
sValue string

Shrink factor in string format.

setStyleClass

Sets style class.

Param Type DefaultValue Description
sValue string

Style class.