JDK-8094957 : Stop using deprecated builders in samples, toys, and other apps
Type:Bug
Component:javafx
Sub-Component:samples
Affected Version:8
Priority:P3
Status:Resolved
Resolution:Fixed
Submitted:2015-01-17
Updated:2017-03-15
Resolved:2015-02-01
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.
We need to stop using the deprecated builders in our samples, toys, and other apps. This will become critical for FX 9, but is a good cleanup to do for FX 8u60.
Oops. I just realized that I added these comments to the wrong JIRA. My comments from yesterday and today should have been added to RT-39886. Sorry about that!
I moved the above comments to RT-39886.
03-02-2015
Looks good.
+1
29-01-2015
Kevin, thanks for review, here is link to fixed webrev:
http://cr.openjdk.java.net/~ekleyman/RT-39831_fixed/
29-01-2015
Overall this is on the right track, but I haven't done extensive testing. What testing I have done looks good. Here are some things I noticed when reviewing the code.
1. The following two files also use the builders and need to be fixed:
apps/samples/Ensemble8/src/app/java/ensemble/ScrollEventSynthesizer.java
apps/samples/Ensemble8/src/app/java/ensemble/control/BookBend.java
2. In OldTestViewer.java: There are a couple of unintended changes in this file where commented out code was uncommented. This will change the behavior and must be reverted. Specifically:
A. The following comment delimeters were removed and need to be restored:
519 /*
564 */
B. The following code before your change is commented out:
-/*
- borderPane.setBottom(HBoxBuilder.create()
- .id("bottom")
- .spacing(0)
The replacement code should be commented out as well, but it isn't.
3. In PieChartDataVisualizer.java:
+import javafx.scene.control.*;
Our coding style is to use explicit imports rather than wildcard imports, although we don't do this consistently in the samples, so if you can restore the individual imports (removing the unused imports) that would be best.
4. Modena.java:
+import javafx.scene.control.*;
Same comment about wildcard imports as above.
5. modena/SamplePageHelpers.java:
+ return new Group(new Rectangle(200, 200, Color.PALEGOLDENROD), l1, l2);
That should be Color.PALETURQUOISE to match old code.
Additionally, the following files in apps/experiments/ConferenceScheduleApp references builders, but the experiments are not wired up to the build, so could be fixed later in a folllow-up JIRA:
apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/PageContainer.java
apps/experiments/ConferenceScheduleApp/src/main/java/com/javafx/experiments/scheduleapp/pages/SocialPage.java
17-01-2015
The following samples files reference builders:
apps/samples/3DViewer/src/main/java/com/javafx/experiments/jfx3dviewer/OldTestViewer.java
apps/samples/Ensemble8/src/app/java/ensemble/HomePage.java
apps/samples/Ensemble8/src/app/java/ensemble/control/BendingPages.java
apps/samples/Ensemble8/src/app/java/ensemble/samplepage/PieChartDataVisualizer.java
apps/samples/Modena/src/main/java/modena/Modena.java
apps/samples/Modena/src/main/java/modena/SamplePage.java
apps/samples/Modena/src/main/java/modena/SamplePageHelpers.java