JDK-8098050 : Add Window setUserData and user data to other non-Node classes
Type:Enhancement
Component:javafx
Sub-Component:scenegraph
Affected Version:7u6
Priority:P4
Status:Resolved
Resolution:Fixed
Submitted:2012-11-02
Updated:2015-06-12
Resolved:2014-08-12
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
All other controls allow to store a user specific object on the control. ContextMenu does not have such a possibility.
Comments
Changeset: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/7ec4725320d0
Unit tests:
ToggleGroupTest#testProperties
SceneTest#testProperties
WindowTest#testProperties
12-08-2014
+1 for adding the new API
08-08-2014
Attached patches from Tom for Scene and ToggleGroup.
30-07-2014
The only other NONE Node subclass that comes to my mind is ToggleGroup
30-07-2014
We will add the API when the patch is complete and ready for review.
29-07-2014
+1 for adding this new API to Window and also to Scene.
29-07-2014
I agree. I was just asking whether you had done a pass on controls to see whether the list is complete. For example, Tab and TableColumn support user data.
29-07-2014
I think Window and Scene should cover it all, these are basically the main objects that form a scenegraph. I don't think we should have user data support in some auxiliary objects like effects, bounds, etc...
29-07-2014
This seems reasonable to me. Are there other non-Node classes that we missed that might also support arbitrary application data?
28-07-2014
I would naturally contribute the same patches for Scene as well
28-07-2014
Steve, Kevin - this is an API change Tom proposed and implemented. I'm OK with the change, it has low memory footprint and makes the scenegraph API more consistent (Node has exactly the same API, but Window doesn't). We might want to add the same API to Scene at the same time.
28-07-2014
Attached 2 patches from Tom.
28-07-2014
patch to come in the next few days
24-07-2014
Tom, is a patch coming for this?
24-07-2014
Yes, send through a patch and I'll review and push to the repo.
15-07-2014
Could we get this in u40? I would provide a patch for it!