JDK-8144956 : Remove impl_cssGet*InitialValue() methods from Node and Labeled
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: controls
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-12-08
  • Updated: 2016-01-13
  • Resolved: 2016-01-13
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.
JDK 9
9Fixed
Related Reports
Relates :  
Description
There are three methods that should be removed:

Node.impl_cssGetFocusTraversableInitialValue()
Node.impl_cssGetCursorInitialValue()
Labeled.impl_cssGetAlignmentInitialValue()

It is likely that these methods should be removed, and possibly replaced with similar, proper API. See attached patch for one such proposal.
Comments
Changeset: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/016699a35e07
13-01-2016

+1
12-01-2016

Updated javadoc looks good. One more place that needs to be similarly updated is: ToggleButton#getInitialAlignment Go ahead and push after making the above change.
12-01-2016

Updated patch with new javadoc - ready for review.
22-12-2015

That looks good to me for the subclasses of Node. What about the base methods in Node itself? I can take a look if you want to upload a new patch.
17-12-2015

Proposed javadoc for methods that override the getInitial*() methods is of the form: /** * Returns the initial focus traversable state of this control, for use * by the JavaFX CSS engine to correctly set its initial value. This method * is overridden as by default UI controls have focus traversable set to true, * but that is not appropriate for this control. * * @since 9 */
16-12-2015

I don't have strong feelings. Just wanted it to be a deliberate decision. getXXX it is. So if you want to leave it, that's fine. That just leaves the javadocs, so I can review it when you upload a new patch.
10-12-2015

Having looked around I think we could argue for having this be a getter - there is enough precedence (e.g. Region.getUserAgentStylesheet). It depends on how strongly we are against using get...
10-12-2015

The API looks fine in concept. My only comment is that we generally try to avoid using the "get" prefix for methods that return values that are not properties, at least in Node subclasses where we define a lot of properties. I suspect this isn't strictly followed, though. One possible alternative is to remove the get and just go with "initialXxxxx()". Another possibility, which underscores the use (but is otherwise uglier) is to retain the "css" from the existing name and go with "cssInitialXxxxx()". Thoughts? Also, the documentation needs some work. At the least, each method should have an initial sentence describing the purpose of the method. Something like: * Returns the initial value of the cursor for use by CSS. And the ones that override can mention why they are overriding or just inherit the documentation from the superclass, whichever you think is better.
08-12-2015

One possible patch is available for review now.
08-12-2015