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:
stringsId?ID for the new control, generated automatically if no ID is given
objectmSettings?Initial settings for the new 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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated 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.MetadataMetadata object describing this class
addButton(oButton): sap.ui.commons.Panel
Adds some button to the aggregation buttons.
Parameters:
sap.ui.commons.ButtonoButtonthe button to add; if empty, nothing is inserted
Returns:
sap.ui.commons.PanelReference 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.ControloContentthe content to add; if empty, nothing is inserted
Returns:
sap.ui.commons.PanelReference 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.PanelReference 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.PanelReference to this in order to allow method chaining
destroyTitle(): sap.ui.commons.Panel
Destroys the title in the aggregation title.
Returns:
sap.ui.commons.PanelReference 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:
booleanValue 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.AreaDesignValue 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.BorderDesignValue 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:
booleanValue 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:
booleanValue 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.CSSSizeValue 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:
intThe 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:
intThe 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:
booleanValue 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:
stringThe 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.CSSSizeValue 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.ButtonoButtonThe button whose index is looked for
Returns:
intThe 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.ControloContentThe content whose index is looked for
Returns:
intThe 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.ButtonoButtonthe button to insert; if empty, nothing is inserted
intiIndexthe 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.PanelReference 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.ControloContentthe content to insert; if empty, nothing is inserted
intiIndexthe 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.PanelReference 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.ButtonvButtonThe button to remove or its index or id
Returns:
sap.ui.commons.ButtonThe removed button or null
removeContent(vContent): sap.ui.core.Control
Removes a content from the aggregation content.
Parameters:
int|string|sap.ui.core.ControlvContentThe content to remove or its index or id
Returns:
sap.ui.core.ControlThe removed content or null
setApplyContentPadding(bPadding): sap.ui.commons.Panel
Property setter for the padding
Parameters:
booleanbPaddingWhether the Panel should have padding.
Returns:
sap.ui.commons.Panelthis 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.AreaDesignsAreaDesignNew value for property areaDesign
Returns:
sap.ui.commons.PanelReference 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.BorderDesignsBorderDesignNew value for property borderDesign
Returns:
sap.ui.commons.PanelReference to this in order to allow method chaining
setCollapsed(bCollapsed): sap.ui.commons.Panel
Property setter for the "collapsed" state
Parameters:
booleanbCollapsedWhether the Panel should be collapsed or not.
Returns:
sap.ui.commons.Panelthis to allow method chaining.
setDimensions(sWidth, sHeight): sap.ui.commons.Panel
Sets the dimensions of the panel.
Parameters:
sap.ui.core.CSSSizesWidthThe width of the panel as CSS size.
sap.ui.core.CSSSizesHeightThe height of the panel as CSS size.
Returns:
sap.ui.commons.Panelthis to allow method chaining.
setEnabled(bEnabled): sap.ui.commons.Panel
Property setter for the "enabled" state
Parameters:
booleanbEnabledWhether the Panel should be enabled or not.
Returns:
sap.ui.commons.Panelthis to allow method chaining.
setHeight(sHeight): sap.ui.commons.Panel
Sets the height of the panel.
Parameters:
sap.ui.core.CSSSizesHeightThe height of the panel as CSS size.
Returns:
sap.ui.commons.Panelthis to allow method chaining.
setScrollLeft(iPosition): sap.ui.commons.Panel
Sets the scroll position of the panel in pixels from the left.
Parameters:
intiPositionThe position to scroll to.
Returns:
sap.ui.commons.Panelthis to allow method chaining.
setScrollTop(iPosition): sap.ui.commons.Panel
Sets the scrolls position of the panel in pixels from the top.
Parameters:
intiPositionThe position to scroll to.
Returns:
sap.ui.commons.Panelthis 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:
booleanbShowCollapseIconNew value for property showCollapseIcon
Returns:
sap.ui.commons.PanelReference 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:
stringsTextThe text to render in the header.
Returns:
sap.ui.commons.Panelthis 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.TitleoTitleThe Title to render in the header.
Returns:
sap.ui.commons.Panelthis to allow method chaining.
setWidth(sWidth): sap.ui.commons.Panel
Sets the width of the panel.
Parameters:
sap.ui.core.CSSSizesWidthThe width of the panel as CSS size.
Returns:
sap.ui.commons.Panelthis to allow method chaining.