Java – tableview cell span

Is there any way to make TableCell horizontal span? I want to create a tableview similar to the one shown in the figure in JavaFX 2.2

sample http://cache.fxexperience.com/wp-content/uploads/2012/10/Picture2.png

By the way, the image comes from a sample of this feature, but it is specific to Java FX 8.0 I've been trying to use rowfactory, but there aren't enough documents to explain how to use it

Thank you in advance

Solution

The unit crossing in the JavaFX platform is implemented for Java 8 and then cut as part of feature pruning

The function request to track cell spanning is rt-24747 cell spanning / merging in tableview (this is only a function request to provide the image referenced in the question)

The linked function request includes sample code for displaying a table containing rows and columns spanning cells The sample code relies on patches attached to feature requests This patch modifies the JavaFX control code of Java 8

You can study the code and patches in the function request to determine whether you can implement such technologies for yourself in user code without patching the JavaFX runtime

The only custom row factory code I know is the code in openjfx for default tableview row processing - it's not simple For reference, the code is in tablerow java,TableRowSkinBase. Java and tablerowskin Java

Another way to implement your own row factory is updating tableview row appearance, which uses CSS to modify the style of some cells or whole rows instead of using a fully customized row factory Instead of implementing a new row factory, you can modify the CSS style to remove row separators across cells

Use the scenicview or scenebuilder CSS analyzer tool to help determine the desired CSS style to modify

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>