-
Notifications
You must be signed in to change notification settings - Fork 546
8356770: TreeTableView not updated after removing a TreeItem with children and adding it to another parent #1971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6439,6 +6439,70 @@ private void test_rt_40319(boolean toRight, boolean toBottom, boolean useMouse) | |||||||||||||
| sl.dispose(); | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| @Test | ||||||||||||||
| void test_jdk_8356770_reparentingItem() { | ||||||||||||||
|
||||||||||||||
| /** | |
| * The content display should also be taken into consideration when measuring the width. | |
| * See also: <a href="https://bugs.openjdk.org/browse/JDK-8186188">JDK-8186188</a> | |
| */ | |
| @Test | |
| public void testResizeColumnToFitContentWithGraphicAlignment() { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this call really needed? Just asking because most of the time, it is not needed right after the StageLoader
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend using VirtualFlowTestUtils.getVirtualFlow(table).getVisibleCell(index);
The index should be easy to find out, since we always know where the TreeItem should be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes exact, I usually prefer not to hardcode things, but sure in this case I will modify it.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Null check is not needed, since we do test the disclosure node position instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The null check is just for safety that the item exist, not that much important.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know IntelliJ makes methods static by default (when extracting), but I don't think it makes sense here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's perfectly fine to have a static method here (and in tests in general).
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just call: row.getDisclosureNode() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: else if should be in the previous line to follow the Java Code Convention:
} else if (..)