设置 Tooltip 的位置
@param inst
558140
function setPosition(inst) {
    var marginLeft;
    var marginTop;
    var position;

    // 触发的元素
    var targetProps = inst.$target[0].getBoundingClientRect();

    // 触发的元素和 Tooltip 之间的距离
    var targetMargin = (isDesktop() ? 14 : 24);

    // Tooltip 的宽度和高度
    var tooltipWidth = inst.$tooltip[0].offsetWidth;
    var tooltipHeight = inst.$tooltip[0].offsetHeight;

    // Tooltip 的方向
    position = inst.options.position;

    // 自动判断位置，加 2px，使 Tooltip 距离窗口边框至少有 2px 的间距
    if (['bottom', 'top', 'left', 'right'].indexOf(position) === -1) {
      if (
        targetProps.top + targetProps.height + targetMargin + tooltipHeight + 2 <
        $window.height()
      ) {
        position = 'bottom';
      } else if (targetMargin + tooltipHeight + 2 < targetProps.top) {
        position = 'top';
      } else if (targetMargin + tooltipWidth + 2 < targetProps.left) {
        position = 'left';
      } else if (
        targetProps.width + targetMargin + tooltipWidth + 2 <
        $window.width() - targetProps.left
      ) {
        position = 'right';
      } else {
        position = 'bottom';
      }
    }

    // 设置位置
    switch (position) {
      case 'bottom':
        marginLeft = -1 * (tooltipWidth / 2);
        marginTop = (targetProps.height / 2) + targetMargin;
        inst.$tooltip.transformOrigin('top center');
        break;
      case 'top':
        marginLeft = -1 * (tooltipWidth / 2);
        marginTop = -1 * (tooltipHeight + (targetProps.height / 2) + targetMargin);
        inst.$tooltip.transformOrigin('bottom center');
        break;
      case 'left':
        marginLeft = -1 * (tooltipWidth + (targetProps.width / 2) + targetMargin);
        marginTop = -1 * (tooltipHeight / 2);
        inst.$tooltip.transformOrigin('center right');
        break;
      case 'right':
        marginLeft = (targetProps.width / 2) + targetMargin;
        marginTop = -1 * (tooltipHeight / 2);
        inst.$tooltip.transformOrigin('center left');
        break;
    }

    var targetOffset = inst.$target.offset();
    inst.$tooltip.css({
      top: targetOffset.top + (targetProps.height / 2) + 'px',
      left: targetOffset.left + (targetProps.width / 2) + 'px',
      'margin-left': marginLeft + 'px',
      'margin-top': marginTop + 'px',
    });
  }
308049
function( inst ) {
            this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
            datepicker_instActive = inst; // for delegate hover events
            inst.dpDiv.empty().append( this._generateHTML( inst ) );
            this._attachHandlers( inst );

            var origyearshtml,
                numMonths = this._getNumberOfMonths( inst ),
                cols = numMonths[ 1 ],
                width = 17,
                activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );

            if ( activeCell.length > 0 ) {
                datepicker_handleMouseover.apply( activeCell.get( 0 ) );
            }

            inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" );
            if ( cols > 1 ) {
                inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" );
            }
            inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) +
            "Class" ]( "ui-datepicker-multi" );
            inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) +
            "Class" ]( "ui-datepicker-rtl" );

            if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
                inst.input.trigger( "focus" );
            }

            // Deffered render of the years select (to avoid flashes on Firefox)
            if ( inst.yearshtml ) {
                origyearshtml = inst.yearshtml;
                setTimeout( function() {

                    //assure that inst.yearshtml didn't change.
                    if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
                        inst.dpDiv.find( "select.ui-datepicker-year:first" ).replaceWith( inst.yearshtml );
                    }
                    origyearshtml = inst.yearshtml = null;
                }, 0 );
            }
        }
1275623
private void call(final Element e, final String arg) {
        JQuery.jQuery(e).tooltip(arg);
    }
