Sets the tool-tip position.<p>

@param clientLeft the mouse pointer left position relative to the client window
@param clientTop the mouse pointer top  position relative to the client window
423695
private void setToolTipPosition(int clientLeft, int clientTop) {

        if (m_toolTip != null) {
            int height = m_toolTip.getOffsetHeight();
            int width = m_toolTip.getOffsetWidth();
            int windowHeight = Window.getClientHeight();
            int windowWidth = Window.getClientWidth();
            int scrollLeft = Window.getScrollLeft();
            int scrollTop = Window.getScrollTop();
            int left = clientLeft + scrollLeft + m_offsetLeft;
            if ((left + width) > (windowWidth + scrollLeft)) {
                left = (windowWidth + scrollLeft) - m_offsetLeft - width;
            }
            m_toolTip.getStyle().setLeft(left, Unit.PX);
            int top = clientTop + scrollTop + m_offsetTop;
            if (((top + height) > (windowHeight + scrollTop)) && ((height + m_offsetTop) < clientTop)) {
                top = (clientTop + scrollTop) - m_offsetTop - height;
            }
            m_toolTip.getStyle().setTop(top, Unit.PX);
        }
    }
1043110
function(hideDelay) {
			this._showByKB = undefined;
			
			if (this._timeout) {
				window.clearTimeout(this._timeout);
				this._timeout = null;
			}
			if (!this.isShowing()) { //$NON-NLS-0$
				return;
			}
			if (hideDelay === undefined) {
				hideDelay = this._hideDelay;
			}
			var self = this;
			this._timeout = window.setTimeout(function() {
				self._tip.classList.remove("tooltipShowing"); //$NON-NLS-0$
				self._tip.removeAttribute("style"); //$NON-NLS-0$
				if (self._afterHiding) {
					self._afterHiding();
				}
			}, hideDelay);
		}
708985
protected void updateTooltip()
	{
		if (slot.getItemStack().isEmpty())
		{
			tooltip = defaultTooltip;
			return;
		}

		List<String> lines = slot	.getItemStack()
									.getTooltip(Utils.getClientPlayer(),
												Minecraft.getMinecraft().gameSettings.advancedItemTooltips	? ITooltipFlag.TooltipFlags.ADVANCED
																											: ITooltipFlag.TooltipFlags.NORMAL);

		String text = lines.stream().collect(Collectors.joining(TextFormatting.RESET + "\n" + TextFormatting.GRAY));
		//		lines.set(0, slot.getItemStack().getRarity().rarityColor + lines.get(0));
		//		for (int i = 1; i < lines.size(); i++)
		//			lines.set(i, TextFormatting.GRAY + lines.get(i));

		tooltip = new UITooltip(slot.getItemStack().getRarity().rarityColor + text);
	}
824577
def update_tool_tip(self):
        

        self.roles[Qt.ToolTipRole] = self.__tool_tip_text.format(self.component.name,
                                                                 self.component.author,
                                                                 self.component.category,
                                                                 ", ".join(self.component.require),
                                                                 self.component.version,
                                                                 self.component.description)
        return True
554255
@Override
    public void setClientID(String clientID) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setClientID", clientID);

        // Make empty and null look the same.
        if ("".equals(clientID))
            clientID = null;
        jcaManagedConnectionFactory.setClientID(clientID);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setClientID");
    }
755246
function(t) { // check if this.tooltip is in viewport
      var r = t.getBoundingClientRect();
      return (
      r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth))
      }
