Skip to content
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

Create a reusable dialog class that can display a JFXPanel #1347

Closed
cwisniew opened this issue Mar 3, 2020 · 1 comment
Closed

Create a reusable dialog class that can display a JFXPanel #1347

cwisniew opened this issue Mar 3, 2020 · 1 comment
Assignees
Labels
claimed Issue is being actively worked on. feature Adding functionality that adds value

Comments

@cwisniew
Copy link
Member

cwisniew commented Mar 3, 2020

Create a reusable dialog class that can display a JFXPanel.
The standard JavaFX dialogs can not be used as they live in a separate hierarchy to Swing windows so can not be modal with the main MapTool frame, nor will they stay above the MapTool frame if it is clicked on.

@cwisniew cwisniew added feature Adding functionality that adds value claimed Issue is being actively worked on. labels Mar 3, 2020
@cwisniew cwisniew self-assigned this Mar 3, 2020
@cwisniew cwisniew added this to the 1.9.0 milestone May 25, 2020
@cwisniew cwisniew removed this from the 1.9.0 milestone Sep 4, 2021
@cwisniew
Copy link
Member Author

cwisniew commented Oct 6, 2021

This was included as part of PR #2992

Added several classes in https://github.com/RPTools/maptool/tree/develop/src/main/java/net/rptools/maptool/client/ui/javfx
These are

  • FXMLLoaderUtil - Utility class for loading FXML files.
  • SwingJavaFXDialog - A Class that shows JavaFX content in a Swing dialog from FXML, takes care of most of the threading issues for you.
  • SimpleSwingJavaFXDialog - An implementation of SwingJavaFXDialog that provides a call back to obtain controller and registering close events. In most cases this is the class you will want to implement.
  • SwingJavaFXDialogController - interface that controllers for SimpleSwingJavaFXDialog FXML content must implement.
  • SwingJavaFXDialogEventHandler - Event handler interface for listening for close events.

A couple of examples on how to use the classes above can be found in
https://github.com/RPTools/maptool/tree/develop/src/main/java/net/rptools/maptool/client/ui/players

@cwisniew cwisniew closed this as completed Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
claimed Issue is being actively worked on. feature Adding functionality that adds value
Projects
None yet
Development

No branches or pull requests

1 participant