sap.ui.layout.Splitter.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.layout.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.
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.layout.Splitter.
Returns:
Adds some contentArea to the aggregation contentAreas
.
Parameters:
Returns:
Attaches event handler
fnFunction
to the
resize
event of this
sap.ui.layout.Splitter
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.layout.Splitter
itself.
Event is fired when contents are resized.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.layout.Splitter itself |
Returns:
Destroys all the contentAreas in the aggregation contentAreas
.
Returns:
Detaches event handler
fnFunction
from the
resize
event of this
sap.ui.layout.Splitter
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
disableKeyboardSupport()
Disables the resizing of the Splitter contents via keyboard. This changes the Splitter bars to non-focussable elements.
enableKeyboardSupport()
Enables the resizing of the Splitter contents via keyboard. This makes the Splitter bars focussable elements.
Fires event
resize
to attached listeners.
Expects the following event parameters:
id
of type string
The ID of the splitter control. The splitter control can also be accessed by calling getSource() on the event.oldSizes
of type int[]
An array of values representing the old (pixel-)sizes of the splitter contentsnewSizes
of type int[]
An array of values representing the new (pixel-)sizes of the splitter contents
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Gets content of aggregation
contentAreas
.
The content areas to be split. The control will show n-1 splitter bars between n controls in this aggregation.
Returns:
Gets current value of property
height
.
The height of the control
Default value is 100%
.
Returns:
Gets current value of property
orientation
.
Whether to split the contents horizontally (default) or vertically.
Default value is Horizontal
.
Returns:
Gets current value of property
width
.
The width of the control
Default value is 100%
.
Returns:
indexOfContentArea(oContentArea): int
Checks for the provided sap.ui.core.Control
in the aggregation contentAreas
. 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 contentArea into the aggregation contentAreas
.
Parameters:
{sap.ui.core.Control} | oContentArea | the contentArea to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the contentArea should be inserted at; for a negative value of iIndex , the contentArea is inserted at position 0; for a value greater than the current size of the aggregation, the contentArea is inserted at the last position |
Returns:
Removes all the controls from the aggregation
contentAreas
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a contentArea from the aggregation contentAreas
.
Parameters:
Returns:
Sets a new value for property
height
.
The height of the control
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 100%
.
Parameters:
Returns:
Sets a new value for property
orientation
.
Whether to split the contents horizontally (default) or vertically.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Horizontal
.
Parameters:
Returns:
Sets a new value for property
width
.
The width of the control
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 100%
.
Parameters:
Returns:
triggerResize(forceDirectly?)
This method triggers a resize on the Splitter - meaning it forces the Splitter to recalculate all sizes. This method should only be used in rare cases, for example when the CSS that defines the sizes of the splitter bars changes without triggering a rerendering of the splitter.
Parameters:
{boolean} | forceDirectly? | Do not delay the resize, trigger it right now. |
disableAutoResize(bTemporarily?)
Disables the resize handler for this control, this leads to an automatic resize of the contents whenever the control changes its size. The resize handler is enabled in every control instance by default. For performance reasons this behavior can be disabled by calling disableAutoResize()
Parameters:
{boolean} | bTemporarily? | Only disable autoResize temporarily (used for live resize), so that the previous status can be restored afterwards |
- Deprecated:
- This method is declared as protected in order to assess the need for this feature. It is declared as deprecated because the API might change in case the need for this is high enough to make it part of the official Splitter interface
disableLiveResize()
Disables recalculation and resize of the splitter contents while dragging the splitter bar. This means that the contents are resized only once after moving the splitter bar.
- Deprecated:
- This method is declared as protected in order to assess the need for this feature. It is declared as deprecated because the API might change in case the need for this is high enough to make it part of the official Splitter interface
enableAutoResize(bTemporarily?)
Enables the resize handler for this control, this leads to an automatic resize of the contents whenever the control changes its size. The resize handler is enabled in every control instance by default. For performance reasons this behavior can be disabled by calling disableAutoResize()
Parameters:
{boolean} | bTemporarily? | Only enables autoResize if it was previously disabled temporarily (used for live resize) |
- Deprecated:
- This method is declared as protected in order to assess the need for this feature. It is declared as deprecated because the API might change in case the need for this is high enough to make it part of the official Splitter interface
enableLiveResize()
Enables recalculation and resize of the splitter contents while dragging the splitter bar. This means that the contents are resized several times per second when moving the splitter bar.
- Deprecated:
- This method is declared as protected in order to assess the need for this feature. It is declared as deprecated because the API might change in case the need for this is high enough to make it part of the official Splitter interface
getCalculatedSizes(): Number[]
Returns the current actual content sizes as pixel value - these values can change with every resize.
- Deprecated:
- This method is declared as protected in order to assess the need for this feature. It is declared as deprecated because the API might change in case the need for this is high enough to make it part of the official Splitter interface
Returns:
{Number[]} | Array of px values that correspond to the content area sizes |