Details
-
Bug
-
Resolution: Fixed
-
P3
-
8u31
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8129468 | 8u60 | Jonathan Giles | P3 | Resolved | Fixed |
Description
The TableMenuButton "+" shows the columns, which are currently shown in a TableView or TreeTableView. There 2 major problems i found with the button:
The first problem:
################
Having a minimal configuration fo a tableview with one column take the following FXML as example:
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8">
<children>
<TableView prefHeight="200.0" prefWidth="200.0" tableMenuButtonVisible="true">
<columns>
<TableColumn prefWidth="75.0" text="C1" />
</columns>
</TableView>
</children>
</AnchorPane>
1. Run the preview in scene builder or running it as regular java program
2. you will see that when you click the TableButtonMenu the column gets removed visibly
3. the problem: the table header with the TableMenuButton gets lost so you cannot display the column again with the button. The solution: the table header with the button has to be visible all the time, even there is no column in it
The second problem:
#################
1. Please take the following code example from
http://code.makery.ch/blog/javafx-8-tableview-sorting-filtering/
2. Download it and put it into eclipse as imported project
3. Then open the fxml view "PersonTable" and enable the TableMenuButton in Scene Builder or put it to true in the appropriate initialize()-method of it's controller
4. run the code and use the TableMenuButton to remove some columns
5. You will see now that the columns you disabled by TableMenuButton, are not displayable again. They get completely removed. That should not be the case
I think this problem is related to comparatorProperty
The first problem:
################
Having a minimal configuration fo a tableview with one column take the following FXML as example:
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8">
<children>
<TableView prefHeight="200.0" prefWidth="200.0" tableMenuButtonVisible="true">
<columns>
<TableColumn prefWidth="75.0" text="C1" />
</columns>
</TableView>
</children>
</AnchorPane>
1. Run the preview in scene builder or running it as regular java program
2. you will see that when you click the TableButtonMenu the column gets removed visibly
3. the problem: the table header with the TableMenuButton gets lost so you cannot display the column again with the button. The solution: the table header with the button has to be visible all the time, even there is no column in it
The second problem:
#################
1. Please take the following code example from
http://code.makery.ch/blog/javafx-8-tableview-sorting-filtering/
2. Download it and put it into eclipse as imported project
3. Then open the fxml view "PersonTable" and enable the TableMenuButton in Scene Builder or put it to true in the appropriate initialize()-method of it's controller
4. run the code and use the TableMenuButton to remove some columns
5. You will see now that the columns you disabled by TableMenuButton, are not displayable again. They get completely removed. That should not be the case
I think this problem is related to comparatorProperty
Attachments
Issue Links
- backported by
-
JDK-8129468 TableMenuButton has erroneous behaviour with assigned data
-
- Resolved
-