579417
function(inst) {
		var onChange = this._get(inst, "onChangeMonthYear");
		if (onChange) {
			onChange.apply((inst.input ? inst.input[0] : null),
				[inst.selectedYear, inst.selectedMonth + 1, inst]);
		}
	}
473685
function(err){
			var indicator = lib.node(this._prefix+this._id);
			indicator.parentNode.removeChild(indicator);
			
			var image = document.createElement("img");
			image.src = require.toUrl("images/problem.gif");
			this._anchor.appendChild(image);
			
			new mTooltip.Tooltip({
				node: indicator,
				text:err
			});
		}
429340
function (e) {
		var pointer = this,
			chart = pointer.chart,
			series = chart.series,
			tooltip = chart.tooltip,
			point,
			points,
			hoverPoint = chart.hoverPoint,
			hoverSeries = chart.hoverSeries,
			i,
			j,
			distance = chart.chartWidth,
			index = pointer.getIndex(e),
			anchor;

		// shared tooltip
		if (tooltip && pointer.options.tooltip.shared && !(hoverSeries && hoverSeries.noSharedTooltip)) {
			points = [];

			// loop over all series and find the ones with points closest to the mouse
			i = series.length;
			for (j = 0; j < i; j++) {
				if (series[j].visible &&
						series[j].options.enableMouseTracking !== false &&
						!series[j].noSharedTooltip && series[j].tooltipPoints.length) {
					point = series[j].tooltipPoints[index];
					if (point && point.series) { // not a dummy point, #1544
						point._dist = mathAbs(index - point.clientX);
						distance = mathMin(distance, point._dist);
						points.push(point);
					}
				}
			}
			// remove furthest points
			i = points.length;
			while (i--) {
				if (points[i]._dist > distance) {
					points.splice(i, 1);
				}
			}
			// refresh the tooltip if necessary
			if (points.length && (points[0].clientX !== pointer.hoverX)) {
				tooltip.refresh(points, e);
				pointer.hoverX = points[0].clientX;
			}
		}

		// separate tooltip and general mouse events
		if (hoverSeries && hoverSeries.tracker) { // only use for line-type series with common tracker

			// get the point
			point = hoverSeries.tooltipPoints[index];

			// a new point is hovered, refresh the tooltip
			if (point && point !== hoverPoint) {

				// trigger the events
				point.onMouseOver(e);

			}
			
		} else if (tooltip && tooltip.followPointer && !tooltip.isHidden) {
			anchor = tooltip.getAnchor([{}], e);
			tooltip.updatePosition({ plotX: anchor[0], plotY: anchor[1] });
		}
	}
990295
private void defineToolTips(UIDefaults d) {
        String p = "ToolTip";
        d.put("seaGlassToolTipBorder", new Color(0x5b7ea4));
        d.put(p + ".contentMargins", new InsetsUIResource(4, 4, 4, 4));
        d.put(p + ".opaque", Boolean.FALSE);
        d.put(p + ".background", new ColorUIResource(0xd5, 0xe8, 0xf7));
        d.put(p + ".backgroundPainter", new ToolTipPainter(ToolTipPainter.Which.BORDER_ENABLED));
    }
1079720
function (inst) {
    if (inst.$dialog.hasClass('mdui-dialog-open')) {
      inst.state = 'opened';
      componentEvent('opened', 'dialog', inst, inst.$dialog);
    } else {
      inst.state = 'closed';
      componentEvent('closed', 'dialog', inst, inst.$dialog);

      inst.$dialog.hide();

      // 所有对话框都关闭，且当前没有打开的对话框时，解锁屏幕
      if (queue.queue(queueName).length === 0 && !currentInst && isLockScreen) {
        $.unlockScreen();
        isLockScreen = false;
      }

      $window.off('resize', $.throttle(function () {
        readjust();
      }, 100));

      if (inst.options.destroyOnClosed) {
        inst.destroy();
      }
    }
  }
