void (final JComponent c, final MouseEvent me, final boolean toCenter, final int shift, final int posChangeX, final int posChangeY, final boolean now) { IdeTooltip tooltip = getCustomTooltip(c); if (tooltip == null) { if (helpTooltipManager != null) { myCurrentComponent = c; myHideHelpTooltip = true; helpTooltipManager.showTooltip(c, me); return; } String aText = String.valueOf(c.getToolTipText(me)); tooltip = new IdeTooltip(c, me.getPoint(), null, /*new Object()*/c, aText) { @Override protected boolean beforeShow() { myCurrentEvent = me; if (!c.isShowing()) return false; String text = c.getToolTipText(myCurrentEvent); if (text == null || text.trim().isEmpty()) return false; Rectangle visibleRect = c.getParent() instanceof JViewport ? ((JViewport)c.getParent()).getViewRect() : IdeMouseEventDispatcher.isDiagramViewComponent(c) ? c.getBounds() : c.getVisibleRect(); if (!visibleRect.contains(getPoint())) return false; JLayeredPane layeredPane = ComponentUtil.getParentOfType((Class<? extends JLayeredPane>)JLayeredPane.class, (Component)c); final JEditorPane pane = initPane(text, new HintHint(me).setAwtTooltip(true), layeredPane); final Wrapper wrapper = new Wrapper(pane); setTipComponent(wrapper); return true; } }.setToCenter(toCenter).setCalloutShift(shift).setPositionChangeShift(posChangeX, posChangeY).setLayer(Balloon.Layer.top); } else if (currentTooltip == tooltip) { return;//Don't re-show the same custom tooltip on every mouse movement } show(tooltip, now); }