479559
private void showTooltip() {
    Wrap tooltipLabel = new Wrap(toolTipWrapWidth);
    tooltipLabel.setForeground(getForeground());
    tooltipLabel.setFont(ToolTipButton.this.getFont());
    tooltipLabel.setText(text);

    JPanel panel = new JPanel();
    panel.setBackground(toolTipBackground);
    panel.setLayout(new BorderLayout());
    panel.add(tooltipLabel, BorderLayout.CENTER);


    if (extraComponent != null && extraComponentAnchor != null) {
      if (extraComponentAnchor.equals(ToolTipButtonAnchor.SOUTH)) {
        panel.add(extraComponent, BorderLayout.SOUTH);
      }
      else if (extraComponentAnchor.equals(ToolTipButtonAnchor.NORTH)) {
        panel.add(extraComponent, BorderLayout.NORTH);
      }
      else if (extraComponentAnchor.equals(ToolTipButtonAnchor.EAST)) {
        panel.add(extraComponent, BorderLayout.EAST);
      }
      else if (extraComponentAnchor.equals(ToolTipButtonAnchor.WEST)) {
        panel.add(extraComponent, BorderLayout.WEST);
      }
    }

    Border out = BorderFactory.createLineBorder(borderColor, borderThickness);
    Border in =
      BorderFactory.createEmptyBorder(margin.top, margin.left, margin.bottom,
        margin.right);
    Border border = BorderFactory.createCompoundBorder(out, in);
    panel.setBorder(border);

    popup = new JPopupMenu();
    popup.setBorder(BorderFactory.createEmptyBorder());
    popup.add(panel);

    popup.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseExited(MouseEvent e) {
        tryDisposeTooltip();
      }
    });

    popup.pack();
    popup.show(ToolTipButton.this, 0, getHeight());

    Point point = popup.getLocationOnScreen();
    Dimension dim = popup.getSize();
    popupBounds =
      new Rectangle2D.Double(point.getX(), point.getY(), dim.getWidth(),
        dim.getHeight());
  }
918308
public void updatePosition() {

        setPosition(CmsPositionBean.getBoundingClientRect(m_element));
        for (Widget widget : m_buttonPanel) {
            if (widget instanceof CmsInlineEntityWidget) {
                ((CmsInlineEntityWidget)widget).positionWidget();
            }
        }
    }
1168482
public void position() {

        // get the window client width
        int windowWidth = Window.getClientWidth();
        // get the min left position
        int minLeft = MIN_MARGIN;

        // get the max right position
        int maxRight = windowWidth - MIN_MARGIN;
        // get the middle button position
        CmsPositionBean buttonPosition = CmsPositionBean.generatePositionInfo(m_button.getElement());
        int buttonMiddle = (buttonPosition.getLeft() - Window.getScrollLeft()) + (buttonPosition.getWidth() / 2);
        // get the content width
        int contentWidth = getOffsetWidth();

        // the optimum left position is in the middle of the button minus the half content width
        // assume that the optimum fits into the space
        int contentLeft = buttonMiddle - (contentWidth / 2);

        if (minLeft > contentLeft) {
            // if the optimum left position of the popup is outside the min left position:
            // move the popup to the right (take the min left position as left)
            contentLeft = minLeft;
        } else if ((contentLeft + contentWidth) > maxRight) {
            // if the left position plus the content width is outside the max right position:
            // move the popup to the left (take the max right position minus the content width)
            contentLeft = maxRight - contentWidth;
        }

        // limit the right position if the popup is right outside the window
        if ((contentLeft + contentWidth + MIN_MARGIN) > windowWidth) {
            contentLeft = windowWidth - contentWidth - MIN_MARGIN;
        }

        // limit the left position if the popup is left outside the window
        if (contentLeft < MIN_MARGIN) {
            contentLeft = MIN_MARGIN;
        }

        int arrowSpace = 10;
        int arrowWidth = 40;
        int arrowHeight = 12;

        // the optimum position for the arrow is in the middle of the button
        int arrowLeft = buttonMiddle - contentLeft - (arrowWidth / 2);
        if ((arrowLeft + arrowWidth + arrowSpace) > contentWidth) {
            // limit the arrow position if the maximum is reached (content width 'minus x')
            arrowLeft = contentWidth - arrowWidth - arrowSpace;
        } else if ((arrowLeft - arrowSpace) < 0) {
            // limit the arrow position if the minimum is reached ('plus x')
            arrowLeft = arrowWidth + arrowSpace;
        }

        int arrowTop = -(arrowHeight - 2);
        String arrowClass = I_CmsLayoutBundle.INSTANCE.dialogCss().menuArrowTop();

        int contentTop = (((buttonPosition.getTop() + buttonPosition.getHeight()) - Window.getScrollTop())
            + arrowHeight) - 2;
        if (!m_isToolbarMode) {
            contentTop = (buttonPosition.getTop() + buttonPosition.getHeight() + arrowHeight) - 2;
            int contentHeight = getOffsetHeight();
            int windowHeight = Window.getClientHeight();

            if (((contentHeight + MIN_MARGIN) < windowHeight)
                && ((buttonPosition.getTop() - Window.getScrollTop()) > contentHeight)
                && (((contentHeight + MIN_MARGIN + contentTop) - Window.getScrollTop()) > windowHeight)) {
                // content fits into the window height,
                // there is enough space above the button
                // and there is to little space below the button
                // so show above
                contentTop = ((buttonPosition.getTop() - arrowHeight) + 2) - contentHeight;
                arrowTop = contentHeight - 1;
                arrowClass = I_CmsLayoutBundle.INSTANCE.dialogCss().menuArrowBottom();
            }
        } else {
            contentLeft = contentLeft - Window.getScrollLeft();
            setPositionFixed();
        }

        m_arrow.setClassName(arrowClass);
        m_arrow.getStyle().setLeft(arrowLeft, Unit.PX);
        m_arrow.getStyle().setTop(arrowTop, Unit.PX);

        showArrow(m_arrow);
        setPopupPosition(contentLeft + Window.getScrollLeft(), contentTop);
    }
