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
Update SpreadsheetView code to JavaFX 17 #1463
base: master
Are you sure you want to change the base?
Conversation
- Remove "toto" from default SpreadsheetView constructor - Fix issue in OpenJFX 17 where pressing "enter" in edition will trigger edition on the cell below
…memory leak using JDF 17.
… to with fixed rows.
…o sam-update-code-to-jfx17 # Conflicts: # controlsfx-build.properties
…ickers when possible between rendering and avoid removing and adding them to the scenegraph.
…ection when necessary.
…ntException when several layout are being done.
…t might not be displayed yet.
…rolling on selected cell hidden by fixed rows.
…lter should be added though)
…ordingly. Issue controlsfx#358 verified for regression
…dition is currently done unless enter is pressed (enter goes to the cell belo instead of editing)
This pull request introduces 2 alerts when merging 8c0ac3c into 1a81f33 - view on LGTM.com new alerts:
|
I prefer to close #1376 in favour of this PR and then rename the PR to something meaningful. |
I'll take a moment this week end to analyse the code. I believe it can be difficult to make this backward compatible with JDK 11. |
Regarding some functional testing notes: @Maxoudela you wrote
but thats not riught syntactically and its redundant to the add-exports that are a few lines above, so I'm just going to change the comments on the existing lines. Using the GlyphFont sample there's a skin problem:
This code has adding my custom build to my own project went off without a hitch; I'd still rather pull a binary from you guys though. |
I'm not a contributor! apologies, this was the easiest way to do it? |
I had this ticket : https://bugs.openjdk.org/browse/JDK-8207957 But running the SpreadsheetView with JDK 11 seems risky to me. If you manage to make it compile with reflection, it's worth the try. I've never done it because we (and my company) completely migrated to OpenJFX 17. No worry for the gradle |
@Override | ||
protected void activate(KeyEvent e) { | ||
// If we are currently editing, do not trigger another edition (for enter, cell below will start edition otherwise) | ||
if (!KeyCode.ENTER.equals(e.getCode()) && skin.getSkinnable().getEditingCell() == null) { |
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 this PR is compatible with JDK 13/11, this code needs to be checked because I don't know if that behavior was specific to JDK 17 or not.
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 compiled the library with java 17 targeting java 11, and than ran it under java 11. I opened the speadsheet view, edited some cells, used the enter and tab keys.
Given:
this method is called through the KeyMapping's specified in TableViewBehaviorBase
enterKeyActivateMapping = new KeyMapping(ENTER, this::activate),
new KeyMapping(SPACE, this::activate),
new KeyMapping(F2, this::activate),
two test paths:
- activate key event:
- select an editable cell (without beginning an edit and triggering the creation of a custom editable control. To do this i clicked on an uneditable column title and used the arrow keys to select control's FX's employee count)
- press
f2
- on java 11: event is passed to super; text is highlighted
- on java 17: exact same behaviour
- filtered key event:
- double click an editable cell, type new value
- hit enter
- on java 11: event is filtered from super; value is committed and subseuent column cell is selected
- on java 17: exact same behaviour
I am hoping to spend some time testing this today or tomorrow. |
some notes that I would presume are not related to java11 -> java 17.
edit: its clear I'm missing something in fx sampllers treatment of css; all of the examples fail to find their CSS. Perhalps the build system is meant to copy a named css file into some kind of generic "style.css" class to be loaded by the sampler app? Need to look into this. |
This PR is a continuation of #1376,
all I have done here is:
I have run the sampler with samples, and it looks OK. I'll put some notes in comments, no show stoppers that I've found (see comment)
I've also run gradle test: 29 passed 3 ignored 0 failed.
When I looked at this it it contained:
edit: what i was about to say was wrong, looking into this...
99% of the work here comes from @Maxoudela with small ~build system tweaks from myself and @abhinayagarwal.
some questions:
rebase -i
before merge?TableColumnHeader.resizeColumnToFitContent
, and so I'm wondering if this code could be re-written to use reflection so that it can run on both javafx 13 (and presumably javafx 11) and javafx 17.