182232
function Tooltip(el, options) {
      _classCallCheck(this, Tooltip);

      var _this35 = _possibleConstructorReturn(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).call(this, Tooltip, el, options));

      _this35.el.M_Tooltip = _this35;
      _this35.options = $.extend({}, Tooltip.defaults, options);

      _this35.isOpen = false;
      _this35.isHovered = false;
      _this35._appendTooltipEl();
      _this35._setupEventHandlers();
      return _this35;
    }
1337696
function (inst) {
            if (inst.input.val() == inst.lastVal) { return; }
            var defaultTime = this._get(inst, 'defaultTime');

            var timeToParse = defaultTime == 'now' ? this._getCurrentTimeRounded(inst) : defaultTime;
            if ((inst.inline == false) && (inst.input.val() != '')) { timeToParse = inst.input.val() }

            if (timeToParse instanceof Date) {
                inst.hours = timeToParse.getHours();
                inst.minutes = timeToParse.getMinutes();
            } else {
                var timeVal = inst.lastVal = timeToParse;
                if (timeToParse == '') {
                    inst.hours = -1;
                    inst.minutes = -1;
                } else {
                    var time = this.parseTime(inst, timeVal);
                    inst.hours = time.hours;
                    inst.minutes = time.minutes;
                }
            }


            $.timepicker._updateTimepicker(inst);
        }
1339969
function() {
			
			return {
				// if the tooltip should display an arrow that points to the origin
				arrow: true,
				// the distance in pixels between the tooltip and the origin
				distance: 6,
				// allows to easily change the position of the tooltip
				functionPosition: null,
				maxWidth: null,
				// used to accomodate the arrow of tooltip if there is one.
				// First to make sure that the arrow target is not too close
				// to the edge of the tooltip, so the arrow does not overflow
				// the tooltip. Secondly when we reposition the tooltip to
				// make sure that it's positioned in such a way that the arrow is
				// still pointing at the target (and not a few pixels beyond it).
				// It should be equal to or greater than half the width of
				// the arrow (by width we mean the size of the side which touches
				// the side of the tooltip).
				minIntersection: 16,
				minWidth: 0,
				// deprecated in 4.0.0. Listed for _optionsExtract to pick it up
				position: null,
				side: 'top',
				// set to false to position the tooltip relatively to the document rather
				// than the window when we open it
				viewportAware: true
			};
		}
1202317
protected String getToolTipText() {
        String tip = null;

        if (toolTipDialog != null) {
            tip = toolTipDialog.getText();
        }

        return tip;
    }
618601
function tooltip() {
    var _this6 = this;

    var options = this.options,
        tooltipBox = this.tooltipBox,
        imageData = this.imageData;


    if (!this.viewed || this.played || !options.tooltip) {
      return this;
    }

    tooltipBox.textContent = Math.round(imageData.ratio * 100) + '%';

    if (!this.tooltipping) {
      if (options.transition) {
        if (this.fading) {
          dispatchEvent(tooltipBox, EVENT_TRANSITION_END);
        }

        addClass(tooltipBox, CLASS_SHOW);
        addClass(tooltipBox, CLASS_FADE);
        addClass(tooltipBox, CLASS_TRANSITION);

        // Force reflow to enable CSS3 transition
        // eslint-disable-next-line
        tooltipBox.offsetWidth;
        addClass(tooltipBox, CLASS_IN);
      } else {
        addClass(tooltipBox, CLASS_SHOW);
      }
    } else {
      clearTimeout(this.tooltipping);
    }

    this.tooltipping = setTimeout(function () {
      if (options.transition) {
        addListener(tooltipBox, EVENT_TRANSITION_END, function () {
          removeClass(tooltipBox, CLASS_SHOW);
          removeClass(tooltipBox, CLASS_FADE);
          removeClass(tooltipBox, CLASS_TRANSITION);
          _this6.fading = false;
        }, {
          once: true
        });

        removeClass(tooltipBox, CLASS_IN);
        _this6.fading = true;
      } else {
        removeClass(tooltipBox, CLASS_SHOW);
      }

      _this6.tooltipping = false;
    }, 1000);

    return this;
  }
