Java中的ToolTipManager [英] ToolTipManager in Java
问题描述
我正在实现MVC
,并且我希望在JLabel
上具有JToolTip
.我成功了,但是现在我想设置解雇和初始计时器.
I am implementing a MVC
and i want to have a JToolTip
on a JLabel
in my view. I succeeded but now i want to set the dismiss and initial timer.
我阅读了 JToolTip 的Javadoc.和 TollTipManager .我在ToolTipManager中找到了想要的东西,但是现在我不明白如何使用它.
I read the Javadoc for JToolTip and TollTipManager. I found what i want in ToolTipManager but now i can't understand how to use it.
JToolTip
尚未设置ToolTipManager
,在文档中他们说:
JToolTip
haven't setter for ToolTipManager
and in the doc they said :
管理系统中的所有工具提示.
Manages all the ToolTips in the system.
我不太了解如何使用ToolTipManager
.我的视野应该延伸ToolTipManager
还是完全误导我?
I don't really understand how i should use ToolTipManager
. Should my View extends ToolTipManager
or i misleading totally ?
推荐答案
ToolTipManager
是单例.要使用它,您需要调用静态的
ToolTipManager
is a singleton. To use it, you need to call a static sharedInstance
method that returns the instance of this class.
ToolTipManager
管理所有工具提示-这是一个全局配置类,对sharedInstance
所做的更改将应用于您应用程序中的每个工具提示.
ToolTipManager
manages all tooltips - it is a global configuration class, changes made to the sharedInstance
will be applied to every tooltip in your application.
这篇关于Java中的ToolTipManager的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!