javafx.scene.control.Tooltip#uninstall ( )源码实例Demo

下面列出了javafx.scene.control.Tooltip#uninstall ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: openstock   文件: ChartCanvas.java
/**
 * Sets the tooltip text, with the (x, y) location being used for the
 * anchor.  If the text is {@code null}, no tooltip will be displayed.
 * This method is intended for calling by the {@link TooltipHandlerFX}
 * class, you won't normally call it directly.
 * 
 * @param text  the text ({@code null} permitted).
 * @param x  the x-coordinate of the mouse pointer.
 * @param y  the y-coordinate of the mouse pointer.
 */
public void setTooltip(String text, double x, double y) {
    if (text != null) {
        if (this.tooltip == null) {
            this.tooltip = new Tooltip(text);
            Tooltip.install(this, this.tooltip);
        } else {
            this.tooltip.setText(text);           
            this.tooltip.setAnchorX(x);
            this.tooltip.setAnchorY(y);
        }                   
    } else {
        Tooltip.uninstall(this, this.tooltip);
        this.tooltip = null;
    }
}
 
源代码2 项目: pmd-designer   文件: DesignerUtil.java
public static <T> Callback<ListView<T>, ListCell<T>> simpleListCellFactory(Function<T, String> converter, Function<T, String> toolTipMaker) {
    return collection -> new ListCell<T>() {
        @Override
        protected void updateItem(T item, boolean empty) {
            super.updateItem(item, empty);

            if (empty || item == null) {
                setText(null);
                setGraphic(null);
                Tooltip.uninstall(this, getTooltip());
            } else {
                setText(converter.apply(item));
                Tooltip.install(this, new Tooltip(toolTipMaker.apply(item)));
            }
        }
    };
}
 
源代码3 项目: pmd-designer   文件: AttributeNameTableCell.java
private void updateAttr(@Nullable Attribute attr) {
    if (tooltip != null) {
        Tooltip.uninstall(this, tooltip);
        getStyleClass().remove(DEPRECATED_CSS_CLASS);
        tooltip = null;
    }

    if (attr == null) {
        return;
    }

    String replacement = attr.replacementIfDeprecated();
    if (replacement != null) {
        String txt = "This attribute is deprecated";
        if (!replacement.isEmpty()) {
            txt += ", please use " + replacement + " instead";
        }
        Tooltip t = new Tooltip(txt);
        tooltip = t;
        getStyleClass().add(DEPRECATED_CSS_CLASS);
        Tooltip.install(this, t);
    }
}
 
源代码4 项目: buffer_bci   文件: ChartCanvas.java
/**
 * Sets the tooltip text, with the (x, y) location being used for the
 * anchor.  If the text is {@code null}, no tooltip will be displayed.
 * This method is intended for calling by the {@link TooltipHandlerFX}
 * class, you won't normally call it directly.
 * 
 * @param text  the text ({@code null} permitted).
 * @param x  the x-coordinate of the mouse pointer.
 * @param y  the y-coordinate of the mouse pointer.
 */
public void setTooltip(String text, double x, double y) {
    if (text != null) {
        if (this.tooltip == null) {
            this.tooltip = new Tooltip(text);
            Tooltip.install(this, this.tooltip);
        } else {
            this.tooltip.setText(text);           
            this.tooltip.setAnchorX(x);
            this.tooltip.setAnchorY(y);
        }                   
    } else {
        Tooltip.uninstall(this, this.tooltip);
        this.tooltip = null;
    }
}
 
源代码5 项目: jfreechart-fx   文件: ChartCanvas.java
/**
 * Sets the tooltip text, with the (x, y) location being used for the
 * anchor.  If the text is {@code null}, no tooltip will be displayed.
 * This method is intended for calling by the {@link TooltipHandlerFX}
 * class, you won't normally call it directly.
 * 
 * @param text  the text ({@code null} permitted).
 * @param x  the x-coordinate of the mouse pointer.
 * @param y  the y-coordinate of the mouse pointer.
 */
public void setTooltip(String text, double x, double y) {
    if (text != null) {
        if (this.tooltip == null) {
            this.tooltip = new Tooltip(text);
            Tooltip.install(this, this.tooltip);
        } else {
            this.tooltip.setText(text);           
            this.tooltip.setAnchorX(x);
            this.tooltip.setAnchorY(y);
        }                   
    } else {
        Tooltip.uninstall(this, this.tooltip);
        this.tooltip = null;
    }
}
 
源代码6 项目: TAcharting   文件: TaChartCanvas.java
/**
 * Sets the tooltip text, with the (x, y) location being used for the
 * anchor.  If the text is {@code null}, no tooltip will be displayed.
 * This method is intended for calling by the {@link TooltipHandlerFX}
 * class, you won't normally call it directly.
 *
 * @param text  the text ({@code null} permitted).
 * @param x  the x-coordinate colorOf the mouse pointer.
 * @param y  the y-coordinate colorOf the mouse pointer.
 */
