Class sap.ui.commons.PanelModule: sap/ui/commons/Panel

extends Control
known direct subclasses: Tab

Represents a container with scroll functionality, that can be used for text and controls. The Panel does not layout the embedded controls.

Deprecated API:Since version 1.38. Instead, use the sap.m.Panel control.

Constructor Summary
new sap.ui.commons.Panel(sId?, mSettings?)Constructor for a new Panel.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.commons.Panel.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.commons.Panel with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.commons.Panel.getMetadata()Returns a metadata object for class sap.ui.commons.Panel.
addButton(oButton)Adds some button to the aggregation buttons.
addContent(oContent)Adds some content to the aggregation content.
destroyButtons()Destroys all the buttons in the aggregation buttons.
destroyContent()Destroys all the content in the aggregation content.
destroyTitle()Destroys the title in the aggregation title.
getApplyContentPadding()Gets current value of property applyContentPadding.
getAreaDesign()Gets current value of property areaDesign.
getBorderDesign()Gets current value of property borderDesign.
getButtons()Gets content of aggregation buttons.
getCollapsed()Gets current value of property collapsed.
getContent()Gets content of aggregation content.
getEnabled()Gets current value of property enabled.
getHeight()Gets current value of property height.
getScrollLeft()Returns the scroll position of the panel in pixels from the left.
getScrollTop()Returns the scroll position of the panel in pixels from the top.
getShowCollapseIcon()Gets current value of property showCollapseIcon.
getText()Returns the text that is rendered in the Panel header.
getTitle()Gets content of aggregation title.
getWidth()Gets current value of property width.
indexOfButton(oButton)Checks for the provided sap.ui.commons.Button in the aggregation buttons.
indexOfContent(oContent)Checks for the provided sap.ui.core.Control in the aggregation content.
insertButton(oButton, iIndex)Inserts a button into the aggregation buttons.
insertContent(oContent, iIndex)Inserts a content into the aggregation content.
removeAllButtons()Removes all the controls from the aggregation buttons.
removeAllContent()Removes all the controls from the aggregation content.
removeButton(vButton)Removes a button from the aggregation buttons.
removeContent(vContent)Removes a content from the aggregation content.
setApplyContentPadding(bPadding)Property setter for the padding
setAreaDesign(sAreaDesign)Sets a new value for property areaDesign.
setBorderDesign(sBorderDesign)Sets a new value for property borderDesign.
setCollapsed(bCollapsed)Property setter for the "collapsed" state
setDimensions(sWidth, sHeight)Sets the dimensions of the panel.
setEnabled(bEnabled)Property setter for the "enabled" state
setHeight(sHeight)Sets the height of the panel.
setScrollLeft(iPosition)Sets the scroll position of the panel in pixels from the left.
setScrollTop(iPosition)Sets the scrolls position of the panel in pixels from the top.
setShowCollapseIcon(bShowCollapseIcon)Sets a new value for property showCollapseIcon.
setText(sText)Sets the text that will be rendered in the Panel header.
setTitle(oTitle)Sets a Tille control that will be rendered in the Panel header.
setWidth(sWidth)Sets the width of the panel.
Constructor Detail
new sap.ui.commons.Panel(sId?, mSettings?)
Constructor for a new Panel.

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

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
{string}sId? ID for the new control, generated automatically if no ID is given
{object}mSettings? Initial settings for the new control
Deprecated:
Since version 1.38. Instead, use the sap.m.Panel control.
Method Detail
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
sap.ui.commons.Panel.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.commons.Panel.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addButton(oButton): sap.ui.commons.Panel
Adds some button to the aggregation buttons.
Parameters:
{sap.ui.commons.Button}oButton the button to add; if empty, nothing is inserted
Returns:
{sap.ui.commons.Panel} Reference to this in order to allow method chaining
addContent(oContent): sap.ui.commons.Panel
Adds some content to the aggregation content.
Parameters:
{sap.ui.core.Control}oContent the content to add; if empty, nothing is inserted
Returns:
{sap.ui.commons.Panel} Reference to this in order to allow method chaining
destroyButtons(): sap.ui.commons.Panel
Destroys all the buttons in the aggregation buttons.
Returns:
{sap.ui.commons.Panel} Reference to this in order to allow method chaining
destroyContent(): sap.ui.commons.Panel
Destroys all the content in the aggregation content.
Returns:
{sap.ui.commons.Panel} Reference to this in order to allow method chaining
destroyTitle(): sap.ui.commons.Panel
Destroys the title in the aggregation title.
Returns:
{sap.ui.commons.Panel} Reference to this in order to allow method chaining
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:
{sap.ui.commons.enums.AreaDesign} Value of property areaDesign
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:
{sap.ui.commons.enums.BorderDesign} Value of property borderDesign
getButtons(): sap.ui.commons.Button[]
Gets content of aggregation buttons.

The buttons that shall be displayed in the Panel header

