Class sap.ui.core.TooltipBaseModule: sap/ui/core/TooltipBase

extends Control
known direct subclasses: CalloutBase, RichTooltip

Abstract class that can be extended in order to implement any extended tooltip. For example, RichTooltip Control is based on it. It provides the opening/closing behavior and the main "text" property.

Constructor Summary
new sap.ui.core.TooltipBase(sId?, mSettings?)Constructor for a new TooltipBase.
Event Summary
closed(oControlEvent)This event is fired when the Tooltip has been closed
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.core.TooltipBase.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.core.TooltipBase with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.core.TooltipBase.getMetadata()Returns a metadata object for class sap.ui.core.TooltipBase.
attachClosed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the closed event of this sap.ui.core.TooltipBase.
detachClosed(fnFunction, oListener)Detaches event handler fnFunction from the closed event of this sap.ui.core.TooltipBase.
fireClosed(mArguments?)Fires event closed to attached listeners.
getAtPosition()Gets current value of property atPosition.
getCloseDelay()Gets current value of property closeDelay.
getCloseDuration()Gets current value of property closeDuration.
getCollision()Gets current value of property collision.
getMyPosition()Gets current value of property myPosition.
getOffset()Gets current value of property offset.
getOpenDelay()Gets current value of property openDelay.
getOpenDuration()Gets current value of property openDuration.
getText()Gets current value of property text.
setAtPosition(sAtPosition)Sets a new value for property atPosition.
setCloseDelay(iCloseDelay)Sets a new value for property closeDelay.
setCloseDuration(iCloseDuration)Sets a new value for property closeDuration.
setCollision(sCollision)Sets a new value for property collision.
setMyPosition(sMyPosition)Sets a new value for property myPosition.
setOffset(sOffset)Sets a new value for property offset.
setOpenDelay(iOpenDelay)Sets a new value for property openDelay.
setOpenDuration(iOpenDuration)Sets a new value for property openDuration.
setText(sText)Sets a new value for property text.
Constructor Detail
new sap.ui.core.TooltipBase(sId?, mSettings?)
Constructor for a new TooltipBase.

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
  • Events
    • closed : 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
Event Detail
closed(oControlEvent)
This event is fired when the Tooltip has been closed
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.11.0
Method Detail
sap.ui.core.TooltipBase.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.core.TooltipBase 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.core.TooltipBase.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.core.TooltipBase.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachClosed(oData?, fnFunction, oListener?): sap.ui.core.TooltipBase
Attaches event handler fnFunction to the closed event of this sap.ui.core.TooltipBase.

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.core.TooltipBase itself.

This event is fired when the Tooltip has been closed

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

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.11.0
Returns:
{sap.ui.core.TooltipBase} Reference to this in order to allow method chaining
fireClosed(mArguments?): sap.ui.core.TooltipBase
Fires event closed to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.11.0
Returns:
{sap.ui.core.TooltipBase} Reference to this in order to allow method chaining
getAtPosition(): sap.ui.core.Dock
Gets current value of property atPosition.

Optional. At position defines which position on the target control to align the positioned tooltip.

Default value is begin bottom.

Returns:
{sap.ui.core.Dock} Value of property atPosition
getCloseDelay(): int
Gets current value of property closeDelay.

Closing delay of the tooltip in milliseconds

Default value is 100.

Returns:
{int} Value of property closeDelay
getCloseDuration(): int
Gets current value of property closeDuration.

Optional. Close Duration in milliseconds.

Default value is 200.

Returns:
{int} Value of property closeDuration
getCollision(): sap.ui.core.Collision
Gets current value of property collision.

Optional. Collision - when the positioned element overflows the window in some direction, move it to an alternative position.

Default value is flip.

Returns:
{sap.ui.core.Collision} Value of property collision
getMyPosition(): sap.ui.core.Dock
Gets current value of property myPosition.

