< prev index next >

modules/graphics/src/main/java/javafx/scene/shape/Sphere.java

Print this page

        

@@ -63,10 +63,27 @@
 
             @Override
             public void doUpdatePeer(Node node) {
                 ((Sphere) node).doUpdatePeer();
             }
+
+            @Override
+            public BaseBounds doComputeGeomBounds(Node node,
+            BaseBounds bounds, BaseTransform tx) {
+                return ((Sphere) node).doComputeGeomBounds(bounds, tx);
+            }
+
+            @Override
+            public boolean doComputeContains(Node node, double localX, double localY) {
+                return ((Sphere) node).doComputeContains(localX, localY);
+            }
+
+            @Override
+            public boolean doComputeIntersects(Node node, PickRay pickRay,
+            PickResultChooser pickResult) {
+                return ((Sphere) node).doComputeIntersects(pickRay, pickResult);
+            }
         });
     }
 
     static final int DEFAULT_DIVISIONS = 64;
     static final double DEFAULT_RADIUS = 1;

@@ -130,11 +147,11 @@
                 @Override
                 public void invalidated() {
                     NodeHelper.markDirty(Sphere.this, DirtyBits.MESH_GEOM);
                     manager.invalidateSphereMesh(key);
                     key = 0;
-                    impl_geomChanged();
+                    NodeHelper.geomChanged(Sphere.this);
                 }
             };
         }
         return radius;
     }

@@ -173,17 +190,14 @@
                 pgSphere.updateMesh(mesh.getPGTriangleMesh());
             }
         }
     }
 
-    /**
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+    /*
+     * Note: This method MUST only be called via its accessor method.
      */
-    @Deprecated
-    @Override
-    public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx) {
+    private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx) {
         final float r = (float) getRadius();
 
         if (r < 0) {
             return bounds.makeEmpty();
         }

@@ -191,29 +205,23 @@
         bounds = bounds.deriveWithNewBounds(-r, -r, -r, r, r ,r);
         bounds = tx.transform(bounds, bounds);
         return bounds;
     }
 
-    /**
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+    /*
+     * Note: This method MUST only be called via its accessor method.
      */
-    @Deprecated
-    @Override
-    protected boolean impl_computeContains(double localX, double localY) {
+    private boolean doComputeContains(double localX, double localY) {
         double r = getRadius();
         double n2 = localX * localX + localY * localY;
         return n2 <= r * r;
     }
 
-    /**
-     * @treatAsPrivate implementation detail
-     * @deprecated This is an internal API that is not intended for use and will be removed in the next version
+    /*
+     * Note: This method MUST only be called via its accessor method.
      */
-    @Deprecated
-    @Override
-    protected boolean impl_computeIntersects(PickRay pickRay, PickResultChooser pickResult) {
+    private boolean doComputeIntersects(PickRay pickRay, PickResultChooser pickResult) {
 
         final boolean exactPicking = divisions < DEFAULT_DIVISIONS && mesh != null;
 
         final double r = getRadius();
         final Vec3d dir = pickRay.getDirectionNoClone();
< prev index next >