changeset 10148:f5aad191526f jdk-9+146

8166932: Fix @Deprecated annotations for deprecated JavaFX methods Reviewed-by: flar, kcr
author ckyang
date Fri, 18 Nov 2016 16:13:21 -0800
parents 904ac9ba4ddb
children 0352cd55c27a f58c774610ac
files modules/javafx.controls/src/main/java/javafx/scene/control/SkinBase.java modules/javafx.controls/src/main/java/javafx/scene/control/TreeTableView.java modules/javafx.controls/src/main/java/javafx/scene/control/TreeView.java modules/javafx.fxml/src/main/java/javafx/fxml/FXMLLoader.java modules/javafx.graphics/src/main/java/javafx/css/CssMetaData.java modules/javafx.graphics/src/main/java/javafx/scene/input/GestureEvent.java modules/javafx.graphics/src/main/java/javafx/scene/layout/Region.java modules/javafx.media/src/main/java/javafx/scene/media/AudioTrack.java
diffstat 8 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/SkinBase.java	Fri Nov 18 13:20:16 2016 -0800
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/SkinBase.java	Fri Nov 18 16:13:21 2016 -0800
@@ -496,7 +496,7 @@
      * @return value rounded to nearest pixel
      * @deprecated replaced by {@code snapSpaceX()} and {@code snapSpaceY()}
      */
-    @Deprecated
+    @Deprecated(since="9")
     protected double snapSpace(double value) {
         return control.snapSpaceX(value);
     }
@@ -542,7 +542,7 @@
      * @return value ceiled to nearest pixel
      * @deprecated replaced by {@code snapSizeX()} and {@code snapSizeY()}
      */
-    @Deprecated
+    @Deprecated(since="9")
     protected double snapSize(double value) {
         return control.snapSizeX(value);
     }
@@ -588,7 +588,7 @@
      * @return value rounded to nearest pixel
      * @deprecated replaced by {@code snapPositionX()} and {@code snapPositionY()}
      */
-    @Deprecated
+    @Deprecated(since="9")
     protected double snapPosition(double value) {
         return control.snapPositionX(value);
     }
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/TreeTableView.java	Fri Nov 18 13:20:16 2016 -0800
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/TreeTableView.java	Fri Nov 18 16:13:21 2016 -0800
@@ -493,7 +493,7 @@
      *          the proper way to do this is via
      *          {@link TreeTableView#getTreeItemLevel(TreeItem)}
      */
-    @Deprecated
+    @Deprecated(since="8u20")
     public static int getNodeLevel(TreeItem<?> node) {
         return TreeView.getNodeLevel(node);
     }
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/TreeView.java	Fri Nov 18 13:20:16 2016 -0800
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/TreeView.java	Fri Nov 18 16:13:21 2016 -0800
@@ -281,7 +281,7 @@
      *          the proper way to do this is via
      *          {@link TreeView#getTreeItemLevel(TreeItem)}
      */
-    @Deprecated
+    @Deprecated(since="8u20")
     public static int getNodeLevel(TreeItem<?> node) {
         if (node == null) return -1;
 
--- a/modules/javafx.fxml/src/main/java/javafx/fxml/FXMLLoader.java	Fri Nov 18 13:20:16 2016 -0800
+++ b/modules/javafx.fxml/src/main/java/javafx/fxml/FXMLLoader.java	Fri Nov 18 16:13:21 2016 -0800
@@ -2995,6 +2995,7 @@
      * @deprecated
      * This method now delegates to {@link #getDefaultClassLoader()}.
      */
+    @Deprecated
     public static Class<?> loadType(String packageName, String className) throws ClassNotFoundException {
         return loadType(packageName + "." + className.replace('.', '$'));
     }
@@ -3007,6 +3008,7 @@
      * @deprecated
      * This method now delegates to {@link #getDefaultClassLoader()}.
      */
+    @Deprecated
     public static Class<?> loadType(String className) throws ClassNotFoundException {
         ReflectUtil.checkPackageAccess(className);
         return Class.forName(className, true, getDefaultClassLoader());
--- a/modules/javafx.graphics/src/main/java/javafx/css/CssMetaData.java	Fri Nov 18 13:20:16 2016 -0800
+++ b/modules/javafx.graphics/src/main/java/javafx/css/CssMetaData.java	Fri Nov 18 16:13:21 2016 -0800
@@ -119,7 +119,7 @@
      * @deprecated This method is no longer called from CSS code.
      * Use {@link StyleableProperty#applyStyle(javafx.css.StyleOrigin, java.lang.Object)}
      */
-    @Deprecated
+    @Deprecated(since="8")
     public void set(S styleable, V value, StyleOrigin origin) {
 
         final StyleableProperty<V> styleableProperty = getStyleableProperty(styleable);
--- a/modules/javafx.graphics/src/main/java/javafx/scene/input/GestureEvent.java	Fri Nov 18 13:20:16 2016 -0800
+++ b/modules/javafx.graphics/src/main/java/javafx/scene/input/GestureEvent.java	Fri Nov 18 16:13:21 2016 -0800
@@ -59,7 +59,7 @@
      * @param eventType Type of the event
      * @deprecated Do not use this constructor. Constructs empty event.
      */
-    @Deprecated
+    @Deprecated(since="8")
     protected GestureEvent(final EventType<? extends GestureEvent> eventType) {
         this(eventType, 0, 0, 0, 0, false, false, false, false, false, false, null);
     }
@@ -71,7 +71,7 @@
      * @param eventType Type of the event
      * @deprecated Do not use this constructor. Constructs empty event.
      */
-    @Deprecated
+    @Deprecated(since="8")
     protected GestureEvent(Object source, EventTarget target,
             final EventType<? extends GestureEvent> eventType) {
         super(source, target, eventType);
--- a/modules/javafx.graphics/src/main/java/javafx/scene/layout/Region.java	Fri Nov 18 13:20:16 2016 -0800
+++ b/modules/javafx.graphics/src/main/java/javafx/scene/layout/Region.java	Fri Nov 18 16:13:21 2016 -0800
@@ -1696,7 +1696,7 @@
      * @return value rounded to nearest pixel
      * @deprecated replaced by {@code snapSpaceX()} and {@code snapSpaceY()}
      */
-    @Deprecated
+    @Deprecated(since="9")
     protected double snapSpace(double value) {
         return snapSpaceX(value, isSnapToPixel());
     }
@@ -1735,7 +1735,7 @@
      * @return value ceiled to nearest pixel
      * @deprecated replaced by {@code snapSizeX()} and {@code snapSizeY()}
      */
-    @Deprecated
+    @Deprecated(since="9")
     protected double snapSize(double value) {
         return snapSizeX(value, isSnapToPixel());
     }
@@ -1774,7 +1774,7 @@
      * @return value rounded to nearest pixel
      * @deprecated replaced by {@code snapPositionX()} and {@code snapPositionY()}
      */
-    @Deprecated
+    @Deprecated(since="9")
     protected double snapPosition(double value) {
         return snapPositionX(value, isSnapToPixel());
     }
--- a/modules/javafx.media/src/main/java/javafx/scene/media/AudioTrack.java	Fri Nov 18 13:20:16 2016 -0800
+++ b/modules/javafx.media/src/main/java/javafx/scene/media/AudioTrack.java	Fri Nov 18 16:13:21 2016 -0800
@@ -44,6 +44,7 @@
      * @return the IANA language code or <code>null</code>.
      * @deprecated Use {@link Track#getLocale()} instead.
      */
+    @Deprecated
     public final String getLanguage() {
         Locale l = getLocale();
         return (null == l) ? null : l.getLanguage();