JavaFX 工具提示删除页面 Angular

标签 java css user-interface javafx tooltip

我试图从工具提示中删除页面 Angular ,但我无法让 CSS 粘住。

我的代码看起来像:

public class PinRender extends StackPane {

private Shape shape;
private Text textNode;
private String text;

public PinRender(Shape shape) {
    this.shape = shape;
    this.textNode = new Text();
    this.text = "";
    this.getChildren().add(shape);
    this.getChildren().add(textNode);
    this.getStylesheets().add(PinRender.class.getResource("ToolTipStyle.css").toExternalForm());

    Tooltip tooltip = new Tooltip("ToolTips are the best!");
    tooltip.getStyleClass().add("ttip");

    Tooltip.install(this, tooltip);
}

public void setColor(Color c) {
    shape.setFill(c);
}
}

我的 CSS 看起来像:

.ttip{
     -fx-background-radius: 0 0 0 0;
     -fx-background-color:  linear-gradient(white,whitesmoke);
}

.page-corner {
    -fx-shape: " ";
}

但我仍然得到默认的丑陋的黄色和折叠的页 Angular 。

我是否尝试错误地使用 CSS?

最佳答案

.page-corner {
    -fx-background-color: transparent;
}

关于JavaFX 工具提示删除页面 Angular ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19775989/

相关文章:

html - 如何将内部div放入外部div

html - 如何使空的 contenteditable 跨度保持高度

java - 如何使 JFrame 透明?

Android 中的 Java.lang.verify 错误

java - 用于模型库测试的 UML 建模

jQuery 3d 立方体旋转不流畅

javascript - 哪种方式最适合 React Native 中的条件渲染?

css - 使用 UI 框架启动 React 元素是个好主意吗?

java - 联合测试: Test multiple Exception

java - 当我用参数写一个 GET 或 POST 方法时...然后调用它,如果一些参数没有填写,参数将被设置为 null,对吗?