Returns:
{sap.ui.commons.Button[]}
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
getContent(): sap.ui.core.Control[]
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:
{sap.ui.core.Control[]}
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
getFocusInfo()
getHeight(): sap.ui.core.CSSSize
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:
{sap.ui.core.CSSSize} Value of property height
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.
getTitle(): sap.ui.core.Title
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:
{sap.ui.core.Title}
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

Determines the width of the Panel in CSS size.

Default value is 100%.

Returns:
{sap.ui.core.CSSSize} Value of property width
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:
{sap.ui.commons.Button}oButton The button whose index is looked for
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:
{sap.ui.core.Control}oContent The content whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertButton(oButton, iIndex): sap.ui.commons.Panel
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:
{sap.ui.commons.Panel} Reference to this in order to allow method chaining
insertContent(oContent, iIndex): sap.ui.commons.Panel
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:
{sap.ui.commons.Panel} Reference to this in order to allow method chaining
removeAllButtons(): sap.ui.commons.Button[]
Removes all the controls from the aggregation buttons.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.commons.Button[]} An array of the removed elements (might be empty)
removeAllContent(): sap.ui.core.Control[]
Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeButton(vButton): sap.ui.commons.Button
Removes a button from the aggregation buttons.
Parameters:
{int|string|sap.ui.commons.Button}vButton The buttonto remove or its index or id
Returns:
{sap.ui.commons.Button} The removed button or null
removeContent(vContent): sap.ui.core.Control
Removes a content from the aggregation content.
Parameters:
{int|string|sap.ui.core.Control}vContent The contentto remove or its index or id
Returns:
{sap.ui.core.Control} The removed content or null
setApplyContentPadding(bPadding): sap.ui.commons.Panel
Property setter for the padding
Parameters:
{boolean}bPadding Whether the Panel should have padding.
Returns:
{sap.ui.commons.Panel}this to allow method chaining.
setAreaDesign(sAreaDesign): sap.ui.commons.Panel
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:
{sap.ui.commons.enums.AreaDesign}sAreaDesign New value for property areaDesign
Returns:
{sap.ui.commons.Panel} Reference to this in order to allow method chaining
setBorderDesign(sBorderDesign): sap.ui.commons.Panel
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:
{sap.ui.commons.enums.BorderDesign}sBorderDesign New value for property borderDesign
Returns:
{sap.ui.commons.Panel} Reference to this in order to allow method chaining
setCollapsed(bCollapsed): sap.ui.commons.Panel
Property setter for the "collapsed" state
Parameters:
{boolean}bCollapsed Whether the Panel should be collapsed or not.
Returns:
{sap.ui.commons.Panel}this to allow method chaining.
setDimensions(sWidth, sHeight): sap.ui.commons.Panel
Sets the dimensions of the panel.
Parameters:
{sap.ui.core.CSSSize}sWidth The width of the panel as CSS size.
{sap.ui.core.CSSSize}sHeight The height of the panel as CSS size.
Returns:
{sap.ui.commons.Panel}this to allow method chaining.
setEnabled(bEnabled): sap.ui.commons.Panel
Property setter for the "enabled" state
Parameters:
{boolean}bEnabled Whether the Panel should be enabled or not.
Returns:
{sap.ui.commons.Panel}this to allow method chaining.
setHeight(sHeight): sap.ui.commons.Panel
Sets the height of the panel.
Parameters:
{sap.ui.core.CSSSize}sHeight The height of the panel as CSS size.
Returns:
{sap.ui.commons.Panel}this to allow method chaining.
setScrollLeft(iPosition): sap.ui.commons.Panel
Sets the scroll position of the panel in pixels from the left.
Parameters:
{int}iPosition The position to scroll to.
Returns:
{sap.ui.commons.Panel}this to allow method chaining.
setScrollTop(iPosition): sap.ui.commons.Panel
Sets the scrolls position of the panel in pixels from the top.
Parameters:
{int}iPosition The position to scroll to.
Returns:
{sap.ui.commons.Panel}this to allow method chaining.
setShowCollapseIcon(bShowCollapseIcon): sap.ui.commons.Panel
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:
{sap.ui.commons.Panel} Reference to this in order to allow method chaining
setText(sText): sap.ui.commons.Panel
Sets the text that will be rendered in the Panel header.
Parameters:
{string}sText The text to render in the header.
Returns:
{sap.ui.commons.Panel}this to allow method chaining.
setTitle(oTitle): sap.ui.commons.Panel
Sets a Tille control that will be rendered in the Panel header.
Parameters:
{sap.ui.core.Title}oTitle The Title to render in the header.
Returns:
{sap.ui.commons.Panel}this to allow method chaining.
setWidth(sWidth): sap.ui.commons.Panel
Sets the width of the panel.
Parameters:
{sap.ui.core.CSSSize}sWidth The width of the panel as CSS size.
Returns:
{sap.ui.commons.Panel}this to allow method chaining.