public void setTooltip(String text, double x, double y) {
    if (text != null) {
        if (this.tooltip == null) {
            this.tooltip = new Tooltip(text);
            Tooltip.install(this, this.tooltip);
        } else {
            this.tooltip.setText(text);
            this.tooltip.setAnchorX(x);
            this.tooltip.setAnchorY(y);
        }
    } else {
        Tooltip.uninstall(this, this.tooltip);
        this.tooltip = null;
    }
}
 
源代码7 项目: ccu-historian   文件: ChartCanvas.java
/**
 * Sets the tooltip text, with the (x, y) location being used for the
 * anchor.  If the text is {@code null}, no tooltip will be displayed.
 * This method is intended for calling by the {@link TooltipHandlerFX}
 * class, you won't normally call it directly.
 * 
 * @param text  the text ({@code null} permitted).
 * @param x  the x-coordinate of the mouse pointer.
 * @param y  the y-coordinate of the mouse pointer.
 */
public void setTooltip(String text, double x, double y) {
    if (text != null) {
        if (this.tooltip == null) {
            this.tooltip = new Tooltip(text);
            Tooltip.install(this, this.tooltip);
        } else {
            this.tooltip.setText(text);           
            this.tooltip.setAnchorX(x);
            this.tooltip.setAnchorY(y);
        }                   
    } else {
        Tooltip.uninstall(this, this.tooltip);
        this.tooltip = null;
    }
}
 
源代码8 项目: SIMVA-SoS   文件: ChartCanvas.java
/**
 * Sets the tooltip text, with the (x, y) location being used for the
 * anchor.  If the text is {@code null}, no tooltip will be displayed.
 * This method is intended for calling by the {@link TooltipHandlerFX}
 * class, you won't normally call it directly.
 * 
 * @param text  the text ({@code null} permitted).
 * @param x  the x-coordinate of the mouse pointer.
 * @param y  the y-coordinate of the mouse pointer.
 */
public void setTooltip(String text, double x, double y) {
    if (text != null) {
        if (this.tooltip == null) {
            this.tooltip = new Tooltip(text);
            Tooltip.install(this, this.tooltip);
        } else {
            this.tooltip.setText(text);           
            this.tooltip.setAnchorX(x);
            this.tooltip.setAnchorY(y);
        }                   
    } else {
        Tooltip.uninstall(this, this.tooltip);
        this.tooltip = null;
    }
}
 
源代码9 项目: metastone   文件: HandCard.java
@Override
public void setCard(GameContext context, Card card, Player player) {
	super.setCard(context, card, player);
	if (tooltipContent == null) {
		tooltip = new Tooltip();
		tooltipContent = new CardTooltip();
		tooltipContent.setCard(context, card, player);
		tooltip.setGraphic(tooltipContent);
		Tooltip.install(this, tooltip);
	} else {
		tooltipContent.setCard(context, card, player);
	}

	hideCard(player.hideCards());

	if (player.hideCards()) {
		Tooltip.uninstall(this, tooltip);
		tooltipContent = null;
		tooltip = null;
	}
}
 
源代码10 项目: ECG-Viewer   文件: ChartCanvas.java
/**
 * Sets the tooltip text, with the (x, y) location being used for the
 * anchor.  If the text is {@code null}, no tooltip will be displayed.
 * This method is intended for calling by the {@link TooltipHandlerFX}
 * class, you won't normally call it directly.
 * 
 * @param text  the text ({@code null} permitted).
 * @param x  the x-coordinate of the mouse pointer.
 * @param y  the y-coordinate of the mouse pointer.
 */
public void setTooltip(String text, double x, double y) {
    if (text != null) {
        if (this.tooltip == null) {
            this.tooltip = new Tooltip(text);
            Tooltip.install(this, this.tooltip);
        } else {
            this.tooltip.setText(text);           
            this.tooltip.setAnchorX(x);
            this.tooltip.setAnchorY(y);
        }                   
    } else {
        Tooltip.uninstall(this, this.tooltip);
        this.tooltip = null;
    }
}
 
源代码11 项目: latexdraw   文件: ViewText.java
private void updateImageText(final Tuple<Image, String> values) {
	if(currentCompilation != null && currentCompilation.isDone()) {
		currentCompilation = null;
	}

	compiledText.setUserData(values.b);

	// A text will be used to render the text shape.
	if(values.a == null) {
		compileTooltip.setText(SystemUtils.getInstance().getLatexErrorMessageFromLog(values.b));
		Tooltip.install(text, compileTooltip);
		setImageTextEnable(false);
		compiledText.setImage(null);
	}else {
		// An image will be used to render the text shape.
		compileTooltip.setText(null);
		Tooltip.uninstall(text, compileTooltip);
		compiledText.setImage(values.a);
		setImageTextEnable(true);
		updateTranslationCompiledText();

		getCanvasParent().ifPresent(canvas -> canvas.update());
	}
}
 
