English 中文(简体)
我如何躲藏在科罗伯克族人口底层的二级肤色。
原标题:How do I hide the secondary colors at the bottom of the ColorPicker pop-up
  • 时间:2024-01-16 03:53:16
  •  标签:
  • javafx

我如何躲藏在科罗伯克族人口最底层的二级肤色。

我已经查阅了贾瓦尼反恐委员会的文件,但我无法解决这个问题。

enter image description here enter image description here

问题回答

如果你在下面看到彩色采集器的景象:你只关心第一个GridPane。

“entergraph

你们需要放弃所有其他不想要的节点的可见度。 由于村子居住在VBox,仅仅依靠可见度是不够的。 间隔仍会显示,因此,你需要从子的有管理的财产中去掉(跳跃计算)。

To do that, you can include the below css styling in your CSS file.

.color-palette > #ColorCustomizerColorGrid,
.color-palette > .label,
.color-palette > .separator,
.color-palette > .hyperlink{
    visibility: hidden;
    -fx-managed: false;
}

在加上上述改动后,彩色采集器的表现如下:

“entergraph

www.un.org/Depts/DGACM/index_spanish.htm

如果你使用一种javafx版本,其中-fx-management没有得到实施,那么你可以尝试以下方法,即人工冲销所需的节点可见度和安放;管理财产。

但是,为此,你们需要创造一种习俗,让人们能够接触到烟雾。 您无需对这一办法作任何更改。

ColorPicker colorPicker = new ColorPicker(Color.RED) {
    @Override
    protected Skin<?> createDefaultSkin() {
        return new ColorPickerSkin(this) {
            List<String> styles = List.of("label", "separator", "hyperlink");

            @Override
            public void show() {
                // Turn off the visibility of required nodes before showing
                ((Region) getPopupContent().lookup(".color-palette")).getChildrenUnmodifiable().forEach(node -> {
                    if ("ColorCustomizerColorGrid".equals(node.getId()) || node.getStyleClass().stream().anyMatch(styles::contains)) {
                        node.setVisible(false);
                        node.setManaged(false);
                    }
                });
                super.show();
            }
        };
    }
};

<>说明: 如果你想在多个地方实施,你可以设立单独的控制和皮肤班。





相关问题
JavaFX with Maven [closed]

I recently started a JavaFX project, and I d like to use Maven as my compiler/deployment tool. Is there a good tutorial or plugin to integrate JavaFX and Maven?

Displaying a string with variables in JavaFX

I have little quiz game I ve working on and am tracking correct answers. I have a text object that displays the number of consecutive correct answers. This is the content: content: bind consecutive....

non java-developer question

Just a basic question about Java (haven t really done anything with it personally yet): Is it possible to write a Java program that runs in a web browser (via JRE) on the client machine? Is ...

Pros and Cons of JavaFX and Silverlight [closed]

I know there is already a question about the performance of Flex, JavaFX, and Silverlight. My question is a bit more broad: We are evaluating the merits of JavaFX and Silverlight to serve as the GUI ...

How to simplify SVG code?

Is it possible to simplify / clean up svg code by replacing the use-tags with standard svg elements? Maybe an inkscape plugin? Haven t found anything... Background: I m converting some svgs to javafx ...

Dynamically changing a keyframes time attribute in JavaFX

I am making a game in JavaFX and have implemented a slider for controlling the game speed. I have a simple slider (javafx.scene.control.Slider) and I m binding the time attribute for the gameloop to ...

Migrate Java Applet to what/where?

I am reviewing currently a medium size code base (around 30K LOC) which uses a huge Applet and interfaces with other systems. It s a tool to create custom labels, so we need drag-n-drop and other ...

热门标签