Modify

Opened 3 months ago

Closed 2 months 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)

18747.patch (2.3 KB) - added by taylor.smock 3 months ago.
Initial patch
18731.1.patch (3.4 KB) - added by taylor.smock 3 months ago.
Extend JFXPanel instead of creating a new instance
18747.1.patch (2.2 KB) - added by taylor.smock 3 months ago.
18747.2.patch (1.7 KB) - added by taylor.smock 3 months ago.
Move to javafx package, rename to match javafx naming scheme, still has some issues
18747.3.patch (4.0 KB) - added by taylor.smock 3 months ago.
Fix UI issues, fix traversal when tabbing
18747.4.patch (5.0 KB) - added by taylor.smock 2 months ago.
Export IvyDE to for other projects

Download all attachments as: .zip

Change History (13)

Changed 3 months ago by taylor.smock

Attachment: 18747.patch added

Initial patch

Changed 3 months ago by taylor.smock

Attachment: 18731.1.patch added

Extend JFXPanel instead of creating a new instance

Changed 3 months ago by taylor.smock

Attachment: 18747.1.patch added

comment:1 Changed 3 months ago by taylor.smock

18731.1.patch is the wrong patch. The comment does apply to 18747.1.patch.

comment:2 in reply to:  description Changed 3 months ago by Don-vip

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 Changed 3 months ago by taylor.smock

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).

Last edited 3 months ago by taylor.smock (previous) (diff)

comment:4 Changed 3 months ago by Don-vip

Component: CorePlugin javafx
Owner: changed from team to Don-vip

Changed 3 months ago by taylor.smock

Attachment: 18747.2.patch added

Move to javafx package, rename to match javafx naming scheme, still has some issues

Changed 3 months ago by taylor.smock

Attachment: 18747.3.patch added

Fix UI issues, fix traversal when tabbing

Changed 2 months ago by taylor.smock

Attachment: 18747.4.patch added

Export IvyDE to for other projects

comment:5 Changed 2 months ago by taylor.smock

I think this is "done".

comment:6 Changed 2 months ago by taylor.smock

Summary: [PATCH RFC] Add a wrapper for JavaFX methods[PATCH] Add a wrapper for JavaFX methods

comment:7 Changed 2 months ago by Don-vip

Resolution: fixed
Status: newclosed

Fixed in [o35375:35376].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.