1056847
@Override
  protected void toggleTooltip(Node reference) {
    if (reference instanceof Control) {
      this.toggleTooltip(reference, (Control) reference);
    }
  }
345947
private void applyAbsolutePosition(Element element, Coordinate position) {
		Dom.setStyleAttribute(element, "position", "absolute");
		Dom.setStyleAttribute(element, "left", (int) position.getX() + "px");
		Dom.setStyleAttribute(element, "top", (int) position.getY() + "px");
	}
948663
public void setPosition(CmsPositionBean position, CmsPositionBean buttonsPosition, Element containerElement) {

        m_position = position;
        Element parent = CmsDomUtil.getPositioningParent(getElement());
        Style style = getElement().getStyle();
        style.setRight(
            parent.getOffsetWidth()
                - ((buttonsPosition.getLeft() + buttonsPosition.getWidth()) - parent.getAbsoluteLeft()),
            Unit.PX);
        int top = buttonsPosition.getTop() - parent.getAbsoluteTop();
        if (top < 0) {
            top = 0;
        }
        style.setTop(top, Unit.PX);
    }
413107
def set_position(self, decl_pos):
        """"""
        if decl_pos["typehint"] == "LineSourcePosition":
            self.editor.set_cursor(decl_pos['line'], 0)
        else:  # OffsetSourcePosition
            point = decl_pos["offset"]
            row, col = self.editor.point2pos(point + 1)
            self.editor.set_cursor(row, col)