源代码12 项目: buffer_bci   文件: ChartCanvas.java
/**
 * Sets the tooltip text, with the (x, y) location being used for the
 * anchor.  If the text is {@code null}, no tooltip will be displayed.
 * This method is intended for calling by the {@link TooltipHandlerFX}
 * class, you won't normally call it directly.
 * 
 * @param text  the text ({@code null} permitted).
 * @param x  the x-coordinate of the mouse pointer.
 * @param y  the y-coordinate of the mouse pointer.
 */
public void setTooltip(String text, double x, double y) {
    if (text != null) {
        if (this.tooltip == null) {
            this.tooltip = new Tooltip(text);
            Tooltip.install(this, this.tooltip);
        } else {
            this.tooltip.setText(text);           
            this.tooltip.setAnchorX(x);
            this.tooltip.setAnchorY(y);
        }                   
    } else {
        Tooltip.uninstall(this, this.tooltip);
        this.tooltip = null;
    }
}
 
源代码13 项目: phoebus   文件: TooltipSupport.java
/** Detach tool tip.
 *  @param node Node that should have the tool tip removed.
 */
public static void detach(final Node node)
{
    if (disable_tooltips)
        return;
    final Tooltip tooltip = (Tooltip) node.getProperties().get(TOOLTIP_PROP_KEY);
    if (tooltip != null)
        Tooltip.uninstall(node, tooltip);
}
 
源代码14 项目: tilesfx   文件: InfoRegion.java
public void setTooltipText(final String TEXT) {
    if (null == TEXT || TEXT.isEmpty()) {
        Tooltip.uninstall(path, tooltip);
    } else {
        tooltip.setText(TEXT);
        Tooltip.install(path, tooltip);
    }
}
 
源代码15 项目: tilesfx   文件: LowerRightRegion.java
public void setTooltipText(final String TEXT) {
    if (null == TEXT || TEXT.isEmpty()) {
        Tooltip.uninstall(path, tooltip);
    } else {
        tooltip.setText(TEXT);
        Tooltip.install(path, tooltip);
    }
}
 
源代码16 项目: tilesfx   文件: NotifyRegion.java
public void setTooltipText(final String TEXT) {
    if (null == TEXT || TEXT.isEmpty()) {
        Tooltip.uninstall(path, tooltip);
    } else {
        tooltip.setText(TEXT);
        Tooltip.install(path, tooltip);
    }
}
 
源代码17 项目: Medusa   文件: ModernSkin.java
@Override protected void handleEvents(final String EVENT_TYPE) {
    super.handleEvents(EVENT_TYPE);
    if ("VISIBILITY".equals(EVENT_TYPE)) {
        Helper.enableNode(titleText, !gauge.getTitle().isEmpty());
        Helper.enableNode(subTitleText, !gauge.getSubTitle().isEmpty());
        Helper.enableNode(unitText, !gauge.getUnit().isEmpty());
        Helper.enableNode(valueText, gauge.isValueVisible());
        sectionsVisible = gauge.getSectionsVisible();
        redraw();
    } else if ("RECALC".equals(EVENT_TYPE)) {
        angleStep = ANGLE_RANGE / gauge.getRange();
        redraw();
        rotateNeedle(gauge.getCurrentValue());
    } else if ("INTERACTIVITY".equals(EVENT_TYPE)) {
        if (gauge.isInteractive()) {
            centerKnob.setOnMousePressed(mouseHandler);
            centerKnob.setOnMouseReleased(mouseHandler);
            buttonTooltip.setText(gauge.getButtonTooltipText());
            Tooltip.install(centerKnob, buttonTooltip);
        } else {
            centerKnob.removeEventHandler(MouseEvent.MOUSE_PRESSED, mouseHandler);
            centerKnob.removeEventHandler(MouseEvent.MOUSE_RELEASED, mouseHandler);
            Tooltip.uninstall(centerKnob, buttonTooltip);
        }
    } else if ("SECTIONS".equals(EVENT_TYPE)) {
        sectionsVisible = gauge.getSectionsVisible();
        sections        = gauge.getSections();
    }
}
 
源代码18 项目: JFoenix   文件: ValidatorBase.java
private void uninstall(Node node, Tooltip tooltip) {
    if (tooltip instanceof JFXTooltip) {
        JFXTooltip.uninstall(node);
    } else {
        Tooltip.uninstall(node, tooltip);
    }
}
 
源代码19 项目: MyBox   文件: FxmlControl.java
public static void removeTooltip(final Node node, final Tooltip tooltip) {
    Tooltip.uninstall(node, tooltip);
}
 
源代码20 项目: jmonkeybuilder   文件: ResourceTreeCell.java
@FxThread
private void removeToolTip() {
    if (tooltip == null) return;
    Tooltip.uninstall(this, tooltip);
    tooltip = null;
}