628494
def _display_tooltip(self, tooltip, top):
        
        QtWidgets.QToolTip.showText(self.mapToGlobal(QtCore.QPoint(
            self.sizeHint().width(), top)), tooltip, self)
1078953
@Override
    public void visitInsn(int inst) {
        processPendingExceptionHandlerEntry(-1);

        // List of opcodes taken from visitInsn documentation
        if (waitingForSuper) {
            // Visit the instruction
            super.visitInsn(inst);

            switch (inst) {
                case NOP:
                    break;
                // One slot constants
                case ACONST_NULL:
                case ICONST_M1:
                case ICONST_0:
                case ICONST_1:
                case ICONST_2:
                case ICONST_3:
                case ICONST_4:
                case ICONST_5:
                case FCONST_0:
                case FCONST_1:
                case FCONST_2:
                    push(OTHER, 1);
                    break;
                // Two slot constants
                case DCONST_0:
                case DCONST_1:
                case LCONST_0:
                case LCONST_1:
                    push(OTHER, 2);
                    break;
                // One slot array load
                case IALOAD:
                case FALOAD:
                case AALOAD:
                case BALOAD:
                case CALOAD:
                case SALOAD:
                    pop(1); // pop(2); push(OTHER, 1);
                    break;
                // Two slot array load
                case DALOAD:
                case LALOAD:
                    // pop(2); push(OTHER, 2);
                    break;
                // One slot array store
                case IASTORE:
                case FASTORE:
                case AASTORE:
                case BASTORE:
                case CASTORE:
                case SASTORE:
                    pop(3);
                    break;
                // Two slot array store
                case DASTORE:
                case LASTORE:
                    pop(4);
                    break;
                // Basic pop instructions
                case POP:
                    pop(1);
                    break;
                case POP2:
                    pop(2);
                    break;
                // Stack manipulation instructions
                case DUP: {
                    Object top = currentStack.get(currentStack.size() - 1);
                    push(top, 1);
                    break;
                }
                case DUP_X1: {
                    Object top = currentStack.get(currentStack.size() - 1);
                    int addPosition = currentStack.size() - 2;
                    currentStack.add(addPosition, top);
                    break;
                }
                case DUP_X2: {
                    Object top = currentStack.get(currentStack.size() - 1);
                    int addPosition = currentStack.size() - 3;
                    currentStack.add(addPosition, top);
                    break;
                }
                case DUP2: {
                    int position = currentStack.size() - 2;
                    currentStack.add(currentStack.get(position));
                    currentStack.add(currentStack.get(position + 1));
                    break;
                }
                case DUP2_X1: {
                    int addPosition = currentStack.size() - 3;
                    currentStack.add(addPosition, currentStack.get(currentStack.size() - 1));
                    currentStack.add(addPosition, currentStack.get(currentStack.size() - 2));
                    break;
                }
                case DUP2_X2: {
                    int addPosition = currentStack.size() - 4;
                    currentStack.add(addPosition, currentStack.get(currentStack.size() - 1));
                    currentStack.add(addPosition, currentStack.get(currentStack.size() - 2));
                    break;
                }
                case SWAP: {
                    Object o = currentStack.remove(currentStack.size() - 2);
                    currentStack.add(o);
                    break;
                }
                // One slot arithmetic and logical instructions
                case IADD:
                case FADD:
                case ISUB:
                case FSUB:
                case IMUL:
                case FMUL:
                case IDIV:
                case FDIV:
                case IREM:
                case FREM:
                case INEG:
                case FNEG:
                case ISHL:
                case ISHR:
                case IUSHR:
                case IAND:
                case IOR:
                case IXOR:
                    pop(1);
                    break;
                // Two slot arithmetic and logical instructions
                case DADD:
                case LADD:
                case DSUB:
                case LSUB:
                case DMUL:
                case LMUL:
                case DDIV:
                case LDIV:
                case DREM:
                case LREM:
                case DNEG:
                case LNEG:
                case LSHL:
                case LSHR:
                case LUSHR:
                case LAND:
                case LOR:
                case LXOR:
                    pop(2);
                    break;
                // One slot to two slot conversions
                case I2D:
                case I2L:
                case F2D:
                case F2L:
                    push(OTHER, 1);
                    break;
                // One slot to one slot conversions
                case F2I:
                case I2B:
                case I2C:
                case I2F:
                case I2S:
                    break;
                // Two slot to one slot conversions
                case D2F:
                case D2I:
                case L2I:
                case L2F:
                    pop(1);
                    break;
                // Two slot to two slot conversions
                case L2D:
                case D2L:
                    break;
                // Two slot compare
                case DCMPL:
                case DCMPG:
                case LCMP:
                    pop(3);
                    break;
                // One slot compare
                case FCMPL:
                case FCMPG:
                    pop(1);
                    break;
                // One slot return
                case IRETURN:
                case FRETURN:
                case ARETURN:
                    pop(1);
                    break;
                // Two slot return
                case DRETURN:
                case LRETURN:
                    pop(2);
                    break;
                // Zero slot return
                case RETURN:
                    break;
                // Get array length
                case ARRAYLENGTH:
                    break;
                // Throw an exception
                case ATHROW:
                    pop(1);
                    break;
                // Enter or leave a monitor
                case MONITORENTER:
                case MONITOREXIT:
                    pop(1);
                    break;
                default:
            }
        } else {
            // Handle return and throw instructions
            switch (inst) {
                case RETURN:
                case ARETURN:
                case DRETURN:
                case FRETURN:
                case IRETURN:
                case LRETURN:
                    if (onMethodReturn()) {
                        visitFrameAfterMethodReturnCallback();
                    }
                    break;
                case ATHROW:
                    if (onThrowInstruction()) {
                        visitFrameAfterOnThrowCallback();
                    }
                    break;
            }
            super.visitInsn(inst);
        }
    }
