class sap.ui.commons.Splitter

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

Allows to split the screen into two areas. Make sure that the container for the splitter has an absolute height or set an absolute height for the splitter using the height property. Otherwise the height of the splitter is calculated by the height of its contents.


Constructor

Constructor for a new Splitter.

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.commons.Splitter(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
height sap.ui.commons.SplitterSize 100%

The height of the split area in px or in %

Visibility: public
minSizeFirstPane sap.ui.core.Percentage 0%

The minimum size (width for vertical splitter or height for horizontal splitter) of the first Pane

Visibility: public
minSizeSecondPane sap.ui.core.Percentage 0%

The minimum size (width for vertical splitter or height for horizontal splitter) of the second Pane

Visibility: public
showScrollBars boolean true

Specifies if the browser should display scroll bars or simply cut the content of a splitter pane when the content does not fit into its pane.

Visibility: public
splitterBarVisible boolean true

set the splitter bar to be visible or not.

Visibility: public
splitterOrientation sap.ui.core.Orientation Vertical

The splitter can have horizontal or vertical orientation.

Visibility: public
splitterPosition sap.ui.core.Percentage 50%

Position of splitter bar in percentage. The default value means that the splitter is positioned in the middle of the area that is available for the splitter.

Visibility: public
width sap.ui.commons.SplitterSize 100%

The width of the split area in px or in %

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
firstPaneContent 0..n sap.ui.core.Control

Controls inside the first pane. These are the left ones in case of defining a vertical splitter, and the top ones in case of using the horizontal splitter.

secondPaneContent 0..n sap.ui.core.Control

Controls inside the second pane. These are the right ones in case of defining a vertical splitter, and the bottom ones in case of using the horizontal splitter.


Methods Overview

Method Description
addFirstPaneContent

Adds some firstPaneContent to the aggregation firstPaneContent.

addSecondPaneContent

Adds some secondPaneContent to the aggregation secondPaneContent.

destroyFirstPaneContent

Destroys all the firstPaneContent in the aggregation firstPaneContent.

destroySecondPaneContent

Destroys all the secondPaneContent in the aggregation secondPaneContent.

sap.ui.commons.Splitter.extend

Creates a new subclass of class sap.ui.commons.Splitter 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.

getFirstPaneContent

Gets content of aggregation firstPaneContent.

Controls inside the first pane. These are the left ones in case of defining a vertical splitter, and the top ones in case of using the horizontal splitter.

getHeight

Gets current value of property height.

The height of the split area in px or in %

Default value is '100%'.

sap.ui.commons.Splitter.getMetadata

Returns a metadata object for class sap.ui.commons.Splitter.

getMinSizeFirstPane

Gets current value of property minSizeFirstPane.

The minimum size (width for vertical splitter or height for horizontal splitter) of the first Pane

Default value is '0%'.

getMinSizeSecondPane

Gets current value of property minSizeSecondPane.

The minimum size (width for vertical splitter or height for horizontal splitter) of the second Pane

Default value is '0%'.

getSecondPaneContent

Gets content of aggregation secondPaneContent.

Controls inside the second pane. These are the right ones in case of defining a vertical splitter, and the bottom ones in case of using the horizontal splitter.

getShowScrollBars

Gets current value of property showScrollBars.

Specifies if the browser should display scroll bars or simply cut the content of a splitter pane when the content does not fit into its pane.

Default value is true.

getSplitterBarVisible

Gets current value of property splitterBarVisible.

set the splitter bar to be visible or not.

Default value is true.

getSplitterOrientation

Gets current value of property splitterOrientation.

The splitter can have horizontal or vertical orientation.

Default value is Vertical.

getSplitterPosition

Gets current value of property splitterPosition.

Position of splitter bar in percentage. The default value means that the splitter is positioned in the middle of the area that is available for the splitter.

Default value is '50%'.

getWidth

Gets current value of property width.

The width of the split area in px or in %

Default value is '100%'.

indexOfFirstPaneContent

Checks for the provided sap.ui.core.Control in the aggregation firstPaneContent. and returns its index if found or -1 otherwise.

indexOfSecondPaneContent

Checks for the provided sap.ui.core.Control in the aggregation secondPaneContent. and returns its index if found or -1 otherwise.

insertFirstPaneContent

Inserts a firstPaneContent into the aggregation firstPaneContent.

insertSecondPaneContent

Inserts a secondPaneContent into the aggregation secondPaneContent.

removeAllFirstPaneContent

Removes all the controls from the aggregation firstPaneContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllSecondPaneContent

Removes all the controls from the aggregation secondPaneContent.

Additionally, it unregisters them from the hosting UIArea.

removeFirstPaneContent

Removes a firstPaneContent from the aggregation firstPaneContent.

removeSecondPaneContent

Removes a secondPaneContent from the aggregation secondPaneContent.

setHeight

Sets a new value for property height.

The height of the split area in px or in %

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

Default value is '100%'.

setMinSizeFirstPane

Sets a new value for property minSizeFirstPane.

The minimum size (width for vertical splitter or height for horizontal splitter) of the first Pane

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

Default value is '0%'.

setMinSizeSecondPane

Sets a new value for property minSizeSecondPane.

The minimum size (width for vertical splitter or height for horizontal splitter) of the second Pane

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

Default value is '0%'.

setShowScrollBars

Sets a new value for property showScrollBars.

Specifies if the browser should display scroll bars or simply cut the content of a splitter pane when the content does not fit into its pane.

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

Default value is true.

setSplitterBarVisible

Sets a new value for property splitterBarVisible.

set the splitter bar to be visible or not.

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

Default value is true.

setSplitterOrientation

Sets a new value for property splitterOrientation.

The splitter can have horizontal or vertical orientation.

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

Default value is Vertical.

setSplitterPosition

Sets a new value for property splitterPosition.

Position of splitter bar in percentage. The default value means that the splitter is positioned in the middle of the area that is available for the splitter.

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

Default value is '50%'.

setWidth

Sets a new value for property width.

The width of the split area in px or in %

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

Default value is '100%'.

addFirstPaneContent

Adds some firstPaneContent to the aggregation firstPaneContent.

Param Type DefaultValue Description
oFirstPaneContent sap.ui.core.Control

The firstPaneContent to add; if empty, nothing is inserted

addSecondPaneContent

Adds some secondPaneContent to the aggregation secondPaneContent.

Param Type DefaultValue Description
oSecondPaneContent sap.ui.core.Control

The secondPaneContent to add; if empty, nothing is inserted

destroyFirstPaneContent

Destroys all the firstPaneContent in the aggregation firstPaneContent.

destroySecondPaneContent

Destroys all the secondPaneContent in the aggregation secondPaneContent.

sap.ui.commons.Splitter.extend

Creates a new subclass of class sap.ui.commons.Splitter 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.

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

getFirstPaneContent

Gets content of aggregation firstPaneContent.

Controls inside the first pane. These are the left ones in case of defining a vertical splitter, and the top ones in case of using the horizontal splitter.

getHeight

Gets current value of property height.

The height of the split area in px or in %

Default value is '100%'.

sap.ui.commons.Splitter.getMetadata

Returns a metadata object for class sap.ui.commons.Splitter.

getMinSizeFirstPane

Gets current value of property minSizeFirstPane.

The minimum size (width for vertical splitter or height for horizontal splitter) of the first Pane

Default value is '0%'.

getMinSizeSecondPane

Gets current value of property minSizeSecondPane.

The minimum size (width for vertical splitter or height for horizontal splitter) of the second Pane

Default value is '0%'.

getSecondPaneContent

Gets content of aggregation secondPaneContent.

Controls inside the second pane. These are the right ones in case of defining a vertical splitter, and the bottom ones in case of using the horizontal splitter.

getShowScrollBars

Gets current value of property showScrollBars.

Specifies if the browser should display scroll bars or simply cut the content of a splitter pane when the content does not fit into its pane.

Default value is true.

getSplitterBarVisible

Gets current value of property splitterBarVisible.

set the splitter bar to be visible or not.

Default value is true.

getSplitterOrientation

Gets current value of property splitterOrientation.

The splitter can have horizontal or vertical orientation.

Default value is Vertical.

getSplitterPosition

Gets current value of property splitterPosition.

Position of splitter bar in percentage. The default value means that the splitter is positioned in the middle of the area that is available for the splitter.

Default value is '50%'.

getWidth

Gets current value of property width.

The width of the split area in px or in %

Default value is '100%'.

indexOfFirstPaneContent

Checks for the provided sap.ui.core.Control in the aggregation firstPaneContent. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oFirstPaneContent sap.ui.core.Control

The firstPaneContent whose index is looked for

indexOfSecondPaneContent

Checks for the provided sap.ui.core.Control in the aggregation secondPaneContent. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oSecondPaneContent sap.ui.core.Control

The secondPaneContent whose index is looked for

insertFirstPaneContent

Inserts a firstPaneContent into the aggregation firstPaneContent.

Param Type DefaultValue Description
oFirstPaneContent sap.ui.core.Control

The firstPaneContent to insert; if empty, nothing is inserted

iIndex int

The 0-based index the firstPaneContent should be inserted at; for a negative value of iIndex, the firstPaneContent is inserted at position 0; for a value greater than the current size of the aggregation, the firstPaneContent is inserted at the last position

insertSecondPaneContent

Inserts a secondPaneContent into the aggregation secondPaneContent.

Param Type DefaultValue Description
oSecondPaneContent sap.ui.core.Control

The secondPaneContent to insert; if empty, nothing is inserted

iIndex int

The 0-based index the secondPaneContent should be inserted at; for a negative value of iIndex, the secondPaneContent is inserted at position 0; for a value greater than the current size of the aggregation, the secondPaneContent is inserted at the last position

removeAllFirstPaneContent

Removes all the controls from the aggregation firstPaneContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllSecondPaneContent

Removes all the controls from the aggregation secondPaneContent.

Additionally, it unregisters them from the hosting UIArea.

removeFirstPaneContent

Removes a firstPaneContent from the aggregation firstPaneContent.

Param Type DefaultValue Description
vFirstPaneContent int string sap.ui.core.Control

The firstPaneContent to remove or its index or id

removeSecondPaneContent

Removes a secondPaneContent from the aggregation secondPaneContent.

Param Type DefaultValue Description
vSecondPaneContent int string sap.ui.core.Control

The secondPaneContent to remove or its index or id

setHeight

Sets a new value for property height.

The height of the split area in px or in %

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

Default value is '100%'.

Param Type DefaultValue Description
sHeight sap.ui.commons.SplitterSize '100%'

New value for property height

setMinSizeFirstPane

Sets a new value for property minSizeFirstPane.

The minimum size (width for vertical splitter or height for horizontal splitter) of the first Pane

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

Default value is '0%'.

Param Type DefaultValue Description
sMinSizeFirstPane sap.ui.core.Percentage '0%'

New value for property minSizeFirstPane

setMinSizeSecondPane

Sets a new value for property minSizeSecondPane.

The minimum size (width for vertical splitter or height for horizontal splitter) of the second Pane

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

Default value is '0%'.

Param Type DefaultValue Description
sMinSizeSecondPane sap.ui.core.Percentage '0%'

New value for property minSizeSecondPane

setShowScrollBars

Sets a new value for property showScrollBars.

Specifies if the browser should display scroll bars or simply cut the content of a splitter pane when the content does not fit into its pane.

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

Default value is true.

Param Type DefaultValue Description
bShowScrollBars boolean true

New value for property showScrollBars

setSplitterBarVisible

Sets a new value for property splitterBarVisible.

set the splitter bar to be visible or not.

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

Default value is true.

Param Type DefaultValue Description
bSplitterBarVisible boolean true

New value for property splitterBarVisible

setSplitterOrientation

Sets a new value for property splitterOrientation.

The splitter can have horizontal or vertical orientation.

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

Default value is Vertical.

Param Type DefaultValue Description
sSplitterOrientation sap.ui.core.Orientation Vertical

New value for property splitterOrientation

setSplitterPosition

Sets a new value for property splitterPosition.

Position of splitter bar in percentage. The default value means that the splitter is positioned in the middle of the area that is available for the splitter.

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

Default value is '50%'.

Param Type DefaultValue Description
sSplitterPosition sap.ui.core.Percentage '50%'

New value for property splitterPosition

setWidth

Sets a new value for property width.

The width of the split area in px or in %

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

Default value is '100%'.

Param Type DefaultValue Description
sWidth sap.ui.commons.SplitterSize '100%'

New value for property width