class sap.m.ToolbarLayoutData

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

Defines layout data for the sap.m.Toolbar items.

Note: The sap.m.ToolbarSpacer is a flex control that is intended to control its own behavior, thus sap.m.ToolbarLayoutData is not supported as value for the layoutData aggregation of sap.m.ToolbarSpacer and if set it's ignored.


Constructor

Constructor for a new ToolbarLayoutData.

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.ToolbarLayoutData(sId?, mSettings?)
Param Type Default Value Description
sId? string

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

mSettings? object

Initial settings for the new control


Properties

Name Type Default Value Description
maxWidth sap.ui.core.CSSSize

Sets the maximum width of the toolbar item.

Visibility: public
minWidth sap.ui.core.CSSSize

Sets the minimum width of the toolbar item.

Visibility: public
shrinkable boolean false

Determines whether the control, when in a toolbar, is shrinkable or not. For controls with fixed width (100px, 5rem, etc...) this property is ignored.

Note: Nested layout controls should not be shrinkable.

Visibility: public

Methods Overview

Method Description
sap.m.ToolbarLayoutData.extend

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

getMaxWidth

Gets current value of property maxWidth.

Sets the maximum width of the toolbar item.

sap.m.ToolbarLayoutData.getMetadata

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

getMinWidth

Gets current value of property minWidth.

Sets the minimum width of the toolbar item.

getShrinkable

Gets current value of property shrinkable.

Determines whether the control, when in a toolbar, is shrinkable or not. For controls with fixed width (100px, 5rem, etc...) this property is ignored.

Note: Nested layout controls should not be shrinkable.

Default value is false.

setMaxWidth

Sets a new value for property maxWidth.

Sets the maximum width of the toolbar item.

When called with a value of null or undefined, the default value of the property will be restored.

setMinWidth

Sets a new value for property minWidth.

Sets the minimum width of the toolbar item.

When called with a value of null or undefined, the default value of the property will be restored.

setShrinkable

Sets a new value for property shrinkable.

Determines whether the control, when in a toolbar, is shrinkable or not. For controls with fixed width (100px, 5rem, etc...) this property is ignored.

Note: Nested layout controls should not be shrinkable.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

sap.m.ToolbarLayoutData.extend

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

getMaxWidth

Gets current value of property maxWidth.

Sets the maximum width of the toolbar item.

sap.m.ToolbarLayoutData.getMetadata

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

getMinWidth

Gets current value of property minWidth.

Sets the minimum width of the toolbar item.

getShrinkable

Gets current value of property shrinkable.

Determines whether the control, when in a toolbar, is shrinkable or not. For controls with fixed width (100px, 5rem, etc...) this property is ignored.

Note: Nested layout controls should not be shrinkable.

Default value is false.

setMaxWidth

Sets a new value for property maxWidth.

Sets the maximum width of the toolbar item.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sMaxWidth sap.ui.core.CSSSize

New value for property maxWidth

setMinWidth

Sets a new value for property minWidth.

Sets the minimum width of the toolbar item.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sMinWidth sap.ui.core.CSSSize

New value for property minWidth

setShrinkable

Sets a new value for property shrinkable.

Determines whether the control, when in a toolbar, is shrinkable or not. For controls with fixed width (100px, 5rem, etc...) this property is ignored.

Note: Nested layout controls should not be shrinkable.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Param Type DefaultValue Description
bShrinkable boolean false

New value for property shrinkable