Opened 6 years ago
Closed 6 years ago
#18747 closed enhancement (fixed)
[PATCH] Add a wrapper for JavaFX methods
| Reported by: | taylor.smock | Owned by: | Don-vip |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugin javafx | Version: | |
| Keywords: | Cc: |
Description
This wrapper creates a JFXPanel around an arbitrary JavaFX node.
It has two public methods, getPanel to get the JFXPanel to add to UI elements and getNode to get the node. It is a generic function, so the class of the node passed to the constructor is used for the return type.
ticket:14921#comment:35 indicated that the JavaFX DatePicker class would be useful for the Sentinel imagery, but I didn't want to write something that was strictly specific to the DatePicker class.
Sample usage of this class:
JavaFXWrapper<> dateWrapper = new JavaFXWrapper<>(new DatePicker());
I'm marking this as an RFC since I don't know if this should be in JOSM core, plugin JavaFX, and whether or not it would be worth pursuing.
Attachments (6)
Change History (13)
by , 6 years ago
| Attachment: | 18747.patch added |
|---|
by , 6 years ago
| Attachment: | 18731.1.patch added |
|---|
Extend JFXPanel instead of creating a new instance
by , 6 years ago
| Attachment: | 18747.1.patch added |
|---|
comment:1 by , 6 years ago
18731.1.patch is the wrong patch. The comment does apply to 18747.1.patch.
comment:2 by , 6 years ago
Replying to taylor.smock:
I don't know if this should be in JOSM core, plugin JavaFX, and whether or not it would be worth pursuing.
Rather in JavaFX plugin, as we're not ready to make JOSM core depend on JavaFX features yet. But definitively worth it :)
comment:3 by , 6 years ago
OK. I'll keep working on it. I was thinking of trying to take the 360 degree viewer from the Microsoft StreetSide plugin sometime, but that depends on JavaFX. :(
Current known bugs (in my working tree):
1) DatePicker objects can be tabbed to, but not out of -- tab will instead toggle the DialogsPanel. I haven't tried other components yet.
2) There are a few UI issues, but I don't know if it is due to the surrounding Swing code
3) There is an issue in the current patch where, if there wasn't a JavaFX call prior, an exception occurs. I'm thinking about modifying the constructor so that a class can be passed, but then there are possible thrown exceptions. I can probably suppress and log them, since they shouldn't happen (tm).
comment:4 by , 6 years ago
| Component: | Core → Plugin javafx |
|---|---|
| Owner: | changed from to |
by , 6 years ago
| Attachment: | 18747.2.patch added |
|---|
Move to javafx package, rename to match javafx naming scheme, still has some issues
comment:6 by , 6 years ago
| Summary: | [PATCH RFC] Add a wrapper for JavaFX methods → [PATCH] Add a wrapper for JavaFX methods |
|---|



Initial patch