Packagecom.yworks.canvas.input
Classpublic class TooltipTextProviders
InheritanceTooltipTextProviders Inheritance Object

Provides convenience implementations of tooltip text provider functions that can be used by a MouseHoverInputMode.

A tooltip text provider function returns a string or null for a given CanvasComponent and IPoint.

See also

com.yworks.canvas.input.MouseHoverInputMode.textProvider


Public Methods
 MethodDefined By
  
getGraphItemMapperTextProvider(itemClass:Class, mapperKey:String):Function
[static] Returns a text provider function that queries the mapperRegistry of the current IGraph for the given mapperKey if an item of the given itemClass is hit.
TooltipTextProviders
  
getUserTagTextProvider(itemClass:Class):Function
[static] Returns a text provider function that queries the tag of the ITagOwner of the hit item if an item of the given itemClass is hit.
TooltipTextProviders
Method Detail
getGraphItemMapperTextProvider()method
public static function getGraphItemMapperTextProvider(itemClass:Class, mapperKey:String):Function

Returns a text provider function that queries the mapperRegistry of the current IGraph for the given mapperKey if an item of the given itemClass is hit.

Parameters

itemClass:Class — The item class for which a tooltip should be shown
 
mapperKey:String — The key for the graph's mapperRegistry which maps to strings that should be used as tooltips.

Returns
Function — the text provider function
getUserTagTextProvider()method 
public static function getUserTagTextProvider(itemClass:Class):Function

Returns a text provider function that queries the tag of the ITagOwner of the hit item if an item of the given itemClass is hit.

Parameters

itemClass:Class — The item class for which a tooltip should be shown

Returns
Function — the text provider function

See also