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(mParameters?)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:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
Event Detail
closed(oControlEvent)
This event is fired when the Tooltip has been closed
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated 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.MetadataMetadata 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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.core.TooltipBase itself
Returns:
sap.ui.core.TooltipBaseReference to this in order to allow method chaining
Since:
1.11.0
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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.core.TooltipBaseReference to this in order to allow method chaining
Since:
1.11.0
fireClosed(mParameters?): sap.ui.core.TooltipBase
Fires event closed to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.core.TooltipBaseReference to this in order to allow method chaining
Since:
1.11.0
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.DockValue of property atPosition
getCloseDelay(): int

Gets current value of property closeDelay.

Closing delay of the tooltip in milliseconds

Default value is 100.

Returns:
intValue of property closeDelay
getCloseDuration(): int

Gets current value of property closeDuration.

Optional. Close Duration in milliseconds.

Default value is 200.

Returns:
intValue 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.CollisionValue 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.DockValue 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:
stringValue of property offset
getOpenDelay(): int

Gets current value of property openDelay.

Opening delay of the tooltip in milliseconds

Default value is 500.

Returns:
intValue of property openDelay
getOpenDuration(): int

Gets current value of property openDuration.

Optional. Open Duration in milliseconds.

Default value is 200.

Returns:
intValue 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:
stringValue 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.DocksAtPositionNew value for property atPosition
Returns:
sap.ui.core.TooltipBaseReference 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:
intiCloseDelayNew value for property closeDelay
Returns:
sap.ui.core.TooltipBaseReference 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:
intiCloseDurationNew value for property closeDuration
Returns:
sap.ui.core.TooltipBaseReference 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.CollisionsCollisionNew value for property collision
Returns:
sap.ui.core.TooltipBaseReference 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.DocksMyPositionNew value for property myPosition
Returns:
sap.ui.core.TooltipBaseReference 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:
stringsOffsetNew value for property offset
Returns:
sap.ui.core.TooltipBaseReference 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:
intiOpenDelayNew value for property openDelay
Returns:
sap.ui.core.TooltipBaseReference 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:
intiOpenDurationNew value for property openDuration
Returns:
sap.ui.core.TooltipBaseReference 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:
stringsTextNew value for property text
Returns:
sap.ui.core.TooltipBaseReference to this in order to allow method chaining