APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.scenes.scene2d.ui

public Class TooltipManager

extends Object
Class Inheritance
Static Imports
com.badlogic.gdx.math.Interpolation.*, com.badlogic.gdx.scenes.scene2d.actions.Actions.*

Keeps track of an application's tooltips.
Author
Nathan Sweet

Field Summary

Modifier and TypeField and Description
public boolean
animations

If false, tooltips will be shown without animations.

public float
edgeDistance

The distance from the tooltip actor position to the edge of the screen where the actor will be shown on the other side of the mouse cursor.

public boolean
enabled

If false, tooltips will not be shown.

private static Files
public float
initialTime

Seconds from when an actor is hovered to when the tooltip is shown.

private static TooltipManager
public float
maxWidth

The maximum width of a TextTooltip.

public float
offsetX

The distance from the mouse position to offset the tooltip actor.

public float
offsetY

The distance from the mouse position to offset the tooltip actor.

pack-priv final Timer.Task
public float
resetTime

Seconds to use subsequentTime.

pack-priv final Array<Tooltip<T extends Actor>>
pack-priv final Timer.Task
pack-priv Tooltip<T extends Actor>
public float
subsequentTime

Once a tooltip is shown, this is used instead of initialTime.

pack-priv float

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
enter(Tooltip<T extends Actor> tooltip)

public static TooltipManager
public void
hide(Tooltip<T extends Actor> tooltip)

protected void
hideAction(Tooltip<T extends Actor> tooltip)

Called when tooltip is hidden.

public void
public void
instant()

Shows all tooltips on hover without a delay for resetTime seconds.

protected void
showAction(Tooltip<T extends Actor> tooltip)

Called when tooltip is shown.

public void
touchDown(Tooltip<T extends Actor> tooltip)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

animationsback to summary
public boolean animations

If false, tooltips will be shown without animations. Default is true.

edgeDistanceback to summary
public float edgeDistance

The distance from the tooltip actor position to the edge of the screen where the actor will be shown on the other side of the mouse cursor. Default is 7.

enabledback to summary
public boolean enabled

If false, tooltips will not be shown. Default is true.

filesback to summary
private static Files files
initialTimeback to summary
public float initialTime

Seconds from when an actor is hovered to when the tooltip is shown. Default is 2. Call hideAll() after changing to reset internal state.

instanceback to summary
private static TooltipManager instance
maxWidthback to summary
public float maxWidth

The maximum width of a TextTooltip. The label will wrap if needed. Default is Integer.MAX_VALUE.

offsetXback to summary
public float offsetX

The distance from the mouse position to offset the tooltip actor. Default is 15,19.

offsetYback to summary
public float offsetY

The distance from the mouse position to offset the tooltip actor. Default is 15,19.

resetTaskback to summary
pack-priv final Timer.Task resetTask
resetTimeback to summary
public float resetTime

Seconds to use subsequentTime. Default is 1.5.

shownback to summary
pack-priv final Array<Tooltip<T extends Actor>> shown
showTaskback to summary
pack-priv final Timer.Task showTask
showTooltipback to summary
pack-priv Tooltip<T extends Actor> showTooltip
subsequentTimeback to summary
public float subsequentTime

Once a tooltip is shown, this is used instead of initialTime. Default is 0.

timeback to summary
pack-priv float time

Constructor Detail

TooltipManagerback to summary
public TooltipManager()

Method Detail

enterback to summary
public void enter(Tooltip<T extends Actor> tooltip)
getInstanceback to summary
public static TooltipManager getInstance()
hideback to summary
public void hide(Tooltip<T extends Actor> tooltip)
hideActionback to summary
protected void hideAction(Tooltip<T extends Actor> tooltip)

Called when tooltip is hidden. Default implementation sets actions to animate hiding and to remove the actor from the stage when the actions are complete. A subclass must at least remove the actor.

hideAllback to summary
public void hideAll()
instantback to summary
public void instant()

Shows all tooltips on hover without a delay for resetTime seconds.

showActionback to summary
protected void showAction(Tooltip<T extends Actor> tooltip)

Called when tooltip is shown. Default implementation sets actions to animate showing.

touchDownback to summary
public void touchDown(Tooltip<T extends Actor> tooltip)