Class sap.ui.ux3.ToolPopupModule: sap/ui/ux3/ToolPopup

extends Control
implements PopupInterface

A popup which the user can open from the Shell's tool pane. Generally, the starting point would be an icon. For this pop up, buttons can be defined with any text; therefore, it has the same purpose and similar look like any common dialog box. A ToolPopup can have any content. Depending on the application type and design, the structure of the texts and input fields can be for example form-like.

Deprecated API:Since version 1.38. Instead, use the sap.m.Popup control.

Constructor Summary
new sap.ui.ux3.ToolPopup(sId?, mSettings?)Constructor for a new ToolPopup.
Event Summary
close(oControlEvent)Event is fired when the popup closes because the user pressed Escape or the ToolPopup Button in the Shell.
closed(oControlEvent)This event is fired after the ToolPopup has finished its closing animation.
enter(oControlEvent)Event is fired whenever the user clicks the Enter or the Enter key inside the pop up
iconChanged(oControlEvent)Event is fired when one of the icon properties is modified (Note: The icon is not rendered by the ToolPopup).
open(oControlEvent)Event is fired when the popup opens
opened(oControlEvent)Event is being fired after the ToolPopup has been opened.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.ux3.ToolPopup.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.ux3.ToolPopup with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.ux3.ToolPopup.getMetadata()Returns a metadata object for class sap.ui.ux3.ToolPopup.
addButton(oButton)Adds some button to the aggregation buttons.
addContent(oContent)Adds some content to the aggregation content.
addFocusableArea(sID?)Adds an ID to the Popup that should be focusable as well when using autoclose.
attachClose(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the close event of this sap.ui.ux3.ToolPopup.
attachClosed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the closed event of this sap.ui.ux3.ToolPopup.
attachEnter(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the enter event of this sap.ui.ux3.ToolPopup.
attachIconChanged(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the iconChanged event of this sap.ui.ux3.ToolPopup.
attachOpen(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the open event of this sap.ui.ux3.ToolPopup.
attachOpened(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the opened event of this sap.ui.ux3.ToolPopup.
close(bPreventRestoreFocus)Closes the pop up.
destroyButtons()Destroys all the buttons in the aggregation buttons.
destroyContent()Destroys all the content in the aggregation content.
detachClose(fnFunction, oListener)Detaches event handler fnFunction from the close event of this sap.ui.ux3.ToolPopup.
detachClosed(fnFunction, oListener)Detaches event handler fnFunction from the closed event of this sap.ui.ux3.ToolPopup.
detachEnter(fnFunction, oListener)Detaches event handler fnFunction from the enter event of this sap.ui.ux3.ToolPopup.
detachIconChanged(fnFunction, oListener)Detaches event handler fnFunction from the iconChanged event of this sap.ui.ux3.ToolPopup.
detachOpen(fnFunction, oListener)Detaches event handler fnFunction from the open event of this sap.ui.ux3.ToolPopup.
detachOpened(fnFunction, oListener)Detaches event handler fnFunction from the opened event of this sap.ui.ux3.ToolPopup.
fireClose(mArguments?)Fires event close to attached listeners.
fireClosed(mArguments?)Fires event closed to attached listeners.
fireEnter(mArguments?)Fires event enter to attached listeners.
fireIconChanged(mArguments?)Fires event iconChanged to attached listeners.
fireOpen(mArguments?)Fires event open to attached listeners.
fireOpened(mArguments?)Fires event opened to attached listeners.
getAutoClose()Gets current value of property autoClose.
getButtons()Gets content of aggregation buttons.
getCloseDuration()Gets current value of property closeDuration.
getContent()Gets content of aggregation content.
getDefaultButton()ID of the element which is the current target of the association defaultButton, or null.
getEnabled()Indicates whether the ToolPopup is currently enabled or not.
getIcon()Gets current value of property icon.
getIconHover()Gets current value of property iconHover.
getInitialFocus()ID of the element which is the current target of the association initialFocus, or null.
getInverted()Gets current value of property inverted.
getMaxHeight()Gets current value of property maxHeight.
getMaxWidth()Gets current value of property maxWidth.
getModal()Gets current value of property modal.
getOpenDuration()Gets current value of property openDuration.
getOpener()ID of the element which is the current target of the association opener, or null.
getTitle()Gets current value of property title.
indexOfButton(oButton)Checks for the provided sap.ui.core.Control 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.
isOpen()Indicates whether the pop up is currently open
open(my?, at?)Opens the ToolPopup.
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.
removeFocusableArea(sID?)Removes an ID to the Popup that should be focusable as well when using autoclose.
setAutoClose(bAutoClose)Sets a new value for property autoClose.
setAutoCloseAreas(aAutoCloseAreas)This is just a forward to the Popup's function (sap.ui.core.Popup.setAutoCloseAreas) with the same functionality.
setCloseDuration(iCloseDuration)Sets a new value for property closeDuration.
setDefaultButton(oDefaultButton)Sets the associated defaultButton.
setInitialFocus(oInitialFocus)Sets the associated initialFocus.
setInverted(bInverted)Sets a new value for property inverted.
setMaxHeight(sMaxHeight)Sets a new value for property maxHeight.
setModal(bModal)Sets a new value for property modal.
setOpenDuration(iOpenDuration)Sets a new value for property openDuration.
setOpener(oOpener)Sets the associated opener.
setPosition()Sets the position of the pop up, the same parameters as for sap.ui.core.Popup can be used.
setTitle(sTitle)Sets a new value for property title.
Constructor Detail
new sap.ui.ux3.ToolPopup(sId?, mSettings?)
Constructor for a new ToolPopup.

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:

  • Properties
  • Aggregations
    • buttons : sap.ui.core.Control[]
    • content : sap.ui.core.Control[] (default)
  • Events
    • open : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • close : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • enter : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • iconChanged : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • closed : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • opened : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
{string}sId? ID for the new control, generated automatically if no ID is given
{object}mSettings? Initial settings for the new control
Deprecated:
Since version 1.38. Instead, use the sap.m.Popup control.
Event Detail
close(oControlEvent)
Event is fired when the popup closes because the user pressed Escape or the ToolPopup Button in the Shell. This is called before the closing animation.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
closed(oControlEvent)
This event is fired after the ToolPopup has finished its closing animation. It is called for EVERY close, regardless of whether the user has triggered the close or whether the ToolPopup was closed via API call.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
enter(oControlEvent)
Event is fired whenever the user clicks the Enter or the Enter key inside the pop up
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{object}oControlEvent.getParameters.originalEvent The onsapenter event, received by the pop up
{sap.ui.core.Control}oControlEvent.getParameters.originalSrcControl The control that was focused when the user pressed the Enter key (may be null)
iconChanged(oControlEvent)
Event is fired when one of the icon properties is modified (Note: The icon is not rendered by the ToolPopup). To be used by other controls which want to update the icon in their UI.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
open(oControlEvent)
Event is fired when the popup opens
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
opened(oControlEvent)
Event is being fired after the ToolPopup has been opened.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.19.0
Method Detail
sap.ui.ux3.ToolPopup.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.ux3.ToolPopup 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
sap.ui.ux3.ToolPopup.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.ux3.ToolPopup.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addButton(oButton): sap.ui.ux3.ToolPopup
Adds some button to the aggregation buttons.
Parameters:
{sap.ui.core.Control}oButton the button to add; if empty, nothing is inserted
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
addContent(oContent): sap.ui.ux3.ToolPopup
Adds some content to the aggregation content.
Parameters:
{sap.ui.core.Control}oContent the content to add; if empty, nothing is inserted
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
addFocusableArea(sID?)
Adds an ID to the Popup that should be focusable as well when using autoclose. Chaining is only possible if a valid type (string) is given.
Parameters:
{string}sID? ID of the corresponding element that should be focusable as well
Since:
1.19.0
attachClose(oData?, fnFunction, oListener?): sap.ui.ux3.ToolPopup
Attaches event handler fnFunction to the close event of this sap.ui.ux3.ToolPopup.

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.ux3.ToolPopup itself.

Event is fired when the popup closes because the user pressed Escape or the ToolPopup Button in the Shell. This is called before the closing animation.

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.ux3.ToolPopup itself
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
attachClosed(oData?, fnFunction, oListener?): sap.ui.ux3.ToolPopup
Attaches event handler fnFunction to the closed event of this sap.ui.ux3.ToolPopup.

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.ux3.ToolPopup itself.

This event is fired after the ToolPopup has finished its closing animation. It is called for EVERY close, regardless of whether the user has triggered the close or whether the ToolPopup was closed via API call.

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.ux3.ToolPopup itself
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
attachEnter(oData?, fnFunction, oListener?): sap.ui.ux3.ToolPopup
Attaches event handler fnFunction to the enter event of this sap.ui.ux3.ToolPopup.

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.ux3.ToolPopup itself.

Event is fired whenever the user clicks the Enter or the Enter key inside the pop up

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.ux3.ToolPopup itself
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
attachIconChanged(oData?, fnFunction, oListener?): sap.ui.ux3.ToolPopup
Attaches event handler fnFunction to the iconChanged event of this sap.ui.ux3.ToolPopup.

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.ux3.ToolPopup itself.

Event is fired when one of the icon properties is modified (Note: The icon is not rendered by the ToolPopup). To be used by other controls which want to update the icon in their UI.

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.ux3.ToolPopup itself
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
attachOpen(oData?, fnFunction, oListener?): sap.ui.ux3.ToolPopup
Attaches event handler fnFunction to the open event of this sap.ui.ux3.ToolPopup.

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.ux3.ToolPopup itself.

Event is fired when the popup opens

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.ux3.ToolPopup itself
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
attachOpened(oData?, fnFunction, oListener?): sap.ui.ux3.ToolPopup
Attaches event handler fnFunction to the opened event of this sap.ui.ux3.ToolPopup.

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.ux3.ToolPopup itself.

Event is being fired after the ToolPopup has been opened.

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.ux3.ToolPopup itself
Since:
1.19.0
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
close(bPreventRestoreFocus): sap.ui.ux3.ToolPopup
Closes the pop up. Can be called by the Shell when the pop up's button is clicked again; or by the application when the interaction in the pop up has been completed or canceled.
Parameters:
{boolean}bPreventRestoreFocus If set, the focus is NOT restored to the element that had the focus before the ToolPopup was opened. This makes sense when the ToolPopup is closed programmatically from a different area of the application (outside the ToolPopup) and the focus should not move aways from that place.
Returns:
{sap.ui.ux3.ToolPopup}
destroyButtons(): sap.ui.ux3.ToolPopup
Destroys all the buttons in the aggregation buttons.
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
destroyContent(): sap.ui.ux3.ToolPopup
Destroys all the content in the aggregation content.
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
detachClose(fnFunction, oListener): sap.ui.ux3.ToolPopup
Detaches event handler fnFunction from the close event of this sap.ui.ux3.ToolPopup.

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:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
detachClosed(fnFunction, oListener): sap.ui.ux3.ToolPopup
Detaches event handler fnFunction from the closed event of this sap.ui.ux3.ToolPopup.

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:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
detachEnter(fnFunction, oListener): sap.ui.ux3.ToolPopup
Detaches event handler fnFunction from the enter event of this sap.ui.ux3.ToolPopup.

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:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
detachIconChanged(fnFunction, oListener): sap.ui.ux3.ToolPopup
Detaches event handler fnFunction from the iconChanged event of this sap.ui.ux3.ToolPopup.

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:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
detachOpen(fnFunction, oListener): sap.ui.ux3.ToolPopup
Detaches event handler fnFunction from the open event of this sap.ui.ux3.ToolPopup.

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:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
detachOpened(fnFunction, oListener): sap.ui.ux3.ToolPopup
Detaches event handler fnFunction from the opened event of this sap.ui.ux3.ToolPopup.

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
Since:
1.19.0
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
fireClose(mArguments?): boolean
Fires event close to attached listeners.

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

Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{boolean} Whether or not to prevent the default action
fireClosed(mArguments?): sap.ui.ux3.ToolPopup
Fires event closed to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
fireEnter(mArguments?): sap.ui.ux3.ToolPopup
Fires event enter to attached listeners.

Expects the following event parameters:

  • originalEvent of type objectThe onsapenter event, received by the pop up
  • originalSrcControl of type sap.ui.core.ControlThe control that was focused when the user pressed the Enter key (may be null)
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
fireIconChanged(mArguments?): sap.ui.ux3.ToolPopup
Fires event iconChanged to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
fireOpen(mArguments?): sap.ui.ux3.ToolPopup
Fires event open to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
fireOpened(mArguments?): sap.ui.ux3.ToolPopup
Fires event opened to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.19.0
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
getAutoClose(): boolean
Gets current value of property autoClose.

Determines whether the ToolPopup will auto close when it loses focus. If the user e.g. clicks outside of the ToolPopup it will be closed. Please don't use "modal" and "autoclose" at the same time. In this case a warning will be prompted to the console and "autoclose" won't be used.

Default value is false.

Since:
1.13.2
Returns:
{boolean} Value of property autoClose
getButtons(): sap.ui.core.Control[]
Gets content of aggregation buttons.

Defines the buttons to appear in the popup

Returns:
{sap.ui.core.Control[]}
getCloseDuration(): int
Gets current value of property closeDuration.

Time in milliseconds for the close animation.

Default value is 400.

Since:
1.19.0
Returns:
{int} Value of property closeDuration
getContent(): sap.ui.core.Control[]
Gets content of aggregation content.

Defines the content of the popup

Returns:
{sap.ui.core.Control[]}
getDefaultButton(): sap.ui.core.Control
ID of the element which is the current target of the association defaultButton, or null.
Since:
1.20.1
Returns:
{sap.ui.core.Control}
getEnabled(): boolean
Indicates whether the ToolPopup is currently enabled or not.

Applications can't control the enabled state via a property. A ToolPopup is implicitly enabled depending on its openState. Descendant controls that honor the enabled state of their ancestors will appear disabled after the ToolPopup is closed.

Since 1.13.1. Whether a dialog is regarded as "enabled" during the state transitions (OPENING, CLOSING) is not fully decided. Currently, it is enabled during the OPENING phase and disabled during the CLOSING phase. The only potential change would be to treat the OPENING phase as disabled as well. Applications should be prepared to receive events from "enabled" controls after they called open() on the dialog until close() is called on it. If the mentioned potential change should happen, the dialog will become enabled only after the transition to OPEN. Events from "enabled" children then can still only arrive between open() and close(), so applications that obey the previous rule should continue to work. Only end users or code that explicitly triggers pseudo user events would notice a difference.
A second aspect that might change is the visual behavior of the content: during the CLOSING phase it 'looks' enabled but in fact it is already disabled. This avoids unnecessary redraws for content that becomes hidden soon. Should this show to be confusing for end users, it might be changed.

Since:
1.13.1
Returns:
{boolean}
getIcon(): sap.ui.core.URI
Gets current value of property icon.

This property is relevant for Shell use: The URL to the icon displayed in the tool area which is used to open the ToolPopup. The recommended size is 32x32px, including some transparent border. Therefore, the content will cover about 20x20px.

Returns:
{sap.ui.core.URI} Value of property icon
getIconHover(): sap.ui.core.URI
Gets current value of property iconHover.

This property is relevant for Shell use: The URL to the icon in hover state, displayed in the tool area which is used to open the popup.

Returns:
{sap.ui.core.URI} Value of property iconHover
getInitialFocus(): sap.ui.core.Control
ID of the element which is the current target of the association initialFocus, or null.
Returns:
{sap.ui.core.Control}
getInverted(): boolean
Gets current value of property inverted.

Specifies whether the ToolPopup has a dark or bright background. If set to true the background and borders will be dark. If false they will be bright. This property only has an effect for the GoldReflection-theme.

Default value is true.

Since:
1.11.1
Returns:
{boolean} Value of property inverted
getMaxHeight(): sap.ui.core.CSSSize
Gets current value of property maxHeight.

Forces a maximum height of the ToolPopup in pixels. If the ToolPopup content is higher than the ToolPopup, the content will be scrollable.

Since:
1.13.2
Returns:
{sap.ui.core.CSSSize} Value of property maxHeight
getMaxWidth(): sap.ui.core.CSSSize
Gets current value of property maxWidth.

Forces a maximum width of the ToolPopup in pixels.

Since:
1.15.0
Returns:
{sap.ui.core.CSSSize} Value of property maxWidth
getModal(): boolean
Gets current value of property modal.

Specifies whether the popup is modal and blocks any user-interaction with controls in the background. Changing this property while the ToolPopup is open will not have any effect. Please don't use "modal" and "autoclose" at the same time. In this case a warning will be prompted to the console and "autoclose" won't be used.

Default value is false.

Returns:
{boolean} Value of property modal
getOpenDuration(): int
Gets current value of property openDuration.

Time in milliseconds for the open animation.

Default value is 400.

Since:
1.19.0
Returns:
{int} Value of property openDuration
getOpener(): sap.ui.core.Control
ID of the element which is the current target of the association opener, or null.
Returns:
{sap.ui.core.Control}
getTitle(): string
Gets current value of property title.

Determines the title displayed in the pop up window

Returns:
{string} Value of property title
indexOfButton(oButton): int
Checks for the provided sap.ui.core.Control in the aggregation buttons. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.core.Control}oButton The button whose index is looked for
Returns:
{int} The 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.Control}oContent The content whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertButton(oButton, iIndex): sap.ui.ux3.ToolPopup
Inserts a button into the aggregation buttons.
Parameters:
{sap.ui.core.Control}oButton the button to insert; if empty, nothing is inserted
{int}iIndex the 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.ux3.ToolPopup} Reference to this in order to allow method chaining
insertContent(oContent, iIndex): sap.ui.ux3.ToolPopup
Inserts a content into the aggregation content.
Parameters:
{sap.ui.core.Control}oContent the content to insert; if empty, nothing is inserted
{int}iIndex 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
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
isOpen(): boolean
Indicates whether the pop up is currently open
Returns:
{boolean}
open(my?, at?): sap.ui.ux3.ToolPopup
Opens the ToolPopup. It is checked which control wants to open the ToolPopup. The Shell was previously set as parent so the corresponding parent element is used to set the correct position of the ToolPopup. If another control (i.e. a button) opens the ToolPopup, the control must be previously set as opener via setOpener to the ToolPopup. Corresponding to this opener the position of the ToolPopup will be set. It's also possible to set the position above, below or left from the opener. This can be done via the possible parameters my and at. These parameters refers to work the same way as they do of sap.ui.core.Popup.open.
Parameters:
{sap.ui.core.Popup.Dock}my?, Default: sap.ui.core.Popup.Dock.CenterCenter The ToolPopup's content reference position for docking
{sap.ui.core.Popup.Dock}at?, Default: sap.ui.core.Popup.Dock.CenterCenter The "of" element's reference point for docking to
Returns:
{sap.ui.ux3.ToolPopup}
removeAllButtons(): sap.ui.core.Control[]
Removes all the controls from the aggregation buttons.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.core.Control[]} 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.core.Control
Removes a button from the aggregation buttons.
Parameters:
{int|string|sap.ui.core.Control}vButton The buttonto remove or its index or id
Returns:
{sap.ui.core.Control} The removed button or null
removeContent(vContent): sap.ui.core.Control
Removes a content from the aggregation content.
Parameters:
{int|string|sap.ui.core.Control}vContent The contentto remove or its index or id
Returns:
{sap.ui.core.Control} The removed content or null
removeFocusableArea(sID?)
Removes an ID to the Popup that should be focusable as well when using autoclose. Chaining is only possible if a valid type (string) is given.
Parameters:
{string}sID? ID of the corresponding element
Since:
1.19.0
setAutoClose(bAutoClose): sap.ui.ux3.ToolPopup
Sets a new value for property autoClose.

Determines whether the ToolPopup will auto close when it loses focus. If the user e.g. clicks outside of the ToolPopup it will be closed. Please don't use "modal" and "autoclose" at the same time. In this case a warning will be prompted to the console and "autoclose" won't be used.

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

Default value is false.

Parameters:
{boolean}bAutoClose New value for property autoClose
Since:
1.13.2
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
setAutoCloseAreas(aAutoCloseAreas)
This is just a forward to the Popup's function (sap.ui.core.Popup.setAutoCloseAreas) with the same functionality.
Parameters:
{Element[]}aAutoCloseAreas
Since:
1.19.0
setCloseDuration(iCloseDuration): sap.ui.ux3.ToolPopup
Sets a new value for property closeDuration.

Time in milliseconds for the close animation.

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

Default value is 400.

Parameters:
{int}iCloseDuration New value for property closeDuration
Since:
1.19.0
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
setDefaultButton(oDefaultButton): sap.ui.ux3.ToolPopup
Sets the associated defaultButton.
Parameters:
{sap.ui.core.Control}oDefaultButton Id of an element which becomes the new target of this defaultButton association; alternatively, an element instance may be given
Since:
1.20.1
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
setInitialFocus(oInitialFocus): sap.ui.ux3.ToolPopup
Sets the associated initialFocus.
Parameters:
{sap.ui.core.Control}oInitialFocus Id of an element which becomes the new target of this initialFocus association; alternatively, an element instance may be given
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
setInverted(bInverted): sap.ui.ux3.ToolPopup
Sets a new value for property inverted.

Specifies whether the ToolPopup has a dark or bright background. If set to true the background and borders will be dark. If false they will be bright. This property only has an effect for the GoldReflection-theme.

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

Default value is true.

Parameters:
{boolean}bInverted New value for property inverted
Since:
1.11.1
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
setMaxHeight(sMaxHeight): sap.ui.ux3.ToolPopup
Sets a new value for property maxHeight.

Forces a maximum height of the ToolPopup in pixels. If the ToolPopup content is higher than the ToolPopup, the content will be scrollable.

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

Parameters:
{sap.ui.core.CSSSize}sMaxHeight New value for property maxHeight
Since:
1.13.2
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
setModal(bModal): sap.ui.ux3.ToolPopup
Sets a new value for property modal.

Specifies whether the popup is modal and blocks any user-interaction with controls in the background. Changing this property while the ToolPopup is open will not have any effect. Please don't use "modal" and "autoclose" at the same time. In this case a warning will be prompted to the console and "autoclose" won't be used.

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

Default value is false.

Parameters:
{boolean}bModal New value for property modal
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
setOpenDuration(iOpenDuration): sap.ui.ux3.ToolPopup
Sets a new value for property openDuration.

Time in milliseconds for the open animation.

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

Default value is 400.

Parameters:
{int}iOpenDuration New value for property openDuration
Since:
1.19.0
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
setOpener(oOpener): sap.ui.ux3.ToolPopup
Sets the associated opener.
Parameters:
{sap.ui.core.Control}oOpener Id of an element which becomes the new target of this opener association; alternatively, an element instance may be given
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining
setPosition()
Sets the position of the pop up, the same parameters as for sap.ui.core.Popup can be used.
setTitle(sTitle): sap.ui.ux3.ToolPopup
Sets a new value for property title.

Determines the title displayed in the pop up window

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

Parameters:
{string}sTitle New value for property title
Returns:
{sap.ui.ux3.ToolPopup} Reference to this in order to allow method chaining