GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — Static image rendering for Swing and JavaFX components by mkhawam · Pull Request #123 · dflib/jjava ConversationSummaryThe portable, JupyterLab-independent first slice of #122: render GUI components as static images via What's included
So Headless noteJavaFX TestsHeadless unit tests: Relation to #122This is the portable core split out of #122 per the suggestion to digest it one piece at a time. The
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsAdd renderers that turn GUI components into still images via display(): - java.awt.Component (Swing/AWT): painted off-screen into a BufferedImage and encoded by the existing Image pipeline. Headless-native. - javafx.scene.Node (JavaFX): snapshotted on the JavaFX Application Thread and converted to a BufferedImage. Done reflectively so jjava-jupyter keeps no compile/runtime dependency on JavaFX (it is optional and user-supplied, e.g. via %maven). Producing a snapshot needs a display; on a headless host run the kernel under Xvfb, otherwise it degrades to a short message. To match a JavaFX node regardless of which class loader loaded it, Renderer gains name-based registration (createRegistration(String) / registerByName), matched against the value's class hierarchy by name.
|
There was an error while loading. Please reload this page.
|
Another question is JavaFX requires JVM Options to run in headless mode. It a bit of a pain to add the Although JavaFx does give smoother interaction then swing. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Demonstrates display(component) / display(node) -> static PNG for Swing/AWT and JavaFX (the latter optional via %maven, with an FX-thread build helper).
a547bd1 to
6ef98ba
Compare
|
That means it will not work out of the box. Might want to it to the docs or outputting a warning if someone wants to use javafx if those options are not enabled? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Disclaimer: I need more time to get a better feel of how the whole things works to comment intelligently. But maybe we make the whole thing an optional kernel extension that is loaded explicitly (by adding it as a dependency), and this is where it can complain about missing options. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.