class sap.ui.vtm.Panel

Control sample: sap.ui.vtm.Panel
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vtm/Panel
Application Component:

A control that represents a VTM panel. Contains:


Constructor

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#constructor for a general description of the syntax of the settings object.

new sap.ui.vtm.Panel(sId, mSettings)
Param Type Default Value Description
sId string

id for the new sap.ui.vtm.Panel instance.

mSettings object

Object with initial property values, aggregated objects etc. for the new sap.ui.vtm.Panel instance.
The vtmId association needs to be set in order for the panel to be associated with a sap.ui.vtm.Vtm instance.
createPanel creates a sap.ui.vtm.Panel instance and populates the vtmId association.


Properties

Name Type Default Value Description
height sap.ui.core.CSSSize inherit

The height of the panel.

Visibility: public
showViewport boolean true

Controls whether the viewport will be shown for this panel.

Visibility: public
title string

The text to show in the title bar for this panel.

Visibility: public
treeWidth sap.ui.core.CSSSize 50%

The width of the tree.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
_panel 0..1 sap.m.VBox
titleControls 0..n sap.ui.core.Control

The set of controls to render in the title bar area.

treeHeaderControls 0..n sap.ui.core.Control

The set of controls to render in the tree header area.

viewportHeaderControls 0..n sap.ui.core.Control

The set of controls to render in the viewport header area.


Associations

Name Cardinality Type Description
vtmId 0..1 sap.ui.vtm.Vtm

The sap.ui.vtm.Vtm instance this panel is associated with.


Events Overview

Event Description
contextMenu

Raised when the web browser contextmenu event is raised. To prevent the default browser context menu from being shown call preventDefault() on the event.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

initialized

Raised when the panel is initialized.

contextMenu

Raised when the web browser contextmenu event is raised. To prevent the default browser context menu from being shown call preventDefault() on the event.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
clientX int

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY int

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

pageX int

The X coordinate of the mouse pointer in page coordinates.

pageY int

The X coordinate of the mouse pointer in page coordinates.

screenX int

The X coordinate of the mouse pointer in screen coordinates.

screenY int

The X coordinate of the mouse pointer in screen coordinates.

eventData object

The jQuery event object.

initialized

Raised when the panel is initialized.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

Methods Overview

Method Description
addTitleControl

Adds some titleControl to the aggregation titleControls.

addTreeHeaderControl

Adds some treeHeaderControl to the aggregation treeHeaderControls.

addViewportHeaderControl

Adds some viewportHeaderControl to the aggregation viewportHeaderControls.

attachContextMenu

Attaches event handler fnFunction to the contextMenu event of this sap.ui.vtm.Panel.

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.vtm.Panel itself.

Raised when the web browser contextmenu event is raised. To prevent the default browser context menu from being shown call preventDefault() on the event.

attachInitialized

Attaches event handler fnFunction to the initialized event of this sap.ui.vtm.Panel.

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.vtm.Panel itself.

Raised when the panel is initialized.

destroyTitleControls

Destroys all the titleControls in the aggregation titleControls.

destroyTreeHeaderControls

Destroys all the treeHeaderControls in the aggregation treeHeaderControls.

destroyViewportHeaderControls

Destroys all the viewportHeaderControls in the aggregation viewportHeaderControls.

detachContextMenu

Detaches event handler fnFunction from the contextMenu event of this sap.ui.vtm.Panel.

The passed function and listener object must match the ones used for event registration.

detachInitialized

Detaches event handler fnFunction from the initialized event of this sap.ui.vtm.Panel.

The passed function and listener object must match the ones used for event registration.

sap.ui.vtm.Panel.extend

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

fireContextMenu

Fires event contextMenu to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireInitialized

Fires event initialized to attached listeners.

getHeight

Gets current value of property height.

The height of the panel.

Default value is "inherit".

getIsActive

Gets whether this is the active sap.ui.vtm.Panel.

sap.ui.vtm.Panel.getMetadata

