From 56940f1ccb9396d48bcc0c4f71184900bb8e65e7 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Thu, 7 Nov 2013 11:43:17 +0100 Subject: [PATCH] a way to increase dismiss delay --- .../platform-impl/src/com/intellij/ide/IdeTooltip.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/IdeTooltip.java b/platform/platform-impl/src/com/intellij/ide/IdeTooltip.java index ee0c9ceadac8..6c8a63f34414 100644 --- a/platform/platform-impl/src/com/intellij/ide/IdeTooltip.java +++ b/platform/platform-impl/src/com/intellij/ide/IdeTooltip.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import javax.swing.*; import java.awt.*; public class IdeTooltip extends ComparableObject.Impl { - + public static final Object TOOLTIP_DISMISS_DELAY_KEY = "TOOLTIP_DISMISS_DELAY_KEY"; private Component myComponent; private Point myPoint; @@ -134,6 +134,12 @@ public class IdeTooltip extends ComparableObject.Impl { } public int getDismissDelay() { + if (myComponent instanceof JComponent) { + final Object value = ((JComponent)myComponent).getClientProperty(TOOLTIP_DISMISS_DELAY_KEY); + if (value instanceof Integer) { + return ((Integer)value).intValue(); + } + } return Registry.intValue("ide.tooltip.dismissDelay"); }