34493
function(inst) {
		var self = this;
		self.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
		var borders = $.datepicker._getBorders(inst.dpDiv);
		instActive = inst; // for delegate hover events
		inst.dpDiv.empty().append(this._generateHTML(inst));
		var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
		if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
			cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
		}
		inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();
		var numMonths = this._getNumberOfMonths(inst);
		var cols = numMonths[1];
		var width = 17;
		inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
		if (cols > 1)
			inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
		inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
			'Class']('ui-datepicker-multi');
		inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
			'Class']('ui-datepicker-rtl');
		if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
				// #6694 - don't focus the input if it's already focused
				// this breaks the change event in IE
				inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
			inst.input.focus();
		// deffered render of the years select (to avoid flashes on Firefox) 
		if( inst.yearshtml ){
			var origyearshtml = inst.yearshtml;
			setTimeout(function(){
				//assure that inst.yearshtml didn't change.
				if( origyearshtml === inst.yearshtml && inst.yearshtml ){
					inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
				}
				origyearshtml = inst.yearshtml = null;
			}, 0);
		}
	}
1179913
def render_tooltip(self, tooltip, obj):
        
        if self.tooltip_attr:
            val = getattr(obj, self.tooltip_attr)
        elif self.tooltip_value:
            val = self.tooltip_value
        else:
            return False
        setter = getattr(tooltip, TOOLTIP_SETTERS.get(self.tooltip_type))
        if self.tooltip_type in TOOLTIP_SIZED_TYPES:
            setter(val, self.tooltip_image_size)
        else:
            setter(val)
        return True