Returns a metadata object for class sap.ui.vtm.Panel.

getShowViewport

Gets current value of property showViewport.

Controls whether the viewport will be shown for this panel.

Default value is true.

getTitle

Gets current value of property title.

The text to show in the title bar for this panel.

getTitleControls

Gets content of aggregation titleControls.

The set of controls to render in the title bar area.

getTree

Gets the tree owned by this panel.

getTreeHeaderControls

Gets content of aggregation treeHeaderControls.

The set of controls to render in the tree header area.

getTreeWidth

Gets current value of property treeWidth.

The width of the tree.

Default value is "50%".

getViewport

Gets the viewport owned by this panel.

getViewportHeaderControls

Gets content of aggregation viewportHeaderControls.

The set of controls to render in the viewport header area.

getVtm

Gets the sap.ui.vtm.Vtm instance that owns this panel.

getVtmId

ID of the element which is the current target of the association vtmId, or null.

indexOfTitleControl

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

indexOfTreeHeaderControl

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

indexOfViewportHeaderControl

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

insertTitleControl

Inserts a titleControl into the aggregation titleControls.

insertTreeHeaderControl

Inserts a treeHeaderControl into the aggregation treeHeaderControls.

insertViewportHeaderControl

Inserts a viewportHeaderControl into the aggregation viewportHeaderControls.

removeAllTitleControls

Removes all the controls from the aggregation titleControls.

Additionally, it unregisters them from the hosting UIArea.

removeAllTreeHeaderControls

Removes all the controls from the aggregation treeHeaderControls.

Additionally, it unregisters them from the hosting UIArea.

removeAllViewportHeaderControls

Removes all the controls from the aggregation viewportHeaderControls.

Additionally, it unregisters them from the hosting UIArea.

removeTitleControl

Removes a titleControl from the aggregation titleControls.

removeTreeHeaderControl

Removes a treeHeaderControl from the aggregation treeHeaderControls.

removeViewportHeaderControl

Removes a viewportHeaderControl from the aggregation viewportHeaderControls.

setHeight

Sets a new value for property height.

The height of the panel.

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

Default value is "inherit".

setShowViewport

Sets a new value for property showViewport.

Controls whether the viewport will be shown for this panel.

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

Default value is true.

setTitle

Sets the panel title.

setTreeWidth

Sets a new value for property treeWidth.

The width of the tree.

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

Default value is "50%".

setVtmId

Sets the associated vtmId.

addTitleControl

Adds some titleControl to the aggregation titleControls.

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

The titleControl to add; if empty, nothing is inserted

addTreeHeaderControl

Adds some treeHeaderControl to the aggregation treeHeaderControls.

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

The treeHeaderControl to add; if empty, nothing is inserted

addViewportHeaderControl

Adds some viewportHeaderControl to the aggregation viewportHeaderControls.

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

The viewportHeaderControl to add; if empty, nothing is inserted

attachContextMenu

Attaches event handler fnFunction to the contextMenu event of this sap.ui.vtm.Panel.

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.vtm.Panel itself.

Raised when the web browser contextmenu event is raised. To prevent the default browser context menu from being shown call preventDefault() on the event.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.vtm.Panel itself

attachInitialized

Attaches event handler fnFunction to the initialized event of this sap.ui.vtm.Panel.

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.vtm.Panel itself.

Raised when the panel is initialized.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.vtm.Panel itself

destroyTitleControls

Destroys all the titleControls in the aggregation titleControls.

destroyTreeHeaderControls

Destroys all the treeHeaderControls in the aggregation treeHeaderControls.

destroyViewportHeaderControls

Destroys all the viewportHeaderControls in the aggregation viewportHeaderControls.

detachContextMenu

Detaches event handler fnFunction from the contextMenu event of this sap.ui.vtm.Panel.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachInitialized

Detaches event handler fnFunction from the initialized event of this sap.ui.vtm.Panel.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.ui.vtm.Panel.extend

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

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

fireContextMenu

Fires event contextMenu to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

clientX int

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY int

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