264590
function Tooltip(options) {
		var currentSeries,
			borderWidth = options.borderWidth,
			crosshairsOptions = options.crosshairs,
			crosshairs = [],
			style = options.style,
			shared = options.shared,
			padding = pInt(style.padding),
			boxOffLeft = borderWidth + padding, // off left/top position as IE can't
				//properly handle negative positioned shapes
			tooltipIsHidden = true,
			boxWidth,
			boxHeight,
			currentX = 0,
			currentY = 0;

		// remove padding CSS and apply padding on box instead
		style.padding = 0;

		// create the elements
		var group = renderer.g('tooltip')
			.attr({	zIndex: 8 })
			.add(),

			box = renderer.rect(boxOffLeft, boxOffLeft, 0, 0, options.borderRadius, borderWidth)
				.attr({
					fill: options.backgroundColor,
					'stroke-width': borderWidth
				})
				.add(group)
				.shadow(options.shadow),
			label = renderer.text('', padding + boxOffLeft, pInt(style.fontSize) + padding + boxOffLeft, options.useHTML)
				.attr({ zIndex: 1 })
				.css(style)
				.add(group);

		group.hide();

		/**
		 * Destroy the tooltip and its elements.
		 */
		function destroy() {
			each(crosshairs, function (crosshair) {
				if (crosshair) {
					crosshair.destroy();
				}
			});

			// Destroy and clear local variables
			each([box, label, group], function (obj) {
				if (obj) {
					obj.destroy();
				}
			});
			box = label = group = null;
		}

		/**
		 * In case no user defined formatter is given, this will be used
		 */
		function defaultFormatter() {
			var pThis = this,
				items = pThis.points || splat(pThis),
				xAxis = items[0].series.xAxis,
				x = pThis.x,
				isDateTime = xAxis && xAxis.options.type === 'datetime',
				useHeader = isString(x) || isDateTime,
				s;

			// build the header
			s = useHeader ?
				['<span style="font-size: 10px">' +
				(isDateTime ? dateFormat('%A, %b %e, %Y', x) :  x) +
				'</span>'] : [];

			// build the values
			each(items, function (item) {
				s.push(item.point.tooltipFormatter(useHeader));
			});
			return s.join('<br/>');
		}

		/**
		 * Provide a soft movement for the tooltip
		 *
		 * @param {Number} finalX
		 * @param {Number} finalY
		 */
		function move(finalX, finalY) {
		    
		    // PATCH here by Simon Fishel
            //
            // - currentX = tooltipIsHidden ? finalX : (2 * currentX + finalX) / 3;
            // - currentY = tooltipIsHidden ? finalY : (currentY + finalY) / 2;
            // + currentX = finalX;
            // + currentY = finalY;
            //
            // disable tooltip animation, instead just jump directly to the final location
            
            currentX = finalX;
            currentY = finalY;

			group.translate(currentX, currentY);


			// run on next tick of the mouse tracker
			if (mathAbs(finalX - currentX) > 1 || mathAbs(finalY - currentY) > 1) {
				tooltipTick = function () {
					move(finalX, finalY);
				};
			} else {
				tooltipTick = null;
			}
		}

		/**
		 * Hide the tooltip
		 */
		function hide() {
			if (!tooltipIsHidden) {
				var hoverPoints = chart.hoverPoints;

				group.hide();

				each(crosshairs, function (crosshair) {
					if (crosshair) {
						crosshair.hide();
					}
				});

				// hide previous hoverPoints and set new
				if (hoverPoints) {
					each(hoverPoints, function (point) {
						point.setState();
					});
				}
				chart.hoverPoints = null;


				tooltipIsHidden = true;
			}

		}

		/**
		 * Refresh the tooltip's text and position.
		 * @param {Object} point
		 *
		 */
		function refresh(point) {
			var x,
				y,
				show,
				bBox,
				plotX,
				plotY = 0,
				textConfig = {},
				text,
				pointConfig = [],
				tooltipPos = point.tooltipPos,
				formatter = options.formatter || defaultFormatter,
				hoverPoints = chart.hoverPoints,
				placedTooltipPoint;

			// shared tooltip, array is sent over
			if (shared) {

				// hide previous hoverPoints and set new
				if (hoverPoints) {
					each(hoverPoints, function (point) {
						point.setState();
					});
				}
				chart.hoverPoints = point;

				each(point, function (item) {
					/*var series = item.series,
						hoverPoint = series.hoverPoint;
					if (hoverPoint) {
						hoverPoint.setState();
					}
					series.hoverPoint = item;*/
					item.setState(HOVER_STATE);
					plotY += item.plotY; // for average

					pointConfig.push(item.getLabelConfig());
				});

				plotX = point[0].plotX;
				plotY = mathRound(plotY) / point.length; // mathRound because Opera 10 has problems here

				textConfig = {
					x: point[0].category
				};
				textConfig.points = pointConfig;
				point = point[0];

			// single point tooltip
			} else {
				textConfig = point.getLabelConfig();
			}
			text = formatter.call(textConfig);

			// register the current series
			currentSeries = point.series;

			// get the reference point coordinates (pie charts use tooltipPos)
			plotX = shared ? plotX : point.plotX;
			plotY = shared ? plotY : point.plotY;
			
			// PATCH here by Simon Fishel
            //
            // + if(point.series.chart.options.chart.type in {column: true, bar: true}) {
            // +     plotY = Math.max(plotY, 0);
            // + }
            //
            // adjust the y position so the tooltip will show up even if the value is off the chart
            // for column/bar charts
            
            if(point.series.chart.options.chart.type in {column: true, bar: true}) {
                plotY = Math.max(plotY, 0);
            }
            
            // PATCH here by Simon Fishel
            //
            // + if(point.series.chart.options.chart.type === 'column') {
            // +     plotX = point.barX;
            // + }
            //
            // adjustment to the tooltip horizontal position for column charts
            
            if(point.series.chart.options.chart.type === 'column') {
                plotX = point.barX;
            }
			
			x = mathRound(tooltipPos ? tooltipPos[0] : (inverted ? plotWidth - plotY : plotX));
			y = mathRound(tooltipPos ? tooltipPos[1] : (inverted ? plotHeight - plotX : plotY));


			// hide tooltip if the point falls outside the plot
			show = shared || !point.series.isCartesian || isInsidePlot(x, y);

			// update the inner HTML
			if (text === false || !show) {
				hide();
			} else {

				// show it
				if (tooltipIsHidden) {
					group.show();
					tooltipIsHidden = false;
				}

				// update text
				label.attr({
					text: text
				});

				// get the bounding box
				bBox = label.getBBox();
				boxWidth = bBox.width + 2 * padding;
				boxHeight = bBox.height + 2 * padding;

				// set the size of the box
				box.attr({
					width: boxWidth,
					height: boxHeight,
					stroke: options.borderColor || point.color || currentSeries.color || '#606060'
				});

				placedTooltipPoint = placeBox(boxWidth, boxHeight, plotLeft, plotTop, plotWidth, plotHeight, {x: x, y: y});

				// do the move
				move(mathRound(placedTooltipPoint.x - boxOffLeft), mathRound(placedTooltipPoint.y - boxOffLeft));
			}


			// crosshairs
			if (crosshairsOptions) {
				crosshairsOptions = splat(crosshairsOptions); // [x, y]

				var path,
					i = crosshairsOptions.length,
					attribs,
					axis;

				while (i--) {
					axis = point.series[i ? 'yAxis' : 'xAxis'];
					if (crosshairsOptions[i] && axis) {
						path = axis
							.getPlotLinePath(point[i ? 'y' : 'x'], 1);
						if (crosshairs[i]) {
							crosshairs[i].attr({ d: path, visibility: VISIBLE });

						} else {
							attribs = {
								'stroke-width': crosshairsOptions[i].width || 1,
								stroke: crosshairsOptions[i].color || '#C0C0C0',
								zIndex: 2
							};
							if (crosshairsOptions[i].dashStyle) {
								attribs.dashstyle = crosshairsOptions[i].dashStyle;
							}
							crosshairs[i] = renderer.path(path)
								.attr(attribs)
								.add();
						}
					}
				}
			}
		}



		// public members
		return {
			shared: shared,
			refresh: refresh,
			hide: hide,
			destroy: destroy
		};
	}
597633
public void setStop(final double STOP) {
        if (null == stop) {
            _stop = STOP;
            fireSectionEvent(UPDATE_EVENT);
        } else {
            stop.set(STOP);
        }
    }
1181698
public void setCurrentTab(int position) {
        if(mSelectedPosition != position){
            View v = mLayoutManager.findViewByPosition(mSelectedPosition);
            if(v != null)
                ((Checkable)v).setChecked(false);
        }

        mSelectedPosition = position;
        View v = mLayoutManager.findViewByPosition(mSelectedPosition);
        if(v != null)
            ((Checkable)v).setChecked(true);

        animateToTab(position);
    }
645944
function tip(title, content, actions, type) {
  if (curTip) {
    curTip.close(() => {
      setTimeout(() => {
        AppContainer.remove(topViewDialogKey);
        setTimeout(() => {
          creatTip(title, content, actions);
        }, 0);
      }, 200);
    });
  } else {
    creatTip(title, content, actions, type);
  }
}