JDK-8101389 : Make Default Cell skins extend Labeled Skin so that we can reduce node count
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: fx2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2011-07-14
  • Updated: 2015-06-16
  • Resolved: 2011-07-25
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.

To download the current JDK release, click here.
Other
fx2.0Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Description
We want to apply the same change as we have done to labeled controls like Button to Tree, Table and List cells so we can reduce them from 5 to 3 nodes.
Comments
Verified for b40
14-08-2011

Changeset: http://jfxsrc.us.oracle.com/javafx/presidio/scrum/controls/runtime/rev/09b8f7e12e70
25-07-2011

OK / SQE
25-07-2011

OK / Arch
21-07-2011

OK / RM
21-07-2011

OK / Dev (For Nandini Ramani)
21-07-2011

SQE/Approved
21-07-2011

The recommended approach is to change Cell to extend Labeled. We can then remove Cell.node, instead using Cell.graphic in its place. We can also use Cell.text, rather than have to create Label instances in the cell factory implementations. Attaching to RT-14922 to be included as part of the API controls CCR.
18-07-2011

The new LabeledSkinBase class, which is basically the same as the old LabelSkin class, assumes that the getSkinnable() method returns a Labeled node. Since a cell can contain any Node, not just Label, we'd need to put conditional code at some level. One possibility could be to modify LabeledSkinBase to use an indirect method getLabeled() which just returns getSkinnable() by default, but can be overridden to return the cell's node - if it is a Labeled. The class CellSkinBase could then extend LabeledSkinBase, but would need to override most methods to deal with the case where the cell's Node is not a Label. This could also cleaned up a bit by introducing some kind of interface and a delegate skin class, but I'm not sure if it's worth the effort until I get further into development.
14-07-2011