pageX int

The X coordinate of the mouse pointer in page coordinates.

pageY int

The X coordinate of the mouse pointer in page coordinates.

screenX int

The X coordinate of the mouse pointer in screen coordinates.

screenY int

The X coordinate of the mouse pointer in screen coordinates.

eventData object

The jQuery event object.

fireInitialized

Fires event initialized to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getHeight

Gets current value of property height.

The height of the panel.

Default value is "inherit".

getIsActive

Gets whether this is the active sap.ui.vtm.Panel.

sap.ui.vtm.Panel.getMetadata

Returns a metadata object for class sap.ui.vtm.Panel.

getShowViewport

Gets current value of property showViewport.

Controls whether the viewport will be shown for this panel.

Default value is true.

getTitle

Gets current value of property title.

The text to show in the title bar for this panel.

getTitleControls

Gets content of aggregation titleControls.

The set of controls to render in the title bar area.

getTree

Gets the tree owned by this panel.

getTreeHeaderControls

Gets content of aggregation treeHeaderControls.

The set of controls to render in the tree header area.

getTreeWidth

Gets current value of property treeWidth.

The width of the tree.

Default value is "50%".

getViewport

Gets the viewport owned by this panel.

getViewportHeaderControls

Gets content of aggregation viewportHeaderControls.

The set of controls to render in the viewport header area.

getVtm

Gets the sap.ui.vtm.Vtm instance that owns this panel.

getVtmId

ID of the element which is the current target of the association vtmId, or null.

indexOfTitleControl

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

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

The titleControl whose index is looked for

indexOfTreeHeaderControl

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

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

The treeHeaderControl whose index is looked for

indexOfViewportHeaderControl

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

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

The viewportHeaderControl whose index is looked for

insertTitleControl

Inserts a titleControl into the aggregation titleControls.

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

The titleControl to insert; if empty, nothing is inserted

iIndex int

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

insertTreeHeaderControl

Inserts a treeHeaderControl into the aggregation treeHeaderControls.

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

The treeHeaderControl to insert; if empty, nothing is inserted

iIndex int

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

insertViewportHeaderControl

Inserts a viewportHeaderControl into the aggregation viewportHeaderControls.

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

The viewportHeaderControl to insert; if empty, nothing is inserted

iIndex int

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

removeAllTitleControls

Removes all the controls from the aggregation titleControls.

Additionally, it unregisters them from the hosting UIArea.

removeAllTreeHeaderControls

Removes all the controls from the aggregation treeHeaderControls.

Additionally, it unregisters them from the hosting UIArea.

removeAllViewportHeaderControls

Removes all the controls from the aggregation viewportHeaderControls.

Additionally, it unregisters them from the hosting UIArea.

removeTitleControl

Removes a titleControl from the aggregation titleControls.

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

The titleControl to remove or its index or id

removeTreeHeaderControl

Removes a treeHeaderControl from the aggregation treeHeaderControls.

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

The treeHeaderControl to remove or its index or id

removeViewportHeaderControl

Removes a viewportHeaderControl from the aggregation viewportHeaderControls.

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

The viewportHeaderControl to remove or its index or id

setHeight

Sets a new value for property height.

The height of the panel.

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

Default value is "inherit".

Param Type DefaultValue Description
sHeight sap.ui.core.CSSSize "inherit"

New value for property height

setShowViewport

Sets a new value for property showViewport.

Controls whether the viewport will be shown for this panel.

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
bShowViewport boolean true

New value for property showViewport

setTitle

Sets the panel title.

Param Type DefaultValue Description
title string

The panel title text

setTreeWidth

Sets a new value for property treeWidth.

The width of the tree.

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
sTreeWidth sap.ui.core.CSSSize "50%"

New value for property treeWidth

setVtmId

Sets the associated vtmId.

Param Type DefaultValue Description
oVtmId sap.ui.core.ID sap.ui.vtm.Vtm

ID of an element which becomes the new target of this vtmId association; alternatively, an element instance may be given