Allows to add multiple LayoutData to one control in case that an easy switch of layouts (e.g. in a Form) is needed.
Constructor for a new VariantLayoutData.
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.ui.core.VariantLayoutData(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 |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
multipleLayoutData | 0..n | sap.ui.core.LayoutData |
Allows multiple LayoutData. |
Name | Cardinality | Type | Description |
---|---|---|---|
customData | 0..n | sap.ui.core.CustomData |
Custom Data, a data structure like a map containing arbitrary key value pairs. |
dependents | 0..n | sap.ui.core.Element |
Dependents are not rendered, but their databinding context and lifecycle are bound to the aggregating Element. |
dragDropConfig | 0..n | sap.ui.core.dnd.DragDropBase |
Defines the drag-and-drop configuration. Note: This configuration might be ignored due to control metadata restrictions. |
layoutData | 0..1 | sap.ui.core.LayoutData |
Defines the layout constraints for this control when it is used inside a Layout. LayoutData classes are typed classes and must match the embedding Layout. See VariantLayoutData for aggregating multiple alternative LayoutData instances to a single Element. |
tooltip | 0..1 | sap.ui.core.TooltipBase |
The tooltip that should be shown for this Element. In the most simple case, a tooltip is a string that will be rendered by the control and displayed by the browser when the mouse pointer hovers over the control's DOM. In this variant, Controls need to explicitly support this kind of tooltip as they have to render it, but most controls do. Exceptions will be documented for the corresponding controls (e.g. Alternatively, UI5 currently does not provide a recommended implementation of See the section Using Tooltips
|
Method | Description |
---|---|
addMultipleLayoutData |
Adds some multipleLayoutData to the aggregation multipleLayoutData. |
destroyMultipleLayoutData |
Destroys all the multipleLayoutData in the aggregation multipleLayoutData. |
sap.ui.core.VariantLayoutData.extend |
Creates a new subclass of class sap.ui.core.VariantLayoutData with name
|
sap.ui.core.VariantLayoutData.getMetadata |
Returns a metadata object for class sap.ui.core.VariantLayoutData. |
getMultipleLayoutData |
Gets content of aggregation multipleLayoutData. Allows multiple LayoutData. |
indexOfMultipleLayoutData |
Checks for the provided |
insertMultipleLayoutData |
Inserts a multipleLayoutData into the aggregation multipleLayoutData. |
removeAllMultipleLayoutData |
Removes all the controls from the aggregation multipleLayoutData. Additionally, it unregisters them from the hosting UIArea. |
removeMultipleLayoutData |
Removes a multipleLayoutData from the aggregation multipleLayoutData. |
Adds some multipleLayoutData to the aggregation multipleLayoutData.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMultipleLayoutData | sap.ui.core.LayoutData |
The multipleLayoutData to add; if empty, nothing is inserted |
Destroys all the multipleLayoutData in the aggregation multipleLayoutData.
Creates a new subclass of class sap.ui.core.VariantLayoutData 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 |
Returns a metadata object for class sap.ui.core.VariantLayoutData.
Checks for the provided sap.ui.core.LayoutData
in the aggregation multipleLayoutData. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMultipleLayoutData | sap.ui.core.LayoutData |
The multipleLayoutData whose index is looked for |
Inserts a multipleLayoutData into the aggregation multipleLayoutData.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMultipleLayoutData | sap.ui.core.LayoutData |
The multipleLayoutData to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation multipleLayoutData.
Additionally, it unregisters them from the hosting UIArea.
Removes a multipleLayoutData from the aggregation multipleLayoutData.
Param | Type | DefaultValue | Description |
---|---|---|---|
vMultipleLayoutData | int string sap.ui.core.LayoutData |
The multipleLayoutData to remove or its index or id |