class sap.ui.vk.DrawerToolbar

Control sample: sap.ui.vk.DrawerToolbar
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vk/DrawerToolbar
Application Component: CA-UI5-VTK

Overflow toolbar that can be collapsed.


Constructor

Constructor for a new DrawerToolbar control.

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.vk.DrawerToolbar(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
expanded boolean true

Indicates whether the DrawerToolbar is expanded or not. If expanded is set to true, then both the toolbar and 'Close' icon are rendered. If expanded is set to false, then only the 'Open' icon is rendered.

Visibility: public

Aggregations

Default Aggregation:

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

Determines the content of the DrawerToolbar. See sap.m.OverflowToolbar for list of allowed controls. The content visible when the DrawerToolbar is expanded.


Associations

Name Cardinality Type Description
viewport 0..1 sap.ui.vk.Viewport

Events Overview

Event Description
expanded

Indicates whether the DrawerToolbar is expanded or collapsed.

expanded

Indicates whether the DrawerToolbar is expanded or collapsed.

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

If the DrawerToolbar is expanded, this is true. If the DrawerToolbar is collapsed, this is false.


Methods Overview

Method Description
addContent

Adds some content to the aggregation content.

attachExpanded

Attaches event handler fnFunction to the expanded event of this sap.ui.vk.DrawerToolbar.

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.vk.DrawerToolbar itself.

Indicates whether the DrawerToolbar is expanded or collapsed.

destroyContent

Destroys all the content in the aggregation content.

detachExpanded

Detaches event handler fnFunction from the expanded event of this sap.ui.vk.DrawerToolbar.

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

sap.ui.vk.DrawerToolbar.extend

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

fireExpanded

Fires event expanded to attached listeners.

getContent

Gets content of aggregation content.

Determines the content of the DrawerToolbar. See sap.m.OverflowToolbar for list of allowed controls. The content visible when the DrawerToolbar is expanded.

getExpanded

Gets current value of property expanded.

Indicates whether the DrawerToolbar is expanded or not. If expanded is set to true, then both the toolbar and 'Close' icon are rendered. If expanded is set to false, then only the 'Open' icon is rendered.

Default value is true.

sap.ui.vk.DrawerToolbar.getMetadata

Returns a metadata object for class sap.ui.vk.DrawerToolbar.

getViewport

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

indexOfContent

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

insertContent

Inserts a content into the aggregation content.

removeAllContent

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

removeContent

Removes a content from the aggregation content.

setExpanded

Sets the expanded property of the control.

setViewport

Sets the associated viewport.

addContent

Adds some content to the aggregation content.

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

The content to add; if empty, nothing is inserted

attachExpanded

Attaches event handler fnFunction to the expanded event of this sap.ui.vk.DrawerToolbar.

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.vk.DrawerToolbar itself.

Indicates whether the DrawerToolbar is expanded or collapsed.

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.vk.DrawerToolbar itself

destroyContent

Destroys all the content in the aggregation content.

detachExpanded

Detaches event handler fnFunction from the expanded event of this sap.ui.vk.DrawerToolbar.

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.vk.DrawerToolbar.extend

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

fireExpanded

Fires event expanded to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

expand boolean

If the DrawerToolbar is expanded, this is true. If the DrawerToolbar is collapsed, this is false.

getContent

Gets content of aggregation content.

Determines the content of the DrawerToolbar. See sap.m.OverflowToolbar for list of allowed controls. The content visible when the DrawerToolbar is expanded.

getExpanded

Gets current value of property expanded.

Indicates whether the DrawerToolbar is expanded or not. If expanded is set to true, then both the toolbar and 'Close' icon are rendered. If expanded is set to false, then only the 'Open' icon is rendered.

Default value is true.

sap.ui.vk.DrawerToolbar.getMetadata

Returns a metadata object for class sap.ui.vk.DrawerToolbar.

getViewport

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

indexOfContent

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

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

The content whose index is looked for

insertContent

Inserts a content into the aggregation content.

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

The content to insert; if empty, nothing is inserted

iIndex int

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

removeAllContent

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

removeContent

Removes a content from the aggregation content.

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

The content to remove or its index or id

setExpanded

Sets the expanded property of the control.

Param Type DefaultValue Description
bExpanded boolean

Defines whether control is expanded or not.

setViewport

Sets the associated viewport.

Param Type DefaultValue Description
oViewport sap.ui.core.ID sap.ui.vk.Viewport

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