< prev index next >

modules/graphics/src/main/java/javafx/scene/image/ImageView.java

Print this page

        

@@ -153,10 +153,25 @@
             @Override
             public void doUpdatePeer(Node node) {
                 ((ImageView) node).doUpdatePeer();
             }
 
+            @Override
+            public BaseBounds doComputeGeomBounds(Node node,
+            BaseBounds bounds, BaseTransform tx) {
+                return ((ImageView) node).doComputeGeomBounds(bounds, tx);
+            }
+
+            @Override
+            public boolean doComputeContains(Node node, double localX, double localY) {
+                return ((ImageView) node).doComputeContains(localX, localY);
+            }
+
+            @Override
+            public Object doProcessMXNode(Node node, MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) {
+                return ((ImageView) node).doProcessMXNode(alg, ctx);
+            }
         });
     }
 
     {
         // To initialize the class helper at the begining each constructor of this class

@@ -240,11 +255,11 @@
                         Toolkit.getImageAccessor().getImageProperty(_image).
                                 addListener(platformImageChangeListener.getWeakListener());
                     }
                     if (dimensionChanged) {
                         invalidateWidthHeight();
-                        impl_geomChanged();
+                        NodeHelper.geomChanged(ImageView.this);
                     }
                     NodeHelper.markDirty(ImageView.this, DirtyBits.NODE_CONTENTS);
                 }
 
                 @Override

@@ -306,11 +321,11 @@
             new AbstractNotifyListener() {
         @Override
         public void invalidated(Observable valueModel) {
             invalidateWidthHeight();
             NodeHelper.markDirty(ImageView.this, DirtyBits.NODE_CONTENTS);
-            impl_geomChanged();
+            NodeHelper.geomChanged(ImageView.this);
         }
     };
     /**
      * The current x coordinate of the {@code ImageView} origin.
      *

@@ -332,11 +347,11 @@
             x = new DoublePropertyBase() {
 
                 @Override
                 protected void invalidated() {
                     NodeHelper.markDirty(ImageView.this, DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
+                    NodeHelper.geomChanged(ImageView.this);
                 }
 
                 @Override
                 public Object getBean() {
                     return ImageView.this;

@@ -372,11 +387,11 @@
             y = new DoublePropertyBase() {
 
                 @Override
                 protected void invalidated() {
                     NodeHelper.markDirty(ImageView.this, DirtyBits.NODE_GEOMETRY);
-                    impl_geomChanged();
+                    NodeHelper.geomChanged(ImageView.this);
                 }
 
                 @Override
                 public Object getBean() {
                     return ImageView.this;

@@ -419,11 +434,11 @@
 
                 @Override
                 protected void invalidated() {
                     invalidateWidthHeight();
                     NodeHelper.markDirty(ImageView.this, DirtyBits.NODE_VIEWPORT);
-                    impl_geomChanged();
+                    NodeHelper.geomChanged(ImageView.this);
                 }
 
                 @Override
                 public Object getBean() {
                     return ImageView.this;

@@ -467,11 +482,11 @@
 
                 @Override
                 protected void invalidated() {
                     invalidateWidthHeight();
                     NodeHelper.markDirty(ImageView.this, DirtyBits.NODE_VIEWPORT);
-                    impl_geomChanged();
+                    NodeHelper.geomChanged(ImageView.this);
                 }
 
                 @Override
                 public Object getBean() {
                     return ImageView.this;

@@ -532,11 +547,11 @@
 
                 @Override
                 protected void invalidated() {
                     invalidateWidthHeight();
                     NodeHelper.markDirty(ImageView.this, DirtyBits.NODE_VIEWPORT);
-                    impl_geomChanged();
+                    NodeHelper.geomChanged(ImageView.this);
                 }
 
                 @Override
                 public Object getBean() {
                     return ImageView.this;

@@ -636,11 +651,11 @@
 
                 @Override
                 protected void invalidated() {
                     invalidateWidthHeight();
                     NodeHelper.markDirty(ImageView.this, DirtyBits.NODE_VIEWPORT);
-                    impl_geomChanged();
+                    NodeHelper.geomChanged(ImageView.this);
                 }
 
                 @Override
                 public Object getBean() {
                     return ImageView.this;

@@ -656,15 +671,15 @@
     }
 
     // Need to track changes to image width and image height and recompute
     // bounds when changed.
     // imageWidth = bind image.width on replace {
-    // impl_geomChanged();
+    // NodeHelper.geomChanged(ImageView.this);
     // }
     //
     // imageHeight = bind image.height on replace {
-    // impl_geomChanged();
+    // NodeHelper.geomChanged(ImageView.this);
     // }
 
     private double destWidth, destHeight;
 
     /*

@@ -672,16 +687,14 @@
      */
     private NGNode doCreatePeer() {
         return new NGImageView();
     }
 
-    /**
-     * @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) {
         recomputeWidthHeight();
 
         bounds = bounds.deriveWithNewBounds((float)getX(), (float)getY(), 0.0f,
                 (float)(getX() + destWidth), (float)(getY() + destHeight), 0.0f);
         bounds = tx.transform(bounds, bounds);

@@ -729,24 +742,22 @@
             if (localFitHeight > 0f) {
                 h = localFitHeight;
             }
         }
 
-        // Store these values for use later in impl_computeContains() to support
+        // Store these values for use later in doComputeContains() to support
         // Node.contains().
         destWidth = w;
         destHeight = h;
 
         validWH = true;
     }
 
-    /**
-     * @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) {
         if (getImage() == null) {
             return false;
         }
 
         recomputeWidthHeight();

@@ -776,13 +787,13 @@
         if (vw > 0 && vh > 0) {
             viewWidth = vw;
             viewHeight = vh;
         }
 
-        // desWidth Note and destHeight are computed by impl_computeGeomBounds()
+        // desWidth Note and destHeight are computed by NodeHelper.computeGeomBounds()
         // via a call from Node.contains() before calling
-        // impl_computeContains().
+        // doComputeContains().
         // Transform into image's coordinate system.
         dx = vminx + dx * viewWidth / destWidth;
         dy = vminy + dy * viewHeight / destHeight;
         // test whether it's inside the original image AND inside of viewport
         // (viewport may stick out from the image bounds)

@@ -891,14 +902,12 @@
         if (NodeHelper.isDirty(this, DirtyBits.NODE_VIEWPORT) || NodeHelper.isDirty(this, DirtyBits.NODE_CONTENTS)) {
             updateViewport();
         }
     }
 
-    /**
-     * @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 Object impl_processMXNode(MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) {
+    private Object doProcessMXNode(MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) {
         return alg.processLeafNode(this, ctx);
     }
 }
< prev index next >