/**
* Returns the default background color to use for tool tip windows.
*
* @return The default background color.
*/
public static Color getToolTipBackground() {
Color c = UIManager.getColor("ToolTip.background");
// Tooltip.background is wrong color on Nimbus (!)
boolean isNimbus = isNimbusLookAndFeel();
if (c==null || isNimbus) {
c = UIManager.getColor("info"); // Used by Nimbus (and others)
if (c==null || (isNimbus && isDerivedColor(c))) {
c = SystemColor.info; // System default
}
}
// Workaround for a bug (?) with Nimbus - calling JLabel.setBackground()
// with a ColorUIResource does nothing, must be a normal Color
if (c instanceof ColorUIResource) {
c = new Color(c.getRGB());
}
return c;
}
TipUtil.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:ESPlorer
作者:
评论列表
文章目录