Optional. My position defines which position on the extended tooltip being positioned to align with the target control.

Default value is begin top.

Returns:
{sap.ui.core.Dock} Value of property myPosition
getOffset(): string
Gets current value of property offset.

Optional. Offset adds these left-top values to the calculated position. Example: "10 3".

Default value is 10 3.

Returns:
{string} Value of property offset
getOpenDelay(): int
Gets current value of property openDelay.

Opening delay of the tooltip in milliseconds

Default value is 500.

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

Optional. Open Duration in milliseconds.

Default value is 200.

Returns:
{int} Value of property openDuration
getText(): string
Gets current value of property text.

The text that is shown in the tooltip that extends the TooltipBase class, for example in RichTooltip.

Default value is .

Returns:
{string} Value of property text
setAtPosition(sAtPosition): sap.ui.core.TooltipBase
Sets a new value for property atPosition.

Optional. At position defines which position on the target control to align the positioned tooltip.

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

Default value is begin bottom.

Parameters:
{sap.ui.core.Dock}sAtPosition New value for property atPosition
Returns:
{sap.ui.core.TooltipBase} Reference to this in order to allow method chaining
setCloseDelay(iCloseDelay): sap.ui.core.TooltipBase
Sets a new value for property closeDelay.

Closing delay of the tooltip in milliseconds

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

Default value is 100.

Parameters:
{int}iCloseDelay New value for property closeDelay
Returns:
{sap.ui.core.TooltipBase} Reference to this in order to allow method chaining
setCloseDuration(iCloseDuration): sap.ui.core.TooltipBase
Sets a new value for property closeDuration.

Optional. Close Duration in milliseconds.

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

Default value is 200.

Parameters:
{int}iCloseDuration New value for property closeDuration
Returns:
{sap.ui.core.TooltipBase} Reference to this in order to allow method chaining
setCollision(sCollision): sap.ui.core.TooltipBase
Sets a new value for property collision.

Optional. Collision - when the positioned element overflows the window in some direction, move it to an alternative position.

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

Default value is flip.

Parameters:
{sap.ui.core.Collision}sCollision New value for property collision
Returns:
{sap.ui.core.TooltipBase} Reference to this in order to allow method chaining
setMyPosition(sMyPosition): sap.ui.core.TooltipBase
Sets a new value for property myPosition.

Optional. My position defines which position on the extended tooltip being positioned to align with the target control.

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

Default value is begin top.

Parameters:
{sap.ui.core.Dock}sMyPosition New value for property myPosition
Returns:
{sap.ui.core.TooltipBase} Reference to this in order to allow method chaining
setOffset(sOffset): sap.ui.core.TooltipBase
Sets a new value for property offset.

Optional. Offset adds these left-top values to the calculated position. Example: "10 3".

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

Default value is 10 3.

Parameters:
{string}sOffset New value for property offset
Returns:
{sap.ui.core.TooltipBase} Reference to this in order to allow method chaining
setOpenDelay(iOpenDelay): sap.ui.core.TooltipBase
Sets a new value for property openDelay.

Opening delay of the tooltip in milliseconds

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

Default value is 500.

Parameters:
{int}iOpenDelay New value for property openDelay
Returns:
{sap.ui.core.TooltipBase} Reference to this in order to allow method chaining
setOpenDuration(iOpenDuration): sap.ui.core.TooltipBase
Sets a new value for property openDuration.

Optional. Open Duration in milliseconds.

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

Default value is 200.

Parameters:
{int}iOpenDuration New value for property openDuration
Returns:
{sap.ui.core.TooltipBase} Reference to this in order to allow method chaining
setText(sText): sap.ui.core.TooltipBase
Sets a new value for property text.

The text that is shown in the tooltip that extends the TooltipBase class, for example in RichTooltip.

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

Default value is .

Parameters:
{string}sText New value for property text
Returns:
{sap.ui.core.TooltipBase} Reference to this in order to allow method chaining