sap.ui.commons.Panel.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.commons.Panel 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.ui.commons.Panel.
Returns:
Adds some button to the aggregation buttons
.
Parameters:
Returns:
Adds some content to the aggregation content
.
Parameters:
Returns:
Destroys all the buttons in the aggregation buttons
.
Returns:
Destroys all the content in the aggregation content
.
Returns:
Destroys the title in the aggregation title
.
Returns:
getApplyContentPadding(): boolean
Gets current value of property
applyContentPadding
.
Determines whether the Panel will have padding. Padding is theme-dependent.
Default value is true
.
Returns:
{boolean} | Value of property applyContentPadding |
Gets current value of property
areaDesign
.
Determines the background color. Note that color settings are theme-dependent.
Default value is Fill
.
Returns:
Gets current value of property
borderDesign
.
Determines if the Panel can have a box as border. Note that displaying borders is theme-dependent.
Default value is Box
.
Returns:
Gets content of aggregation
buttons
.
The buttons that shall be displayed in the Panel header
Returns:
getCollapsed(): boolean
Gets current value of property
collapsed
.
Determines whether the Panel will be initially collapsed. When it is initially collapsed, the contents are not rendered. A collapsed Panel consumes less space than an expanded one.
Default value is false
.
Returns:
{boolean} | Value of property collapsed |
Gets content of aggregation
content
.
Aggregates the controls that are contained in the Panel. It is recommended to use a layout control as single direct child. When the Panel dimensions are set, the child control may have width and height of 100%. When the dimensions are not set, the child defines the size of the Panel.
Returns:
getEnabled(): boolean
Gets current value of property
enabled
.
Represents the state of the of the Panel (enabled or disabled)
Default value is true
.
Returns:
{boolean} | Value of property enabled |
Gets current value of property
height
.
Determines the height of the Panel in CSS size. Per default, the height for the Panel is automatically adjusted to the content. Dimension allows to explicitly specify the height.
Returns:
getScrollLeft(): int
Returns the scroll position of the panel in pixels from the left. Returns 0 if not rendered yet. Also internally updates the control property.
Returns:
{int} | The scroll position. |
getScrollTop(): int
Returns the scroll position of the panel in pixels from the top. Returns 0 if not rendered yet. Also internally updates the control property.
Returns:
{int} | The scroll position. |
getShowCollapseIcon(): boolean
Gets current value of property
showCollapseIcon
.
Determines whether the Panel will have an icon for collapsing/expanding, or not.
Default value is true
.
Returns:
{boolean} | Value of property showCollapseIcon |
getText(): string
Returns the text that is rendered in the Panel header. If a Title control was used it returns the text of the Title control.
Returns:
{string} | The text in the Panel header. |
Gets content of aggregation
title
.
Aggregates the title element of the Panel. For text titles only, you alternatively could use setText() which also creates a title in the background.
Returns:
Gets current value of property
width
.
Determines the width of the Panel in CSS size.
Default value is 100%
.
Returns:
indexOfButton(oButton): int
Checks for the provided sap.ui.commons.Button
in the aggregation buttons
. 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 |
indexOfContent(oContent): int
Checks for the provided sap.ui.core.Control
in the aggregation content
. 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 |
Inserts a button into the aggregation buttons
.
Parameters:
{sap.ui.commons.Button} | oButton | the button to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the button should be inserted at; for a negative value of iIndex , the button is inserted at position 0; for a value greater than the current size of the aggregation, the button is inserted at the last position |
Returns:
Inserts a content into the aggregation content
.
Parameters:
{sap.ui.core.Control} | oContent | the content to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the content should be inserted at; for a negative value of iIndex , the content is inserted at position 0; for a value greater than the current size of the aggregation, the content is inserted at the last position |
Returns:
Removes all the controls from the aggregation
buttons
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
content
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a button from the aggregation buttons
.
Parameters:
Returns:
Removes a content from the aggregation content
.
Parameters:
Returns:
Property setter for the padding
Parameters:
{boolean} | bPadding | Whether the Panel should have padding. |
Returns:
Sets a new value for property
areaDesign
.
Determines the background color. Note that color settings are theme-dependent.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Fill
.
Parameters:
Returns:
Sets a new value for property
borderDesign
.
Determines if the Panel can have a box as border. Note that displaying borders is theme-dependent.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Box
.
Parameters:
Returns:
Property setter for the "collapsed" state
Parameters:
{boolean} | bCollapsed | Whether the Panel should be collapsed or not. |
Returns:
Sets the dimensions of the panel.
Parameters:
Returns:
Property setter for the "enabled" state
Parameters:
{boolean} | bEnabled | Whether the Panel should be enabled or not. |
Returns:
Sets the height of the panel.
Parameters:
Returns:
Sets the scroll position of the panel in pixels from the left.
Parameters:
{int} | iPosition | The position to scroll to. |
Returns:
Sets the scrolls position of the panel in pixels from the top.
Parameters:
{int} | iPosition | The position to scroll to. |
Returns:
Sets a new value for property
showCollapseIcon
.
Determines whether the Panel will have an icon for collapsing/expanding, or not.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowCollapseIcon | New value for property showCollapseIcon |
Returns:
Sets the text that will be rendered in the Panel header.
Parameters:
{string} | sText | The text to render in the header. |
Returns:
Sets a Tille control that will be rendered in the Panel header.
Parameters:
Returns:
Sets the width of the panel.
Parameters:
Returns: